media: venus: hfi_cmds: Use struct_size() helper
authorGustavo A. R. Silva <gustavoars@kernel.org>
Tue, 16 May 2023 23:14:49 +0000 (00:14 +0100)
committerMauro Carvalho Chehab <mchehab@kernel.org>
Fri, 9 Jun 2023 12:45:09 +0000 (13:45 +0100)
commite03ac40885db88cece5a5c866b6825d1eeacb24e
tree2067c6b454fd566c51e20d270b931d75a637e9e8
parent40c02059645890d0525b693fc5b80d4c4db8d205
media: venus: hfi_cmds: Use struct_size() helper

Prefer struct_size() over open-coded versions of idiom:

sizeof(struct-with-flex-array) + sizeof(typeof-flex-array-elements) * count

where count is the max number of items the flexible array is supposed to
contain.

Link: https://github.com/KSPP/linux/issues/160
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_cmds.c