]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
media: venus: Replace one-element arrays with flexible-array members
authorGustavo A. R. Silva <gustavoars@kernel.org>
Tue, 16 May 2023 20:17:32 +0000 (21:17 +0100)
committerMauro Carvalho Chehab <mchehab@kernel.org>
Fri, 9 Jun 2023 12:43:46 +0000 (13:43 +0100)
commita80d6771ae067c3ec2313897fd999d3649a81c9c
tree4c4d2975cec1edbba7cbc2b549abf5d62ad4b751
parenta0eadbe92610cfaa0f5d519778c0297564e6a3a2
media: venus: Replace one-element arrays with flexible-array members

One-element arrays are deprecated, and we are replacing them with flexible
array members instead. So, replace one-element arrays with flexible-array
members in multiple structures, and refactor the rest of the code,
accordingly.

This helps with the ongoing efforts to tighten the FORTIFY_SOURCE
routines on memcpy() and help us make progress towards globally
enabling -fstrict-flex-arrays=3 [1].

This results in no differences in binary output.

Link: https://github.com/KSPP/linux/issues/79
Link: https://github.com/KSPP/linux/issues/291
Link: https://gcc.gnu.org/pipermail/gcc-patches/2022-October/602902.html
Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org>
Signed-off-by: Stanimir Varbanov <stanimir.k.varbanov@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
drivers/media/platform/qcom/venus/hfi_msgs.c
drivers/media/platform/qcom/venus/hfi_msgs.h