cassini: i reaches 0, not -1.
Subsystems (2)
PATCH 1/1 cassini: i reaches 0, not -1.
With while (i-- > 0) { ... } i reaches 0, not -1.
Signed-off-by Roel Kluin <[email protected]>
---
drivers/net/cassini.c +1 -1
@@ -3568,7 +3568,7 @@ static inline void cas_start_dma(struct cas *cp)break ;udelay (10 ); } -if (i <0 ) txfailed =1 ; +if (i <=0 ) txfailed =1 ; i =STOP_TRIES ;while (i-- >0 ) { val =readl (cp->regs +REG_MAC_RX_CFG );
David Miller
maintainerFrom: Roel Kluin <[email protected]>
Date: Mon, 09 Feb 2009 23:12:02 +0100
Quoted 3 lines
With while (i-- > 0) { ... } i reaches 0, not -1.
Signed-off-by Roel Kluin <[email protected]>
Does it?
--------------------
#include <stdio.h>
int main(void)
{
int i = 20;
while (i-- > 0)
;
printf("%d\n", i);
return 0;
}
--------------------
davem@sunset:~/src/GIT/linux-2.6$ gcc -O2 -o x x.c
davem@sunset:~/src/GIT/linux-2.6$ ./x
-1
davem@sunset:~/src/GIT/linux-2.6$ Quoted 8 lines · David Miller
From: Roel Kluin <[email protected]>
Date: Mon, 09 Feb 2009 23:12:02 +0100Quoted 3 lines
With while (i-- > 0) { ... } i reaches 0, not -1.
Signed-off-by Roel Kluin <[email protected]>Does it?
No, you're right, sorry, please ignore :-/