From: Andrew Morton <akpm@linux-foundation.org>
To: William Allen Simpson <william.allen.simpson@gmail.com>
Cc: davem@davemloft.net,
Linux Kernel Network Developers <netdev@vger.kernel.org>
Subject: Re: + net-ipv4-tcpc-fix-warning.patch added to -mm tree
Date: Tue, 8 Dec 2009 18:08:01 -0800 [thread overview]
Message-ID: <20091208180801.88be28ba.akpm@linux-foundation.org> (raw)
In-Reply-To: <4B1F0151.10903@gmail.com>
On Tue, 08 Dec 2009 20:45:53 -0500
William Allen Simpson <william.allen.simpson@gmail.com> wrote:
> > ------------------------------------------------------
> > Subject: net/ipv4/tcp.c: fix warning
> > From: Andrew Morton <akpm@linux-foundation.org>
> >
> > x86_64 allmodconfig:
> >
> > net/ipv4/tcp.c: In function 'do_tcp_getsockopt':
> > net/ipv4/tcp.c:2544: warning: comparison is always false due to limited range of data type
> >
> > sizeof(tcpct_value) is 536, which can never be less than a value which is held
> > in a u8.
> >
> > This fix is stupid - just delete the code?
> >
> I didn't have this warning, how in the world do you get it?
Used gcc-4.0.2. They re-randomise the warnings with each release I think.
> This is what David calls my "anal" coding style. I check everything,
> because someday somebody else might make a change, and it's important
> that such problems be detected. In this case, I assume the compiler
> will compile them out or it would have no effect, and commented that
> it should be impossible.
>
> Your test should probably be TCP_MSS_DEFAULT < TCP_COOKIE_PAIR_SIZE
I'd say just delete it ;)
next prev parent reply other threads:[~2009-12-09 2:07 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-12-09 0:21 + net-ipv4-tcpc-fix-warning.patch added to -mm tree akpm
2009-12-09 1:45 ` William Allen Simpson
2009-12-09 2:08 ` Andrew Morton [this message]
2009-12-09 4:07 ` David Miller
2009-12-10 13:48 ` William Allen Simpson
2009-12-10 14:16 ` [PATCH] net-ipv4-tcp.c-fix-warning-from-older-compilers.patch William Allen Simpson
2009-12-10 14:31 ` Ben Hutchings
2009-12-11 15:30 ` William Allen Simpson
2009-12-11 15:38 ` [PATCH v2] net-ipv4-tcp.c-fix-warning-for-older-compilers.patch William Allen Simpson
2009-12-10 15:31 ` [PATCH] net-ipv4-tcp.c-fix-warning-from-older-compilers.patch Eric Dumazet
2009-12-10 21:46 ` David Miller
2009-12-11 6:50 ` Jarek Poplawski
2009-12-11 15:51 ` William Allen Simpson
2009-12-11 19:25 ` Jarek Poplawski
2009-12-11 22:25 ` David Miller
2009-12-11 15:49 ` William Allen Simpson
2009-12-11 22:24 ` David Miller
2009-12-10 21:43 ` David Miller
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=20091208180801.88be28ba.akpm@linux-foundation.org \
--to=akpm@linux-foundation.org \
--cc=davem@davemloft.net \
--cc=netdev@vger.kernel.org \
--cc=william.allen.simpson@gmail.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.