]> git.baikalelectronics.ru Git - kernel.git/commit
net: ipa: use struct_size() for the interconnect array
authorAlex Elder <elder@linaro.org>
Fri, 11 Mar 2022 16:24:23 +0000 (10:24 -0600)
committerJakub Kicinski <kuba@kernel.org>
Sat, 12 Mar 2022 06:50:07 +0000 (22:50 -0800)
commitecb843fea370d791fdf024dd35ed20015b1d80bf
tree5cb4538b60f7b4c578065add9b553c8500f730a1
parent6cba55462b0f8e9d377a31428796eafaa9be3439
net: ipa: use struct_size() for the interconnect array

In review for commit 12f4822fd9cb4 ("net: ipa: embed interconnect
array in the power structure"), Jakub Kicinski suggested that a
follow-up patch use struct_size() when computing the size of the
IPA power structure, which ends with a flexible array member.

Do that.

Suggested-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Alex Elder <elder@linaro.org>
Link: https://lore.kernel.org/r/20220311162423.872645-1-elder@linaro.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ipa/ipa_power.c