Commit cdddb626 authored by Gustavo A. R. Silva's avatar Gustavo A. R. Silva Committed by Kees Cook

media: venus: Use struct_size_t() helper in pkt_session_unset_buffers()

Prefer struct_size_t() over struct_size() when no pointer instance
of the structure type is present.
Signed-off-by: default avatar"Gustavo A. R. Silva" <gustavoars@kernel.org>
Reviewed-by: default avatarVikash Garodia <quic_vgarodia@quicinc.com>
Link: https://lore.kernel.org/r/ZKBfoqSl61jfpO2r@workSigned-off-by: default avatarKees Cook <keescook@chromium.org>
parent a8f014ec
...@@ -251,8 +251,8 @@ int pkt_session_unset_buffers(struct hfi_session_release_buffer_pkt *pkt, ...@@ -251,8 +251,8 @@ int pkt_session_unset_buffers(struct hfi_session_release_buffer_pkt *pkt,
pkt->extradata_size = 0; pkt->extradata_size = 0;
pkt->shdr.hdr.size = pkt->shdr.hdr.size =
struct_size((struct hfi_session_set_buffers_pkt *)0, struct_size_t(struct hfi_session_set_buffers_pkt,
buffer_info, bd->num_buffers); buffer_info, bd->num_buffers);
} }
pkt->response_req = bd->response_required; pkt->response_req = bd->response_required;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment