All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stefan Sperling <stefan@binarchy.net>
To: kernel-janitors@vger.kernel.org
Subject: Re: [KJ] [PATCH] driver/net/tg3.c: some s/int/unsigned int
Date: Fri, 12 Nov 2004 00:14:31 +0000	[thread overview]
Message-ID: <20041112001431.GA8059@dice.seeling33.de> (raw)
In-Reply-To: <20041102101835.GA4083@voyager>

[-- Attachment #1: Type: text/plain, Size: 1036 bytes --]

On Thu, Nov 11, 2004 at 02:54:20PM -0800, David S. Miller wrote:
> On Mon, 8 Nov 2004 09:07:26 +0100
> Carlo Perassi <carlo@linux.it> wrote:
> 
> > > Please let me know if you'd like a new version without the "if"s or not.
> > 
> > this is the new version with the discussed changes
> 
> Carlo... please look at this carefully:
> 
> @@ -518,7 +519,8 @@ static int tg3_readphy(struct tg3 *tp, i
>  static int tg3_writephy(struct tg3 *tp, int reg, u32 val)
>  {
>  	u32 frame_val;
> -	int loops, ret;
> +	int ret;
> +	unsigned int loops;
>  
>  	if ((tp->mi_mode & MAC_MI_MODE_AUTO_POLL) != 0) {
>  		tw32_f(MAC_MI_MODE,
> @@ -595,7 +597,7 @@ static int tg3_bmcr_reset(struct tg3 *tp
>  		}
>  		udelay(10);
>  	}
> -	if (limit <= 0)
> +	if (limit < 0)
>  		return -EBUSY;
> 
> How can an "unsigned" value every be less than zero?
> Didn't the compiler even warn you about this?

Er, where's the declaration of limit in the above code snippet?

;-)
stefan
-- 
Give me a fish and I will eat today.
Teach me to fish and I will eat forever.

[-- Attachment #2: Type: text/plain, Size: 167 bytes --]

_______________________________________________
Kernel-janitors mailing list
Kernel-janitors@lists.osdl.org
http://lists.osdl.org/mailman/listinfo/kernel-janitors

  parent reply	other threads:[~2004-11-12  0:14 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-11-02 10:18 [KJ] [PATCH] driver/net/tg3.c: some s/int/unsigned int Carlo Perassi
2004-11-02 10:55 ` Carlo Perassi
2004-11-02 22:16 ` Felipe W Damasio
2004-11-03  7:43 ` Carlo Perassi
2004-11-03 10:37 ` Carlo Perassi
2004-11-03 23:59 ` David S. Miller
2004-11-04  9:35 ` Carlo Perassi
2004-11-08  8:07 ` Carlo Perassi
2004-11-11 22:54 ` David S. Miller
2004-11-12  0:14 ` Stefan Sperling [this message]
2004-11-12 10:27 ` Carlo Perassi
2004-11-12 11:29 ` Carlo Perassi
2004-11-12 15:13 ` Carlo Perassi
2004-11-18  0:23 ` David S. Miller
2004-11-18  9:35 ` Carlo Perassi

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=20041112001431.GA8059@dice.seeling33.de \
    --to=stefan@binarchy.net \
    --cc=kernel-janitors@vger.kernel.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 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.