[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1921426.IqHmmMU5eP@lx-vladimir>
Date: Wed, 27 Feb 2013 11:46:37 +0200
From: Vladimir Kondratiev <qca_vkondrat@....qualcomm.com>
To: Chen Gang <gang.chen@...anux.com>
CC: "John W. Linville" <linville@...driver.com>,
<linux-wireless@...r.kernel.org>, <wil6210@....qualcomm.com>,
"netdev@...r.kernel.org >> netdev" <netdev@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] drivers/net/wireless/ath/wil6210: Makefile, only -Werror when no -W* in EXTRA_CFLAGS
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@...anux.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@....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
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists