From: Jens Axboe <axboe@suse.de>
To: Paul Jackson <pj@sgi.com>
Cc: Jesper Juhl <juhl@dif.dk>,
joe@perches.com, juhl-lkml@dif.dk, linux-kernel@vger.kernel.org,
markhe@nextd.demon.co.uk, andrea@e-mind.com,
manfred@colorfullife.com
Subject: Re: [PATCH] mm/slab.c remove impossible <0 check - size_t is not signed - patch is against 2.6.1-rc1-mm2
Date: Thu, 8 Jan 2004 16:28:22 +0100 [thread overview]
Message-ID: <20040108152822.GC8774@suse.de> (raw)
In-Reply-To: <20040108021658.0a8aaccc.pj@sgi.com>
On Thu, Jan 08 2004, Paul Jackson wrote:
> Jason asked:
> > Well, anything wrong in cleaning them [unsigned compare warnings] up?
>
> It's more important that we write code that will fit in our limited
> human brains than that we write code that will avoid spurious warnings
> from gcc ('spurious' meaning warnings for code that gcc will correctly
> compile anyway).
>
> Or, see a couple months ago, in a thread with the Subject of:
>
> [PATCH] irda: fix type of struct irda_ias_set.attribute.irda_attrib_string.len
>
> in which Linus wrote:
> > That's why I hate the "sign compare" warning of gcc so much - it warns
> > about things that you CANNOT sanely write in any other way. That makes
> > that particular warning _evil_, since it encourages people to write crap
> > code.
That's fine and has its place, no doubt about that. It doesn't cover the
patch in this thread though. The check is dead code. It's a cosmetic
problem though, gcc should not generate the code checking for < 0.
--
Jens Axboe
next prev parent reply other threads:[~2004-01-08 15:29 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-01-08 1:20 [PATCH] mm/slab.c remove impossible <0 check - size_t is not signed - patch is against 2.6.1-rc1-mm2 Jesper Juhl
2004-01-08 3:08 ` Joe Perches
2004-01-08 9:33 ` Jesper Juhl
2004-01-08 10:16 ` Paul Jackson
2004-01-08 15:28 ` Jens Axboe [this message]
2004-01-08 19:33 ` Manfred Spraul
2004-01-08 15:37 ` Joe Perches
2004-01-15 1:13 ` Bill Davidsen
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=20040108152822.GC8774@suse.de \
--to=axboe@suse.de \
--cc=andrea@e-mind.com \
--cc=joe@perches.com \
--cc=juhl-lkml@dif.dk \
--cc=juhl@dif.dk \
--cc=linux-kernel@vger.kernel.org \
--cc=manfred@colorfullife.com \
--cc=markhe@nextd.demon.co.uk \
--cc=pj@sgi.com \
/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