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:
Nicola Vetrini authored and Jan Beulich committed 2023-08-09 15:59:40 +02:00
1 parent f70e11db83
commit 236fc9fdf9
1 file changed
+6 -2
+6 -2
View File
@@ -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) */
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.