mirror-linux/drivers/net/wwan
Gustavo A. R. Silva eeecf5d3a3 net: wwan: mhi_wwan_mbim: Avoid -Wflex-array-member-not-at-end warning
Use DEFINE_RAW_FLEX() to avoid a -Wflex-array-member-not-at-end warning.

Remove fixed-size array struct usb_cdc_ncm_dpe16 dpe16[2]; from struct
mbim_tx_hdr, so that flex-array member struct mbim_tx_hdr::ndp16.dpe16[]
ends last in this structure.

Compensate for this by using the DEFINE_RAW_FLEX() helper to declare the
on-stack struct instance that contains struct usb_cdc_ncm_ndp16 as a
member. Adjust the rest of the code, accordingly.

So, with these changes fix the following warning:

drivers/net/wwan/mhi_wwan_mbim.c:81:34: warning: structure containing a flexible array member is not at the end of another structure [-Wflex-array-member-not-at-end]

Reviewed-by: Loic Poulain <loic.poulain@oss.qualcomm.com>
Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2025-11-27 17:45:18 -08:00
..
iosm devlink: pass extack through to devlink_param::get() 2025-11-20 19:01:22 -08:00
t7xx net: wwan: t7xx: Make local function static 2025-11-21 18:09:43 -08:00
Kconfig
Makefile
mhi_wwan_ctrl.c
mhi_wwan_mbim.c net: wwan: mhi_wwan_mbim: Avoid -Wflex-array-member-not-at-end warning 2025-11-27 17:45:18 -08:00
qcom_bam_dmux.c net: wwan: Remove redundant pm_runtime_mark_last_busy() calls 2025-10-29 18:55:56 -07:00
rpmsg_wwan_ctrl.c
wwan_core.c net: Use link/peer netns in newlink() of rtnl_link_ops 2025-02-21 15:28:02 -08:00
wwan_hwsim.c net: WQ_PERCPU added to alloc_workqueue users 2025-09-22 17:40:30 -07:00