soc: qcom: smem: Use struct_size()
authorChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Wed, 12 Jul 2023 20:42:15 +0000 (22:42 +0200)
committerBjorn Andersson <andersson@kernel.org>
Fri, 14 Jul 2023 03:21:26 +0000 (20:21 -0700)
commitcbdd13bfea785667f9c9df4c6ec46fc841ef6c4a
tree3c02391ab753569084bddf8a8cec01210e076539
parent7bc1cfaee1f03008e8b1fd29e621cb50a9512263
soc: qcom: smem: Use struct_size()

Use struct_size() instead of hand-writing it, when allocating a structure
with a flex array.

This is less verbose.

Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Reviewed-by: Kees Cook <keescook@chromium.org>
Link: https://lore.kernel.org/r/f74328551cfab0262ba353f37d047ac74bf616e1.1689194490.git.christophe.jaillet@wanadoo.fr
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
drivers/soc/qcom/smem.c