Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

net: ethernet: mediatek: Remove -Warray-bounds exception

GCC-12 emits false positive -Warray-bounds warnings with
CONFIG_UBSAN_SHIFT (-fsanitize=shift). This is fixed in GCC 13[1],
and there is top-level Makefile logic to remove -Warray-bounds for
known-bad GCC versions staring with commit f0be87c42cbd ("gcc-12: disable
'-Warray-bounds' universally for now").

Remove the local work-around.

[1] https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105679

Signed-off-by: Kees Cook <keescook@chromium.org>
Signed-off-by: David S. Miller <davem@davemloft.net>

authored by

Kees Cook and committed by
David S. Miller
4af609b2 fb4a5dfc

-5
-5
drivers/net/ethernet/mediatek/Makefile
··· 11 11 endif 12 12 obj-$(CONFIG_NET_MEDIATEK_SOC_WED) += mtk_wed_ops.o 13 13 obj-$(CONFIG_NET_MEDIATEK_STAR_EMAC) += mtk_star_emac.o 14 - 15 - # FIXME: temporarily silence -Warray-bounds on non W=1+ builds 16 - ifndef KBUILD_EXTRA_WARN 17 - CFLAGS_mtk_ppe.o += -Wno-array-bounds 18 - endif