aa98745ac60e5b9778f5246ed584dbcc0246e192
[openwrt/staging/blocktrron.git] /
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
4
5 GCC 12 gets upset because in mtk_foe_entry_commit_subflow()
6 this driver allocates a partial structure. The writes are
7 within bounds.
8
9 Silence these warnings for now, our build bot runs GCC 12
10 so we won't allow any new instances.
11
12 Signed-off-by: Jakub Kicinski <kuba@kernel.org>
13 Signed-off-by: David S. Miller <davem@davemloft.net>
14 ---
15
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) +
19 endif
20 obj-$(CONFIG_NET_MEDIATEK_SOC_WED) += mtk_wed_ops.o
21 obj-$(CONFIG_NET_MEDIATEK_STAR_EMAC) += mtk_star_emac.o
22 +
23 +# FIXME: temporarily silence -Warray-bounds on non W=1+ builds
24 +ifndef KBUILD_EXTRA_WARN
25 +CFLAGS_mtk_ppe.o += -Wno-array-bounds
26 +endif