netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next] eth: mtk_eth_soc: silence the GCC 12 array-bounds warning
@ 2022-05-20  5:59 Jakub Kicinski
  2022-05-20 13:06 ` Andrew Lunn
  0 siblings, 1 reply; 3+ messages in thread
From: Jakub Kicinski @ 2022-05-20  5:59 UTC (permalink / raw)
  To: davem
  Cc: netdev, edumazet, pabeni, keescook, Jakub Kicinski, nbd, john,
	sean.wang, Mark-MC.Lee, matthias.bgg

GCC 12 gets upset because in mtk_foe_entry_commit_subflow()
this driver allocates a partial structure. The writes are
within bounds.

Silence these warnings for now, our build bot runs GCC 12
so we won't allow any new instances.

Signed-off-by: Jakub Kicinski <kuba@kernel.org>
---
CC: nbd@nbd.name
CC: john@phrozen.org
CC: sean.wang@mediatek.com
CC: Mark-MC.Lee@mediatek.com
CC: matthias.bgg@gmail.com
---
 drivers/net/ethernet/mediatek/Makefile | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/drivers/net/ethernet/mediatek/Makefile b/drivers/net/ethernet/mediatek/Makefile
index 45ba0970504a..611f7b4d4eb8 100644
--- a/drivers/net/ethernet/mediatek/Makefile
+++ b/drivers/net/ethernet/mediatek/Makefile
@@ -11,3 +11,8 @@ mtk_eth-$(CONFIG_NET_MEDIATEK_SOC_WED) += mtk_wed_debugfs.o
 endif
 obj-$(CONFIG_NET_MEDIATEK_SOC_WED) += mtk_wed_ops.o
 obj-$(CONFIG_NET_MEDIATEK_STAR_EMAC) += mtk_star_emac.o
+
+# FIXME: temporarily silence -Warray-bounds on non W=1 builds
+ifndef KBUILD_EXTRA_WARN
+CFLAGS_mtk_ppe.o += $(call cc-disable-warning, array-bounds)
+endif
-- 
2.34.3


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-05-20 16:43 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-05-20  5:59 [PATCH net-next] eth: mtk_eth_soc: silence the GCC 12 array-bounds warning Jakub Kicinski
2022-05-20 13:06 ` Andrew Lunn
2022-05-20 16:43   ` Jakub Kicinski

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).