[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20220520194320.2356236-8-kuba@kernel.org>
Date: Fri, 20 May 2022 12:43:19 -0700
From: Jakub Kicinski <kuba@...nel.org>
To: kvalo@...nel.org, johannes@...solutions.net
Cc: netdev@...r.kernel.org, linux-wireless@...r.kernel.org,
Jakub Kicinski <kuba@...nel.org>,
libertas-dev@...ts.infradead.org
Subject: [PATCH net-next 7/8] wifi: libertas: silence a GCC 12 -Warray-bounds warning
This driver does a lot of casting of smaller buffers to
a larger command response struct, GCC 12 does not like that:
drivers/net/wireless/marvell/libertas/cfg.c:1198:63: warning: array subscript ‘struct cmd_ds_802_11_associate_response[0]’ is partly outside array bounds of ‘unsigned char[203]’ [-Warray-bounds]
1198 | "aid 0x%04x\n", status, le16_to_cpu(resp->statuscode),
| ^~
Annoyingly it's not clever enough to recognize which fields
are safe to access, so move this warning to W=1 for now.
Signed-off-by: Jakub Kicinski <kuba@...nel.org>
---
CC: kvalo@...nel.org
CC: libertas-dev@...ts.infradead.org
CC: linux-wireless@...r.kernel.org
---
drivers/net/wireless/marvell/libertas/Makefile | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/drivers/net/wireless/marvell/libertas/Makefile b/drivers/net/wireless/marvell/libertas/Makefile
index 41b9b440a542..da4ea5a0812c 100644
--- a/drivers/net/wireless/marvell/libertas/Makefile
+++ b/drivers/net/wireless/marvell/libertas/Makefile
@@ -10,6 +10,11 @@ libertas-y += tx.o
libertas-y += firmware.o
libertas-$(CONFIG_LIBERTAS_MESH) += mesh.o
+# FIXME: temporarily silence -Warray-bounds on non W=1+ builds
+ifndef KBUILD_EXTRA_WARN
+CFLAGS_cfg.o += -Wno-array-bounds
+endif
+
usb8xxx-objs += if_usb.o
libertas_cs-objs += if_cs.o
libertas_sdio-objs += if_sdio.o
--
2.34.3
Powered by blists - more mailing lists