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

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