Skip to content

Commit

Permalink
media: venus: Refactor hfi_session_empty_buffer_uncompressed_plane0_pkt
Browse files Browse the repository at this point in the history
The single element array data[1] is never used. Replace it with a
padding field of the same size.

This fixes the following cocci error:
drivers/media/platform/qcom/venus/hfi_cmds.h:163:5-9: 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 <[email protected]>
Acked-by: Vikash Garodia <[email protected]>
Signed-off-by: Stanimir Varbanov <[email protected]>
Signed-off-by: Hans Verkuil <[email protected]>
  • Loading branch information
ribalda authored and Hans Verkuil committed Aug 25, 2024
1 parent 4aed1c4 commit 3a5fde1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/media/platform/qcom/venus/hfi_cmds.h
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ struct hfi_session_empty_buffer_uncompressed_plane0_pkt {
u32 input_tag;
u32 packet_buffer;
u32 extradata_buffer;
u32 data[1];
u32 data;
};

struct hfi_session_empty_buffer_uncompressed_plane1_pkt {
Expand Down

0 comments on commit 3a5fde1

Please sign in to comment.