aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKees Cook <[email protected]>2024-07-10 16:09:13 -0700
committerKees Cook <[email protected]>2024-08-22 16:59:48 -0700
commit32ef4b710cbe1a8901534033872a5bc6b1618bbc (patch)
treebd6da4b29bc4492b604b870a92364831e9c10eb6
parentc93452777f537b2f6c3c601dc484821142b07dc7 (diff)
media: venus: hfi_cmds: struct hfi_session_release_buffer_pkt: Add __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 <[email protected]> Reviewed-by: Bryan O'Donoghue <[email protected]> Reviewed-by: Dikshita Agarwal <[email protected]> Reviewed-by: Gustavo A. R. Silva <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Kees Cook <[email protected]>
-rw-r--r--drivers/media/platform/qcom/venus/hfi_cmds.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/media/platform/qcom/venus/hfi_cmds.h b/drivers/media/platform/qcom/venus/hfi_cmds.h
index 42825f07939d..1adf2d2ae5f2 100644
--- a/drivers/media/platform/qcom/venus/hfi_cmds.h
+++ b/drivers/media/platform/qcom/venus/hfi_cmds.h
@@ -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 {