summaryrefslogtreecommitdiffstats
path: root/drivers/rpmsg/qcom_smd.c
diff options
context:
space:
mode:
authorMinghao Chi (CGEL ZTE) <chi.minghao@zte.com.cn>2022-02-16 03:07:20 +0000
committerBjorn Andersson <bjorn.andersson@linaro.org>2022-03-11 14:24:55 -0600
commit18fc82d6e899be54fcf43b28e588e28f09c8810f (patch)
treee6f4a7766c2b5754d8e726903075289b02c3c4a5 /drivers/rpmsg/qcom_smd.c
parenta8f8cc6b39b7ee0dbaccbebd1268c9d3458ebf13 (diff)
downloadlinux-stable-18fc82d6e899be54fcf43b28e588e28f09c8810f.tar.gz
linux-stable-18fc82d6e899be54fcf43b28e588e28f09c8810f.tar.bz2
linux-stable-18fc82d6e899be54fcf43b28e588e28f09c8810f.zip
rpmsg: use struct_size over open coded arithmetic
Replace zero-length array with flexible-array member and make use of the struct_size() helper in kzalloc(). For example: struct glink_defer_cmd { struct list_head node; struct glink_msg msg; u8 data[]; }; Make use of the struct_size() helper instead of an open-coded version in order to avoid any potential type mistakes. Reported-by: Zeal Robot <zealci@zte.com.cn> Signed-off-by: Minghao Chi (CGEL ZTE) <chi.minghao@zte.com.cn> Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org> Link: https://lore.kernel.org/r/20220216030720.1839503-1-chi.minghao@zte.com.cn
Diffstat (limited to 'drivers/rpmsg/qcom_smd.c')
0 files changed, 0 insertions, 0 deletions