mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Mikael Pettersson <mikpe@csd.uu.se>
To: Jesper Juhl <juhl-lkml@dif.dk>
Cc: LKML <linux-kernel@vger.kernel.org>,
	"David S. Miller" <davem@davemloft.net>,
	Corey Minyard <wf-rch!minyard@relay.EU.net>,
	"Donald J. Becker" <becker@cesdis.gsfc.nasa.gov>,
	Alan Cox <Alan.Cox@linux.org>, "Bjorn Ekwall." <bj0rn@blox.se>,
	Pekka Riikonen <priikone@poseidon.pspt.fi>
Subject: Re: [PATCH] fix gcc -W warning in netdevice.h
Date: Thu, 16 Jun 2005 09:13:13 +0200	[thread overview]
Message-ID: <17073.9865.218749.808736@alkaid.it.uu.se> (raw)
In-Reply-To: <Pine.LNX.4.62.0506160053210.3842@dragon.hyggekrogen.localhost>

Jesper Juhl writes:
 > --- linux-2.6.12-rc6-mm1-orig/include/linux/netdevice.h	2005-06-12 15:58:58.000000000 +0200
 > +++ linux-2.6.12-rc6-mm1/include/linux/netdevice.h	2005-06-16 00:52:14.000000000 +0200
 > @@ -778,7 +778,7 @@ enum {
 >  static inline u32 netif_msg_init(int debug_value, int default_msg_enable_bits)
 >  {
 >  	/* use default */
 > -	if (debug_value < 0 || debug_value >= (sizeof(u32) * 8))
 > +	if (debug_value < 0 || debug_value >= (int)(sizeof(u32) * 8))
 >  		return default_msg_enable_bits;

I'd change debug_value to unsigned, and drop the "< 0" test and the
now redundant "(int)" cast. Both cleaner and faster. Win Win :-)

  reply	other threads:[~2005-06-16  7:13 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-06-15 23:01 Jesper Juhl
2005-06-16  7:13 ` Mikael Pettersson [this message]
2005-06-16 19:09   ` Jesper Juhl

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=17073.9865.218749.808736@alkaid.it.uu.se \
    --to=mikpe@csd.uu.se \
    --cc=Alan.Cox@linux.org \
    --cc=becker@cesdis.gsfc.nasa.gov \
    --cc=bj0rn@blox.se \
    --cc=davem@davemloft.net \
    --cc=juhl-lkml@dif.dk \
    --cc=linux-kernel@vger.kernel.org \
    --cc=priikone@poseidon.pspt.fi \
    --cc=wf-rch!minyard@relay.EU.net \
    /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®