Skip to content

Commit cdddb62

Browse files
GustavoARSilvakees
authored andcommitted
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: "Gustavo A. R. Silva" <gustavoars@kernel.org> Reviewed-by: Vikash Garodia <quic_vgarodia@quicinc.com> Link: https://lore.kernel.org/r/ZKBfoqSl61jfpO2r@work Signed-off-by: Kees Cook <keescook@chromium.org>
1 parent a8f014e commit cdddb62

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/media/platform/qcom/venus/hfi_cmds.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -251,8 +251,8 @@ int pkt_session_unset_buffers(struct hfi_session_release_buffer_pkt *pkt,
251251

252252
pkt->extradata_size = 0;
253253
pkt->shdr.hdr.size =
254-
struct_size((struct hfi_session_set_buffers_pkt *)0,
255-
buffer_info, bd->num_buffers);
254+
struct_size_t(struct hfi_session_set_buffers_pkt,
255+
buffer_info, bd->num_buffers);
256256
}
257257

258258
pkt->response_req = bd->response_required;

0 commit comments

Comments
 (0)