[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [PATCH] xen/arm: vreg: Fix MISRA C 2012 Rule 20.7 violation
In VREG_REG_HELPERS(), the macro parameter 'offmask' 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/vreg.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/xen/arch/arm/include/asm/vreg.h b/xen/arch/arm/include/asm/vreg.h index fa2f4cdb17..f26a70d024 100644 --- a/xen/arch/arm/include/asm/vreg.h +++ b/xen/arch/arm/include/asm/vreg.h @@ -141,7 +141,7 @@ static inline void vreg_reg_clearbits(unsigned long *reg, register_t bits, static inline register_t vreg_reg##sz##_extract(uint##sz##_t reg, \ const mmio_info_t *info)\ { \ - return vreg_reg_extract(reg, info->gpa & offmask, \ + return vreg_reg_extract(reg, info->gpa & (offmask), \ info->dabt.size); \ } \ \ @@ -151,7 +151,7 @@ static inline void vreg_reg##sz##_update(uint##sz##_t *reg, \ { \ unsigned long tmp = *reg; \ \ - vreg_reg_update(&tmp, val, info->gpa & offmask, \ + vreg_reg_update(&tmp, val, info->gpa & (offmask), \ info->dabt.size); \ \ *reg = tmp; \ @@ -163,7 +163,7 @@ static inline void vreg_reg##sz##_setbits(uint##sz##_t *reg, \ { \ unsigned long tmp = *reg; \ \ - vreg_reg_setbits(&tmp, bits, info->gpa & offmask, \ + vreg_reg_setbits(&tmp, bits, info->gpa & (offmask), \ info->dabt.size); \ \ *reg = tmp; \ @@ -175,7 +175,7 @@ static inline void vreg_reg##sz##_clearbits(uint##sz##_t *reg, \ { \ unsigned long tmp = *reg; \ \ - vreg_reg_clearbits(&tmp, bits, info->gpa & offmask, \ + vreg_reg_clearbits(&tmp, bits, info->gpa & (offmask), \ info->dabt.size); \ \ *reg = tmp; \ -- 2.34.1
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |