mirror of
https://github.com/xen-project/xen.git
synced 2026-10-28 02:01:24 +01:00
xen/delay: address MISRA C:2012 Rule 5.3
The variable 'msec' declared in the macro shadows the local variable in 'ehci_dbgp_bios_handoff', but to prevent any future clashes with other functions the macro is converted to a static inline function. No functional change. Signed-off-by: Nicola Vetrini <nicola.vetrini@bugseng.com> Reviewed-by: Julien Grall <jgrall@amazon.com>
This commit is contained in:
1 parent
f70e11db83
commit
236fc9fdf9
1 file changed
+6
-2
@@ -4,7 +4,11 @@
|
||||
/* Copyright (C) 1993 Linus Torvalds */
|
||||
|
||||
#include <asm/delay.h>
|
||||
#define mdelay(n) (\
|
||||
{unsigned long msec=(n); while (msec--) udelay(1000);})
|
||||
|
||||
static inline void mdelay(unsigned long msec)
|
||||
{
|
||||
while ( msec-- )
|
||||
udelay(1000);
|
||||
}
|
||||
|
||||
#endif /* defined(_LINUX_DELAY_H) */
|
||||