public inbox for linux-kbuild@vger.kernel.org
 help / color / mirror / Atom feed
* Re: [PATCH] trivial: disable sparse' warning for "potentially expensive pointer subtraction".
       [not found] <1282321333.25235.0.camel@thorin>
@ 2010-09-23 11:23 ` Jiri Kosina
  2010-09-23 12:41   ` Bernd Petrovitsch
  0 siblings, 1 reply; 2+ messages in thread
From: Jiri Kosina @ 2010-09-23 11:23 UTC (permalink / raw)
  To: Bernd Petrovitsch
  Cc: linux-kbuild, Namhyung Kim, Andi Kleen, Arnd Bergmann, linux-arch,
	linux-kernel, dhowells, MXns RullgXrd

On Fri, 20 Aug 2010, Bernd Petrovitsch wrote:

> Rationale: With a somewhat current gcc (or a somewhat sane peephole
> optimizer), the (expensive) "div" is converted to a "shift" or
> "mul" with the inverse.
> This warning is disabled per default in sparse but the "-Wall" in
> the kernels CFLAGS enables it.
> 
> Signed-off-by: Bernd Petrovitsch <bernd@sysprog.at>
> ---
> This patch is trivial and affects only calls to sparse (read: make C=1) and
> removes false warnings. So it should be considered for inclusion immediately.
> 
> Sorry for the long Cc: - I included everyone in the thread and added
> linux-kbuild@ (as it IMHO belongs there) and trivial@ (because of the
> complexity of the patch).
> 
>  Makefile |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/Makefile b/Makefile
> index f3bdff8..851c0fa 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -330,7 +330,7 @@ PERL		= perl
>  CHECK		= sparse
>  
>  CHECKFLAGS     := -D__linux__ -Dlinux -D__STDC__ -Dunix -D__unix__ \
> -		  -Wbitwise -Wno-return-void $(CF)
> +		  -Wbitwise -Wno-return-void -Wno-ptr-subtraction-blows $(CF)
>  CFLAGS_MODULE   =
>  AFLAGS_MODULE   =
>  LDFLAGS_MODULE  =

What is the status of this patch? I don't see it Nacked, but it's not in 
linux-next either.

Thanks,

-- 
Jiri Kosina
SUSE Labs, Novell Inc.

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] trivial: disable sparse' warning for "potentially expensive pointer subtraction".
  2010-09-23 11:23 ` [PATCH] trivial: disable sparse' warning for "potentially expensive pointer subtraction" Jiri Kosina
@ 2010-09-23 12:41   ` Bernd Petrovitsch
  0 siblings, 0 replies; 2+ messages in thread
From: Bernd Petrovitsch @ 2010-09-23 12:41 UTC (permalink / raw)
  To: Jiri Kosina
  Cc: linux-kbuild, Namhyung Kim, Andi Kleen, Arnd Bergmann, linux-arch,
	linux-kernel, dhowells, MXns RullgXrd, linux-sparse

Also Cc:ed linux-sparse@vger.kernel.org

On Don, 2010-09-23 at 13:23 +0200, Jiri Kosina wrote:
> On Fri, 20 Aug 2010, Bernd Petrovitsch wrote:
> 
> > Rationale: With a somewhat current gcc (or a somewhat sane peephole
> > optimizer), the (expensive) "div" is converted to a "shift" or
> > "mul" with the inverse.
> > This warning is disabled per default in sparse but the "-Wall" in
> > the kernels CFLAGS enables it.
> > 
> > Signed-off-by: Bernd Petrovitsch <bernd@sysprog.at>
> > ---
> > This patch is trivial and affects only calls to sparse (read: make C=1) and
> > removes false warnings. So it should be considered for inclusion immediately.
> > 
> > Sorry for the long Cc: - I included everyone in the thread and added
> > linux-kbuild@ (as it IMHO belongs there) and trivial@ (because of the
> > complexity of the patch).
> > 
> >  Makefile |    2 +-
> >  1 files changed, 1 insertions(+), 1 deletions(-)
> > 
> > diff --git a/Makefile b/Makefile
> > index f3bdff8..851c0fa 100644
> > --- a/Makefile
> > +++ b/Makefile
> > @@ -330,7 +330,7 @@ PERL		= perl
> >  CHECK		= sparse
> >  
> >  CHECKFLAGS     := -D__linux__ -Dlinux -D__STDC__ -Dunix -D__unix__ \
> > -		  -Wbitwise -Wno-return-void $(CF)
> > +		  -Wbitwise -Wno-return-void -Wno-ptr-subtraction-blows $(CF)
> >  CFLAGS_MODULE   =
> >  AFLAGS_MODULE   =
> >  LDFLAGS_MODULE  =
> 
> What is the status of this patch? I don't see it Nacked, but it's not in 
> linux-next either.

More details:

The head (as in
git://git.kernel.org/pub/scm/devel/sparse/chrisl/sparse.git) has "-Wall"
renamed to "-Wsparse-all". So the above patch is pretty pointless.

But sparse-0.4.2 - the latest release according to
https://sparse.wiki.kernel.org/index.php/Main_Page - hasn't that
renamed.

	Bernd
-- 
mobile: +43 664 4416156              http://www.sysprog.at/
    Linux Software Development, Consulting and Services


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2010-09-23 12:42 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <1282321333.25235.0.camel@thorin>
2010-09-23 11:23 ` [PATCH] trivial: disable sparse' warning for "potentially expensive pointer subtraction" Jiri Kosina
2010-09-23 12:41   ` Bernd Petrovitsch

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox