* [PATCH] drivers/net/wireless/ath/wil6210: Makefile, only -Werror when no -W* in EXTRA_CFLAGS @ 2013-02-27 6:55 Chen Gang 2013-02-27 8:45 ` Vladimir Kondratiev 0 siblings, 1 reply; 5+ messages in thread From: Chen Gang @ 2013-02-27 6:55 UTC (permalink / raw) To: qca_vkondrat, John W. Linville, linux-wireless, wil6210, netdev@vger.kernel.org >> netdev When make with EXTRA_CFLAGS=-W, it will report error. so give a check in Makefile. Signed-off-by: Chen Gang <gang.chen@asianux.com> --- drivers/net/wireless/ath/wil6210/Makefile | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff --git a/drivers/net/wireless/ath/wil6210/Makefile b/drivers/net/wireless/ath/wil6210/Makefile index 9396dc9..d288eea 100644 --- a/drivers/net/wireless/ath/wil6210/Makefile +++ b/drivers/net/wireless/ath/wil6210/Makefile @@ -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__ -- 1.7.7.6 ^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] drivers/net/wireless/ath/wil6210: Makefile, only -Werror when no -W* in EXTRA_CFLAGS 2013-02-27 6:55 [PATCH] drivers/net/wireless/ath/wil6210: Makefile, only -Werror when no -W* in EXTRA_CFLAGS Chen Gang @ 2013-02-27 8:45 ` Vladimir Kondratiev 2013-02-27 8:56 ` Chen Gang 0 siblings, 1 reply; 5+ messages in thread From: Vladimir Kondratiev @ 2013-02-27 8:45 UTC (permalink / raw) To: Chen Gang Cc: John W. Linville, linux-wireless, wil6210, netdev@vger.kernel.org >> netdev On Wednesday, February 27, 2013 02:55:06 PM Chen Gang wrote: > > When make with EXTRA_CFLAGS=-W, it will report error. > so give a check in Makefile. > > Signed-off-by: Chen Gang <gang.chen@asianux.com> > --- > drivers/net/wireless/ath/wil6210/Makefile | 4 +++- > 1 files changed, 3 insertions(+), 1 deletions(-) > > diff --git a/drivers/net/wireless/ath/wil6210/Makefile b/drivers/net/wireless/ath/wil6210/Makefile > index 9396dc9..d288eea 100644 > --- a/drivers/net/wireless/ath/wil6210/Makefile > +++ b/drivers/net/wireless/ath/wil6210/Makefile > @@ -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__ > Acked-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com> 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 ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] drivers/net/wireless/ath/wil6210: Makefile, only -Werror when no -W* in EXTRA_CFLAGS 2013-02-27 8:45 ` Vladimir Kondratiev @ 2013-02-27 8:56 ` Chen Gang 2013-02-27 9:46 ` Vladimir Kondratiev 0 siblings, 1 reply; 5+ messages in thread From: Chen Gang @ 2013-02-27 8:56 UTC (permalink / raw) To: Vladimir Kondratiev Cc: John W. Linville, linux-wireless, wil6210, netdev@vger.kernel.org >> netdev, linux-kernel@vger.kernel.org 于 2013年02月27日 16:45, Vladimir Kondratiev 写道: > On Wednesday, February 27, 2013 02:55:06 PM Chen Gang wrote: >> >> When make with EXTRA_CFLAGS=-W, it will report error. >> so give a check in Makefile. >> >> Signed-off-by: Chen Gang <gang.chen@asianux.com> >> --- >> drivers/net/wireless/ath/wil6210/Makefile | 4 +++- >> 1 files changed, 3 insertions(+), 1 deletions(-) >> >> diff --git a/drivers/net/wireless/ath/wil6210/Makefile b/drivers/net/wireless/ath/wil6210/Makefile >> index 9396dc9..d288eea 100644 >> --- a/drivers/net/wireless/ath/wil6210/Makefile >> +++ b/drivers/net/wireless/ath/wil6210/Makefile >> @@ -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__ >> > Acked-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com> > > 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). :-) > 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 > > > -- Chen Gang Asianux Corporation ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] drivers/net/wireless/ath/wil6210: Makefile, only -Werror when no -W* in EXTRA_CFLAGS 2013-02-27 8:56 ` Chen Gang @ 2013-02-27 9:46 ` Vladimir Kondratiev 2013-02-27 10:01 ` Chen Gang 0 siblings, 1 reply; 5+ messages in thread From: Vladimir Kondratiev @ 2013-02-27 9:46 UTC (permalink / raw) To: Chen Gang Cc: John W. Linville, linux-wireless, wil6210, netdev@vger.kernel.org >> netdev, linux-kernel@vger.kernel.org On Wednesday, February 27, 2013 04:56:57 PM Chen Gang wrote: > 于 2013年02月27日 16:45, Vladimir Kondratiev 写道: > > On Wednesday, February 27, 2013 02:55:06 PM Chen Gang wrote: > >> > >> When make with EXTRA_CFLAGS=-W, it will report error. > >> so give a check in Makefile. > >> > >> Signed-off-by: Chen Gang <gang.chen@asianux.com> > >> --- > >> drivers/net/wireless/ath/wil6210/Makefile | 4 +++- > >> 1 files changed, 3 insertions(+), 1 deletions(-) > >> > >> diff --git a/drivers/net/wireless/ath/wil6210/Makefile b/drivers/net/wireless/ath/wil6210/Makefile > >> index 9396dc9..d288eea 100644 > >> --- a/drivers/net/wireless/ath/wil6210/Makefile > >> +++ b/drivers/net/wireless/ath/wil6210/Makefile > >> @@ -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__ > >> > > Acked-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com> > > > > 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: diff --git a/include/linux/kernel.h b/include/linux/kernel.h index c566927..83e43b7 100644 --- a/include/linux/kernel.h +++ b/include/linux/kernel.h @@ -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 ^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] drivers/net/wireless/ath/wil6210: Makefile, only -Werror when no -W* in EXTRA_CFLAGS 2013-02-27 9:46 ` Vladimir Kondratiev @ 2013-02-27 10:01 ` Chen Gang 0 siblings, 0 replies; 5+ messages in thread From: Chen Gang @ 2013-02-27 10:01 UTC (permalink / raw) To: Vladimir Kondratiev Cc: John W. Linville, linux-wireless, wil6210, netdev@vger.kernel.org >> netdev, linux-kernel@vger.kernel.org 于 2013年02月27日 17:46, 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). :-) > 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: > > diff --git a/include/linux/kernel.h b/include/linux/kernel.h > index c566927..83e43b7 100644 > --- a/include/linux/kernel.h > +++ b/include/linux/kernel.h > @@ -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 > thank you for your demo, it is valuable to me. :-) -- Chen Gang Asianux Corporation ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2013-02-27 10:01 UTC | newest] Thread overview: 5+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2013-02-27 6:55 [PATCH] drivers/net/wireless/ath/wil6210: Makefile, only -Werror when no -W* in EXTRA_CFLAGS Chen Gang 2013-02-27 8:45 ` Vladimir Kondratiev 2013-02-27 8:56 ` Chen Gang 2013-02-27 9:46 ` Vladimir Kondratiev 2013-02-27 10:01 ` Chen Gang
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).