diff mbox

TG3: limit reaches -1

Message ID 4992AD3A.7000301@gmail.com
State Accepted, archived
Delegated to: David Miller
Headers show

Commit Message

roel kluin Feb. 11, 2009, 10:49 a.m. UTC
With while (limit--) { ... } limit reaches -1, so 0 means success.

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
---
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Comments

Michael Chan Feb. 11, 2009, 8:40 p.m. UTC | #1
On Wed, 2009-02-11 at 02:49 -0800, Roel Kluin wrote:
> With while (limit--) { ... } limit reaches -1, so 0 means success.
> 
> Signed-off-by: Roel Kluin <roel.kluin@gmail.com>

Acked-by: Michael Chan <mchan@broadcom.com>

Thanks.
> ---
> diff --git a/drivers/net/tg3.c b/drivers/net/tg3.c
> index 8b3f846..4595962 100644
> --- a/drivers/net/tg3.c
> +++ b/drivers/net/tg3.c
> @@ -852,7 +852,7 @@ static int tg3_bmcr_reset(struct tg3 *tp)
>  		}
>  		udelay(10);
>  	}
> -	if (limit <= 0)
> +	if (limit < 0)
>  		return -EBUSY;
>  
>  	return 0;
> @@ -1603,7 +1603,7 @@ static int tg3_wait_macro_done(struct tg3 *tp)
>  				break;
>  		}
>  	}
> -	if (limit <= 0)
> +	if (limit < 0)
>  		return -EBUSY;
>  
>  	return 0;
> --
> To unsubscribe from this list: send the line "unsubscribe netdev" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 


--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
David Miller Feb. 13, 2009, 12:33 a.m. UTC | #2
From: "Michael Chan" <mchan@broadcom.com>
Date: Wed, 11 Feb 2009 12:40:16 -0800

> 
> On Wed, 2009-02-11 at 02:49 -0800, Roel Kluin wrote:
> > With while (limit--) { ... } limit reaches -1, so 0 means success.
> > 
> > Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
> 
> Acked-by: Michael Chan <mchan@broadcom.com>

Applied.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/drivers/net/tg3.c b/drivers/net/tg3.c
index 8b3f846..4595962 100644
--- a/drivers/net/tg3.c
+++ b/drivers/net/tg3.c
@@ -852,7 +852,7 @@  static int tg3_bmcr_reset(struct tg3 *tp)
 		}
 		udelay(10);
 	}
-	if (limit <= 0)
+	if (limit < 0)
 		return -EBUSY;
 
 	return 0;
@@ -1603,7 +1603,7 @@  static int tg3_wait_macro_done(struct tg3 *tp)
 				break;
 		}
 	}
-	if (limit <= 0)
+	if (limit < 0)
 		return -EBUSY;
 
 	return 0;