From: Jakub Kicinski Date: Fri, 20 May 2022 19:56:03 +0000 (-0700) Subject: eth: mtk_eth_soc: silence the GCC 12 array-bounds warning X-Git-Tag: howlett/maple/20220722_2~466^2~15^2~2 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=06da3e8f390aba135ae8808e9424e8a68e53d261;p=users%2Fjedix%2Flinux-maple.git eth: mtk_eth_soc: silence the GCC 12 array-bounds warning 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 Signed-off-by: David S. Miller --- diff --git a/drivers/net/ethernet/mediatek/Makefile b/drivers/net/ethernet/mediatek/Makefile index 45ba0970504a..fe66ba8793cf 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 += -Wno-array-bounds +endif