]> www.infradead.org Git - users/jedix/linux-maple.git/commit
media: allegro: nal-hevc: Replace array[1] with array[N]
authorRicardo Ribalda <ribalda@chromium.org>
Mon, 27 May 2024 21:08:51 +0000 (21:08 +0000)
committerHans Verkuil <hverkuil-cisco@xs4all.nl>
Fri, 31 May 2024 11:51:16 +0000 (13:51 +0200)
commit669d51f8f45db35a5e44101b90fcc7173088ad28
tree88212d2971a6814257577bab477ff54c723c7427
parent6a4e6e34ceac24f4a17fb24fdca0e04c16ecfba5
media: allegro: nal-hevc: Replace array[1] with array[N]

Structures that have a single element array as the last field can be
mistaken as a "flex array".

We could replace all the single element arrays in the structure with
single element fields, but this driver prefers to follow the ITU-T H.265
specification, which defines it as an array.

If we introduce a new define N_HRD_PARAMS, we make clear our
intentions.

This fixes this cocci warning:
drivers/media/platform/allegro-dvt/nal-hevc.h:102:14-22: WARNING use flexible-array member instead (https://www.kernel.org/doc/html/latest/process/deprecated.html#zero-length-and-one-element-arrays)

Signed-off-by: Ricardo Ribalda <ribalda@chromium.org>
Reviewed-by: Michael Tretter <m.tretter@pengutronix.de>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
[hverkuil: fix typo in subject and commit log]
drivers/media/platform/allegro-dvt/nal-hevc.h