From 7b25908248d867401723f924594f880bd5d52125 Mon Sep 17 00:00:00 2001 From: Benjamin Herrenschmidt Date: Sat, 2 Aug 2003 21:33:44 -0700 Subject: [PATCH] [PATCH] Fix mdelay's use of 'msec' name 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 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/linux/delay.h b/include/linux/delay.h index 1ddf999dab421..36abaa6b19fdd 100644 --- a/include/linux/delay.h +++ b/include/linux/delay.h @@ -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 -- 2.53.0