Re: [PATCH 1/4] Adds -Wshadow=local on KBUILD_HOSTCFLAGS

2018-10-28 Thread Masahiro Yamada
On Fri, Oct 19, 2018 at 8:28 PM David Laight wrote: > > From: Masahiro Yamada > > Sent: 18 October 2018 17:39 > > > > On Thu, Oct 18, 2018 at 6:18 PM Borislav Petkov wrote: > > > > > > On Wed, Oct 17, 2018 at 09:40:53PM -0300, Leonardo Bras wrote: > > > > The idea was to put it as default and fix

RE: [PATCH 1/4] Adds -Wshadow=local on KBUILD_HOSTCFLAGS

2018-10-19 Thread David Laight
From: Masahiro Yamada > Sent: 18 October 2018 17:39 > > On Thu, Oct 18, 2018 at 6:18 PM Borislav Petkov wrote: > > > > On Wed, Oct 17, 2018 at 09:40:53PM -0300, Leonardo Bras wrote: > > > The idea was to put it as default and fix all the shadowing warnings. > > > What do you think? I am open to

Re: [PATCH 1/4] Adds -Wshadow=local on KBUILD_HOSTCFLAGS

2018-10-19 Thread Borislav Petkov
On Fri, Oct 19, 2018 at 11:41:31AM +0900, Masahiro Yamada wrote: > Adding -Wshadow to KBUILD_HOSTCFLAGS emits another warning in Kconfig. > Of course, it is easy to fix. > But, I just started to think this option is a kind of harsh... What is more, if we added -Wshadow to KBUILD_HOSTCFLAGS, then t

Re: [PATCH 1/4] Adds -Wshadow=local on KBUILD_HOSTCFLAGS

2018-10-18 Thread Leonardo Bras
On Thu, Oct 18, 2018 at 11:42 PM Masahiro Yamada wrote: > Adding -Wshadow to KBUILD_HOSTCFLAGS emits another warning in Kconfig. > Of course, it is easy to fix. For v2, I already replaced '-Wshadow=local' for '-Wshadow' and fixed this warning. > But, I just started to think this option is a kind

Re: [PATCH 1/4] Adds -Wshadow=local on KBUILD_HOSTCFLAGS

2018-10-18 Thread Masahiro Yamada
On Fri, Oct 19, 2018 at 1:53 AM Borislav Petkov wrote: > > On Fri, Oct 19, 2018 at 01:39:21AM +0900, Masahiro Yamada wrote: > > It is not realistic to enable this warning option by default. > > I believe the question is whether to enable that warning by default in > KBUILD_HOSTCFLAGS. Enabling it

Re: [PATCH 1/4] Adds -Wshadow=local on KBUILD_HOSTCFLAGS

2018-10-18 Thread Borislav Petkov
On Fri, Oct 19, 2018 at 01:39:21AM +0900, Masahiro Yamada wrote: > It is not realistic to enable this warning option by default. I believe the question is whether to enable that warning by default in KBUILD_HOSTCFLAGS. Enabling it by default for the target kernel is of course, too noisy. That's wh

Re: [PATCH 1/4] Adds -Wshadow=local on KBUILD_HOSTCFLAGS

2018-10-18 Thread Masahiro Yamada
On Thu, Oct 18, 2018 at 6:18 PM Borislav Petkov wrote: > > On Wed, Oct 17, 2018 at 09:40:53PM -0300, Leonardo Bras wrote: > > The idea was to put it as default and fix all the shadowing warnings. > > What do you think? I am open to suggestions. > > That's Masahiro's call. In the rest of the kerne

Re: [PATCH 1/4] Adds -Wshadow=local on KBUILD_HOSTCFLAGS

2018-10-18 Thread Borislav Petkov
On Wed, Oct 17, 2018 at 09:40:53PM -0300, Leonardo Bras wrote: > The idea was to put it as default and fix all the shadowing warnings. > What do you think? I am open to suggestions. That's Masahiro's call. In the rest of the kernel, those warnings are behind the W=2 switch - i.e., not enabled by

Re: [PATCH 1/4] Adds -Wshadow=local on KBUILD_HOSTCFLAGS

2018-10-17 Thread Leonardo Bras
Hello Boris, > Next question: why not -Wshadow simply? Good question. I can change it to -Wshadow and fix stuff for v2. > > Also, -Wshadow for the target compiler is an extra warning (W=2). Why is > it enabled by default here? The idea was to put it as default and fix all the shadowing warning

Re: [PATCH 1/4] Adds -Wshadow=local on KBUILD_HOSTCFLAGS

2018-10-17 Thread Leonardo Bras
On Wed, Oct 17, 2018 at 5:21 AM Masahiro Yamada wrote: > > On Wed, Oct 17, 2018 at 5:11 PM Borislav Petkov wrote: > > > > On Tue, Oct 16, 2018 at 09:08:09PM -0300, Leonardo Brás wrote: > > > Adds -Wshadow=local on KBUILD_HOSTCFLAGS to show shadow warnings > > > on tools built for HOST. > > > > >

Re: [PATCH 1/4] Adds -Wshadow=local on KBUILD_HOSTCFLAGS

2018-10-17 Thread Borislav Petkov
On Wed, Oct 17, 2018 at 05:21:01PM +0900, Masahiro Yamada wrote: > scripts/Makefile.extrawarn provides options for the target compiler (CC), > whereas this patch adds -Wshadow=local for the host compiler (HOSTCC). Aha, this wants to fix shadowing for the host tools, ok. Next question: why not -Ws

Re: [PATCH 1/4] Adds -Wshadow=local on KBUILD_HOSTCFLAGS

2018-10-17 Thread Masahiro Yamada
On Wed, Oct 17, 2018 at 5:11 PM Borislav Petkov wrote: > > On Tue, Oct 16, 2018 at 09:08:09PM -0300, Leonardo Brás wrote: > > Adds -Wshadow=local on KBUILD_HOSTCFLAGS to show shadow warnings > > on tools built for HOST. > > > > Signed-off-by: Leonardo Brás > > --- > > Makefile | 2 +- > > 1 file

Re: [PATCH 1/4] Adds -Wshadow=local on KBUILD_HOSTCFLAGS

2018-10-17 Thread Borislav Petkov
On Tue, Oct 16, 2018 at 09:08:09PM -0300, Leonardo Brás wrote: > Adds -Wshadow=local on KBUILD_HOSTCFLAGS to show shadow warnings > on tools built for HOST. > > Signed-off-by: Leonardo Brás > --- > Makefile | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/Makefile b/Make