drivers/net/wireless/ath/wil6210: Makefile, only -Werror when no -W* in EXTRA_CFLAGS
Subsystems (3)
PATCH 1/1 drivers/net/wireless/ath/wil6210: Makefile, only -Werror when no -W* in EXTRA_CFLAGS
When make with EXTRA_CFLAGS=-W, it will report error. so give a check in Makefile.
--- drivers/net/wireless/ath/wil6210/Makefile | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-)
drivers/net/wireless/ath/wil6210/Makefile +3 -1
@@ -9,5 +9,7 @@ wil6210-objs += wmi.o wil6210-objs += interrupt.o wil6210-objs += txrx.o -subdir-ccflags-y += -Werror +ifeq (, $(findstring -W,$(EXTRA_CFLAGS))) + subdir-ccflags-y += -Werror +endif subdir-ccflags-y += -D__CHECK_ENDIAN__
Signature · 1 line
1.7.7.6
Quoted 15 lines · Chen Gang
When make with EXTRA_CFLAGS=-W, it will report error. so give a check in
Makefile.Signed-off-by Chen Gang <[email protected]>--- drivers/net/wireless/ath/wil6210/Makefile | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-)drivers/net/wireless/ath/wil6210/Makefile +0
-0
drivers/net/wireless/ath/wil6210/Makefile wil6210-objs += wmi.o · line 15
Quoted 8 lines
drivers/net/wireless/ath/wil6210/Makefile +3
-1@@ -9,5 +9,7 @@ wil6210-objs += wmi.o wil6210-objs += interrupt.o wil6210-objs += txrx.o -subdir-ccflags-y += -Werror +ifeq (, $(findstring -W,$(EXTRA_CFLAGS))) + subdir-ccflags-y += -Werror +endif subdir-ccflags-y += -D__CHECK_ENDIAN__
Well, agree; -W triggers lots of warnings, I suspect all other places that use -Werror should be problematic. Worth fixing all others? Quick look for v3.8 raises:
linux$ find . -name Makefile | xargs grep -e -Werror
./arch/sh/lib/Makefile:ccflags-y := -Werror
./arch/sh/kernel/Makefile:ccflags-y := -Werror
./arch/sh/mm/Makefile:ccflags-y := -Werror
./arch/sh/cchips/hd6446x/Makefile:ccflags-y := -Werror
./arch/sparc/prom/Makefile:ccflags := -Werror
./arch/sparc/lib/Makefile:ccflags-y := -Werror
./arch/sparc/kernel/Makefile:ccflags-y := -Werror
./arch/sparc/mm/Makefile:ccflags-y := -Werror
./arch/alpha/lib/Makefile:ccflags-y := -Werror
./arch/alpha/oprofile/Makefile:ccflags-y := -Werror -Wno-sign-compare
./arch/alpha/mm/Makefile:ccflags-y := -Werror ./arch/powerpc/kvm/Makefile:subdir-ccflags-$(CONFIG_PPC_WERROR) := -Werror ./arch/powerpc/lib/Makefile:subdir-ccflags-$(CONFIG_PPC_WERROR) := -Werror ./arch/powerpc/kernel/Makefile:subdir-ccflags-$(CONFIG_PPC_WERROR) := -Werror ./arch/powerpc/oprofile/Makefile:subdir-ccflags-$(CONFIG_PPC_WERROR) := -Werror ./arch/powerpc/xmon/Makefile:subdir-ccflags-$(CONFIG_PPC_WERROR) := -Werror ./arch/powerpc/mm/Makefile:subdir-ccflags-$(CONFIG_PPC_WERROR) := -Werror ./arch/powerpc/sysdev/Makefile:subdir-ccflags-$(CONFIG_PPC_WERROR) := -Werror ./arch/powerpc/sysdev/Makefile:subdir-ccflags-$(CONFIG_PPC_WERROR) := -Werror ./arch/powerpc/sysdev/xics/Makefile:subdir-ccflags-$(CONFIG_PPC_WERROR) := -Werror ./arch/powerpc/platforms/Makefile:subdir-ccflags-$(CONFIG_PPC_WERROR) := -Werror ./arch/powerpc/perf/Makefile:subdir-ccflags-$(CONFIG_PPC_WERROR) := -Werror
./Makefile: -Werror-implicit-function-declaration \./tools/perf/Makefile: CFLAGS_WERROR := -Werror
./tools/perf/Makefile:ifeq ($(call try-cc,$(SOURCE_HELLO),$(CFLAGS) -Werror -fstack-protector-all,-fstack-protector-all),y) ./tools/perf/Makefile:ifeq ($(call try-cc,$(SOURCE_HELLO),$(CFLAGS) -Werror -Wstack-protector,-Wstack-protector),y) ./tools/perf/Makefile:ifeq ($(call try-cc,$(SOURCE_HELLO),$(CFLAGS) -Werror -Wvolatile-register-var,-Wvolatile-register-var),y) ./drivers/scsi/lpfc/Makefile:ccflags-y += -Werror
./drivers/scsi/aic7xxx/Makefile:ccflags-y += -Werror
./drivers/staging/omapdrm/Makefile:ccflags-y := -Iinclude/drm -Werror ./drivers/net/wireless/ath/wil6210/Makefile:subdir-ccflags-y += -Werror
Quoted 26 lines · Vladimir Kondratiev
Quoted 15 lines · Chen Gang
When make with EXTRA_CFLAGS=-W, it will report error. so give a check in
Makefile.Signed-off-by Chen Gang <[email protected]>--- drivers/net/wireless/ath/wil6210/Makefile | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-)drivers/net/wireless/ath/wil6210/Makefile +0
-0drivers/net/wireless/ath/wil6210/Makefile wil6210-objs += wmi.o · line 15
Quoted 8 lines
drivers/net/wireless/ath/wil6210/Makefile +3
-1@@ -9,5 +9,7 @@ wil6210-objs += wmi.o wil6210-objs += interrupt.o wil6210-objs += txrx.o -subdir-ccflags-y += -Werror +ifeq (, $(findstring -W,$(EXTRA_CFLAGS))) + subdir-ccflags-y += -Werror +endif subdir-ccflags-y += -D__CHECK_ENDIAN__
Quoted 3 lines
Well, agree; -W triggers lots of warnings, I suspect all other places that use -Werror should be problematic. Worth fixing all others? Quick look for v3.8 raises:
thank you for your suggestion.
after this patch applied, I will do for others (let you as signed-of-by, too).
:-)
Quoted 35 lines
linux$ find . -name
Makefile| xargs grep -e -Werror
./arch/sh/lib/Makefile:ccflags-y := -Werror
./arch/sh/kernel/Makefile:ccflags-y := -Werror
./arch/sh/mm/Makefile:ccflags-y := -Werror
./arch/sh/cchips/hd6446x/Makefile:ccflags-y := -Werror
./arch/sparc/prom/Makefile:ccflags := -Werror
./arch/sparc/lib/Makefile:ccflags-y := -Werror
./arch/sparc/kernel/Makefile:ccflags-y := -Werror
./arch/sparc/mm/Makefile:ccflags-y := -Werror
./arch/alpha/lib/Makefile:ccflags-y := -Werror
./arch/alpha/oprofile/Makefile:ccflags-y := -Werror -Wno-sign-compare
./arch/alpha/mm/Makefile:ccflags-y := -Werror ./arch/powerpc/kvm/Makefile:subdir-ccflags-$(CONFIG_PPC_WERROR) := -Werror ./arch/powerpc/lib/Makefile:subdir-ccflags-$(CONFIG_PPC_WERROR) := -Werror ./arch/powerpc/kernel/Makefile:subdir-ccflags-$(CONFIG_PPC_WERROR) := -Werror ./arch/powerpc/oprofile/Makefile:subdir-ccflags-$(CONFIG_PPC_WERROR) := -Werror ./arch/powerpc/xmon/Makefile:subdir-ccflags-$(CONFIG_PPC_WERROR) := -Werror ./arch/powerpc/mm/Makefile:subdir-ccflags-$(CONFIG_PPC_WERROR) := -Werror ./arch/powerpc/sysdev/Makefile:subdir-ccflags-$(CONFIG_PPC_WERROR) := -Werror ./arch/powerpc/sysdev/Makefile:subdir-ccflags-$(CONFIG_PPC_WERROR) := -Werror ./arch/powerpc/sysdev/xics/Makefile:subdir-ccflags-$(CONFIG_PPC_WERROR) := -Werror ./arch/powerpc/platforms/Makefile:subdir-ccflags-$(CONFIG_PPC_WERROR) := -Werror ./arch/powerpc/perf/Makefile:subdir-ccflags-$(CONFIG_PPC_WERROR) := -Werror
./Makefile: -Werror-implicit-function-declaration \./tools/perf/Makefile:CFLAGS_WERROR:= -Werror
./tools/perf/Makefile:ifeq ($(call try-cc,$(SOURCE_HELLO),$(CFLAGS) -Werror -fstack-protector-all,-fstack-protector-all),y) ./tools/perf/Makefile:ifeq ($(call try-cc,$(SOURCE_HELLO),$(CFLAGS) -Werror -Wstack-protector,-Wstack-protector),y) ./tools/perf/Makefile:ifeq ($(call try-cc,$(SOURCE_HELLO),$(CFLAGS) -Werror -Wvolatile-register-var,-Wvolatile-register-var),y) ./drivers/scsi/lpfc/Makefile:ccflags-y += -Werror
./drivers/scsi/aic7xxx/Makefile:ccflags-y += -Werror
./drivers/staging/omapdrm/Makefile:ccflags-y := -Iinclude/drm -Werror ./drivers/net/wireless/ath/wil6210/Makefile:subdir-ccflags-y += -Werror
Signature · 3 lines
Chen Gang Asianux Corporation
Quoted 27 lines · Chen Gang
Quoted 26 lines · Vladimir Kondratiev
Quoted 15 lines · Chen Gang
When make with EXTRA_CFLAGS=-W, it will report error. so give a check in
Makefile.Signed-off-by Chen Gang <[email protected]>--- drivers/net/wireless/ath/wil6210/Makefile | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-)drivers/net/wireless/ath/wil6210/Makefile +0
-0drivers/net/wireless/ath/wil6210/Makefile wil6210-objs += wmi.o · line 15
Quoted 8 lines
drivers/net/wireless/ath/wil6210/Makefile +3
-1@@ -9,5 +9,7 @@ wil6210-objs += wmi.o wil6210-objs += interrupt.o wil6210-objs += txrx.o -subdir-ccflags-y += -Werror +ifeq (, $(findstring -W,$(EXTRA_CFLAGS))) + subdir-ccflags-y += -Werror +endif subdir-ccflags-y += -D__CHECK_ENDIAN__
Quoted 6 lines
Quoted 3 lines
Well, agree; -W triggers lots of warnings, I suspect all other places that use -Werror should be problematic. Worth fixing all others? Quick look for v3.8 raises:
thank you for your suggestion.
after this patch applied, I will do for others (let you as signed-of-by, too).
Perhaps, it would be good idea to fight the original problem.
I mean, fix warnings where possible. Example: there are lots of "unused parameter" ones. Where it is false warning, add __maybe_unused attribute. Like this:
include/linux/kernel.h +3 -2
@@ -163,8 +163,9 @@ extern int _cond_resched(void);# define might_sleep () \ do { __might_sleep(__FILE__, __LINE__, 0); might_resched(); } while (0)#else -static inline void __might_sleep (const char *file,int line, -int preempt_offset) { } +static inline void __might_sleep (const char *file__maybe_unused , +int line__maybe_unused , +int preempt_offset__maybe_unused ) { }# define might_sleep () do { might_resched(); } while (0)#endif
Quoted 2 lines · Vladimir Kondratiev
Perhaps, it would be good idea to fight the original problem.
if my another 'beautify code' patches are applied into next-* tree.
(that means most of members think it is a good idea).
I will process the original problems (when processing, also cc to you).
:-)
Quoted 10 lines
I mean, fix warnings where possible. Example: there are lots of "unused parameter" ones. Where it is false warning, add
__maybe_unusedattribute. Like this:include/linux/kernel.h +0
-0@@ -163,8 +163,9 @@ extern int _cond_resched(void);# define might_sleep () \
include/linux/kernel.h extern int _cond_resched(void); · line 171
Quoted 10 lines
include/linux/kernel.h +3
-2do { __might_sleep(__FILE__, __LINE__, 0); might_resched(); } while (0)#else -static inline void __might_sleep (const char *file,int line, -int preempt_offset) { } +static inline void __might_sleep (const char *file__maybe_unused , +int line__maybe_unused , +int preempt_offset__maybe_unused ) { }# define might_sleep () do { might_resched(); } while (0)#endif
thank you for your demo, it is valuable to me.
:-)
Signature · 3 lines
Chen Gang Asianux Corporation