[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [PATCH] xen/arm: regs: Fix MISRA C 2012 Rule 20.7 violation
In macro psr_mode(), the macro parameter 'm' is used as expression and therefore it is good to be enclosed in parentheses to prevent against unintended expansions. Signed-off-by: Xenia Ragiadakou <burzalodowa@xxxxxxxxx> --- xen/arch/arm/include/asm/regs.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xen/arch/arm/include/asm/regs.h b/xen/arch/arm/include/asm/regs.h index 794721a103..0693a68131 100644 --- a/xen/arch/arm/include/asm/regs.h +++ b/xen/arch/arm/include/asm/regs.h @@ -11,7 +11,7 @@ #include <asm/current.h> #include <asm/processor.h> -#define psr_mode(psr,m) (((psr) & PSR_MODE_MASK) == m) +#define psr_mode(psr,m) (((psr) & PSR_MODE_MASK) == (m)) static inline bool regs_mode_is_32bit(const struct cpu_user_regs *regs) { -- 2.34.1
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |