Blob Blame History Raw
From: "Jiri Slaby (SUSE)" <jirislaby@kernel.org>
Date: Thu, 16 Mar 2023 12:05:08 +0100
Subject: net/wwan/t7xx: disable Werror
Patch-mainline: never, gcc will be fixed: PR#109215
References: bsc#1209724

The t7xx driver is built with -Werror, but this causes issues with
gcc-13:
 In file included from ./arch/s390/include/generated/asm/rwonce.h:1,
                  from ../include/linux/compiler.h:247,
                  from ../include/linux/build_bug.h:5,
                  from ../include/linux/bits.h:22,
                  from ../drivers/net/wwan/t7xx/t7xx_state_monitor.c:17:
 In function 'preempt_count',
     inlined from 't7xx_fsm_append_event' at ../drivers/net/wwan/t7xx/t7xx_state_monitor.c:439:43:
 ../include/asm-generic/rwonce.h:44:26: error: array subscript 0 is outside array bounds of 'const volatile int[0]' [-Werror=array-bounds=]
    44 | #define __READ_ONCE(x)  (*(const volatile __unqual_scalar_typeof(x) *)&(x))
       |                         ~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 ../include/asm-generic/rwonce.h:50:9: note: in expansion of macro '__READ_ONCE'
    50 |         __READ_ONCE(x);                                                 \
       |         ^~~~~~~~~~~
 ../arch/s390/include/asm/preempt.h:17:16: note: in expansion of macro 'READ_ONCE'
    17 |         return READ_ONCE(S390_lowcore.preempt_count) & ~PREEMPT_NEED_RESCHED;
       |                ^~~~~~~~~

Let's drop -Werror until gcc is fixed.

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
---
 drivers/net/wwan/t7xx/Makefile |    2 --
 1 file changed, 2 deletions(-)

--- a/drivers/net/wwan/t7xx/Makefile
+++ b/drivers/net/wwan/t7xx/Makefile
@@ -1,7 +1,5 @@
 # SPDX-License-Identifier: GPL-2.0-only
 
-ccflags-y += -Werror
-
 obj-${CONFIG_MTK_T7XX} := mtk_t7xx.o
 mtk_t7xx-y:=	t7xx_pci.o \
 		t7xx_pcie_mac.o \