]> git.hungrycats.org Git - linux/commitdiff
[PATCH] Fix mdelay's use of 'msec' name
authorBenjamin Herrenschmidt <benh@kernel.crashing.org>
Sun, 3 Aug 2003 04:33:44 +0000 (21:33 -0700)
committerDavid S. Miller <davem@kernel.bkbits.net>
Sun, 3 Aug 2003 04:33:44 +0000 (21:33 -0700)
The mdelay() macro does the wrong thing if you try to use it with an
argument expression that contains the (perfectly natural) variable name
'msec'.

Fix it to use an internal variable that doesn't clash with normal
naming.

include/linux/delay.h

index 1ddf999dab421b686f5620543e6b0626c6a7270b..36abaa6b19fdd9c12c6aad88152c95ec867a929d 100644 (file)
@@ -27,11 +27,11 @@ extern unsigned long loops_per_jiffy;
 
 #ifdef notdef
 #define mdelay(n) (\
-       {unsigned long msec=(n); while (msec--) udelay(1000);})
+       {unsigned long __ms=(n); while (__ms--) udelay(1000);})
 #else
 #define mdelay(n) (\
        (__builtin_constant_p(n) && (n)<=MAX_UDELAY_MS) ? udelay((n)*1000) : \
-       ({unsigned long msec=(n); while (msec--) udelay(1000);}))
+       ({unsigned long __ms=(n); while (__ms--) udelay(1000);}))
 #endif
 
 #ifndef ndelay