1 From: Jakub Kicinski <kuba@kernel.org>
2 Date: Fri, 20 May 2022 12:56:03 -0700
3 Subject: [PATCH] eth: mtk_eth_soc: silence the GCC 12 array-bounds warning
5 GCC 12 gets upset because in mtk_foe_entry_commit_subflow()
6 this driver allocates a partial structure. The writes are
9 Silence these warnings for now, our build bot runs GCC 12
10 so we won't allow any new instances.
12 Signed-off-by: Jakub Kicinski <kuba@kernel.org>
13 Signed-off-by: David S. Miller <davem@davemloft.net>
16 --- a/drivers/net/ethernet/mediatek/Makefile
17 +++ b/drivers/net/ethernet/mediatek/Makefile
18 @@ -11,3 +11,8 @@ mtk_eth-$(CONFIG_NET_MEDIATEK_SOC_WED) +
20 obj-$(CONFIG_NET_MEDIATEK_SOC_WED) += mtk_wed_ops.o
21 obj-$(CONFIG_NET_MEDIATEK_STAR_EMAC) += mtk_star_emac.o
23 +# FIXME: temporarily silence -Warray-bounds on non W=1+ builds
24 +ifndef KBUILD_EXTRA_WARN
25 +CFLAGS_mtk_ppe.o += -Wno-array-bounds