[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [xen master] xen/delay: address MISRA C:2012 Rule 5.3
commit 236fc9fdf97f4e7c64824ab793e8dca30dd54ffb Author: Nicola Vetrini <nicola.vetrini@xxxxxxxxxxx> AuthorDate: Wed Aug 9 15:59:40 2023 +0200 Commit: Jan Beulich <jbeulich@xxxxxxxx> CommitDate: Wed Aug 9 15:59:40 2023 +0200 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@xxxxxxxxxxx> Reviewed-by: Julien Grall <jgrall@xxxxxxxxxx> --- xen/include/xen/delay.h | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/xen/include/xen/delay.h b/xen/include/xen/delay.h index 9d70ef035f..9150226271 100644 --- a/xen/include/xen/delay.h +++ b/xen/include/xen/delay.h @@ -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) */ -- generated by git-patchbot for /home/xen/git/xen.git#master
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |