Hans Verkuil 7124ae48f2 media: s5k5baf: drop 'data' field in struct s5k5baf_fw
struct s5k5baf_fw ends with this:

       struct {
               u16 id;
               u16 offset;
       } seq[0];
       u16 data[];
};

which is rather confusing and can cause gcc warnings:

s5k5baf.c: In function 's5k5baf_load_setfile.isra':
s5k5baf.c:390:13: warning: array subscript 65535 is outside the bounds of an interior zero-length array 'struct <anonymous>[0]' [-Wzero-length-bounds]
  390 |   if (f->seq[i].offset + d <= end)
      |       ~~~~~~^~~

It turns out that 'data[]' is used in only one place and it can
easily be replaced by &fw->seq[0].id and 'seq[0]' can be replaced by
'seq[]'.

This is both more readable and solved that warnings.

Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Cc: Kyungmin Park <kyungmin.park@samsung.com>
Cc: Sylwester Nawrocki <snawrocki@kernel.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
2020-10-08 14:13:28 +02:00
..
2019-07-09 09:47:22 -07:00
2020-09-07 16:13:06 +02:00
2020-07-19 14:15:42 +02:00
2020-07-19 14:15:42 +02:00
2020-07-19 14:15:42 +02:00
2019-07-09 09:47:22 -07:00
2019-03-01 09:29:58 -05:00
2020-08-29 08:35:27 +02:00
2020-09-01 14:13:27 +02:00
2020-08-29 08:35:27 +02:00
2019-08-26 14:05:09 -03:00
2020-07-19 14:15:42 +02:00
2019-03-01 09:29:58 -05:00
2019-03-01 09:29:58 -05:00