Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

net: ipa: fix QMI structure definition bugs

Building with "W=1" did exactly what it was supposed to do, namely
point out some suspicious-looking code to be verified not to contain
bugs.

Some QMI message structures defined in "ipa_qmi_msg.c" contained
some bad field names (duplicating the "elem_size" field instead of
defining the "offset" field), almost certainly due to copy/paste
errors that weren't obvious in a scan of the code. Fix these bugs.

Fixes: 530f9216a953 ("soc: qcom: ipa: AP/modem communications")
Signed-off-by: Alex Elder <elder@linaro.org>
Signed-off-by: David S. Miller <davem@davemloft.net>

authored by

Alex Elder and committed by
David S. Miller
74478ea4 34fe5a1c

+3 -3
+3 -3
drivers/net/ipa/ipa_qmi_msg.c
··· 119 119 sizeof_field(struct ipa_driver_init_complete_rsp, 120 120 rsp), 121 121 .tlv_type = 0x02, 122 - .elem_size = offsetof(struct ipa_driver_init_complete_rsp, 122 + .offset = offsetof(struct ipa_driver_init_complete_rsp, 123 123 rsp), 124 124 .ei_array = qmi_response_type_v01_ei, 125 125 }, ··· 137 137 sizeof_field(struct ipa_init_complete_ind, 138 138 status), 139 139 .tlv_type = 0x02, 140 - .elem_size = offsetof(struct ipa_init_complete_ind, 140 + .offset = offsetof(struct ipa_init_complete_ind, 141 141 status), 142 142 .ei_array = qmi_response_type_v01_ei, 143 143 }, ··· 218 218 sizeof_field(struct ipa_init_modem_driver_req, 219 219 platform_type_valid), 220 220 .tlv_type = 0x10, 221 - .elem_size = offsetof(struct ipa_init_modem_driver_req, 221 + .offset = offsetof(struct ipa_init_modem_driver_req, 222 222 platform_type_valid), 223 223 }, 224 224 {