Skip to content

Commit

Permalink
media: venus: hfi_cmds: struct hfi_session_release_buffer_pkt: Add __…
Browse files Browse the repository at this point in the history
…counted_by annotation

The only direct user of struct hfi_session_release_buffer_pkt is
pkt_session_unset_buffers() which sets "num_buffers" before using it
as a loop counter for accessing "buffer_info". Add the __counted_by
annotation to reflect the relationship.

Reviewed-by: Vikash Garodia <quic_vgarodia@quicinc.com>
Reviewed-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
Reviewed-by: Dikshita Agarwal <quic_dikshita@quicinc.com>
Reviewed-by: Gustavo A. R. Silva <gustavoars@kernel.org>
Link: https://lore.kernel.org/r/20240710230914.3156277-2-kees@kernel.org
Signed-off-by: Kees Cook <kees@kernel.org>
  • Loading branch information
Kees Cook committed Aug 22, 2024
1 parent c934527 commit 32ef4b7
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 @@ -227,7 +227,7 @@ struct hfi_session_release_buffer_pkt {
u32 extradata_size;
u32 response_req;
u32 num_buffers;
u32 buffer_info[];
u32 buffer_info[] __counted_by(num_buffers);
};

struct hfi_session_release_resources_pkt {
Expand Down

0 comments on commit 32ef4b7

Please sign in to comment.