mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Jesper Juhl <juhl-lkml@dif.dk>
To: Linus Torvalds <torvalds@osdl.org>
Cc: Matthew Wilcox <matthew@wil.cx>,
	linux-kernel <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] Remove pointless <0 comparison for unsigned variable in fs/fcntl.c
Date: Wed, 24 Nov 2004 00:16:10 +0100 (CET)	[thread overview]
Message-ID: <Pine.LNX.4.61.0411240011310.3389@dragon.hygekrogen.localhost> (raw)
In-Reply-To: <Pine.LNX.4.58.0411231035500.20993@ppc970.osdl.org>

On Tue, 23 Nov 2004, Linus Torvalds wrote:
> 
> 
> On Tue, 23 Nov 2004, Jesper Juhl wrote:
> >
> > Shutting up gcc is not the primary goal here, the goal is/was to  
> > a) review the code and make sure that it is safe and correct, and fix it 
> > when it is not.
> > b) remove comparisons that are just a waste of CPU cycles when the result 
> > is always true or false (in *all* cases on *all* archs).
> 
> Well, I'm convinced that (b) is unnecessary, as any compiler that notices 
> the range thing enough to warn will also be smart enough to just remove 
> the test internally.
> 
That makes sense. I'll try and ignore (b).

> But yes, as long as the thing is a "review and fix bugs" and not a quest 
> to remove warnings which may well be compiler figments, that's obviously 
> ok.

That was the main thing, yes. Of course I may make mistakes and end up 
posting patches that are less than perfect, but review and fix bugs is 
my intent, building with -W is merely a way for me to find relevant bits 
to review.

But enough of this, I understand your views on the issue and thank you for 
your examples, now I'll focus on the code and see if it results in a few 
patches :)


--
Jesper Juhl




  parent reply	other threads:[~2004-11-23 23:09 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-11-21 22:55 Jesper Juhl
2004-11-22  1:02 ` Matthew Wilcox
2004-11-23  9:42   ` Jesper Juhl
2004-11-23 10:42     ` Jamie Lokier
2004-11-23 18:28       ` Bryan Henderson
2004-11-23 18:03     ` Linus Torvalds
2004-11-23 18:39       ` Jesper Juhl
2004-11-23 18:37         ` Linus Torvalds
2004-11-23 19:20           ` linux-os
2004-11-23 23:16           ` Jesper Juhl [this message]
2004-11-23 19:13       ` Timur Tabi
2004-11-23 23:09         ` Jesper Juhl
2004-11-23 23:03           ` Timur Tabi
2004-11-23 23:19             ` Jesper Juhl
2004-11-23 23:09               ` Timur Tabi
2004-11-23 23:28                 ` Jesper Juhl
2004-11-25 22:34             ` Valdis.Kletnieks

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Pine.LNX.4.61.0411240011310.3389@dragon.hygekrogen.localhost \
    --to=juhl-lkml@dif.dk \
    --cc=linux-kernel@vger.kernel.org \
    --cc=matthew@wil.cx \
    --cc=torvalds@osdl.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®