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)
commitcb631a6398192f79f33a2480517c272120985020
tree5cb4538b60f7b4c578065add9b553c8500f730a1
parent0b3660695e80d53d1bab5b458f3a897a2c427a59
net: ipa: use struct_size() for the interconnect array

In review for commit 8ee7ec4890e2b ("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