[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [PATCH] xen/arm: vgic: Fix coding style in macro REG_RANK_INDEX()
Add parentheses around the macro parameter 's' to prevent against unintended expansions. This, also, resolves a MISRA C 2012 Rule 20.7 violation warning. Add white spaces around the subtraction operator. Signed-off-by: Xenia Ragiadakou <burzalodowa@xxxxxxxxx> --- xen/arch/arm/include/asm/vgic.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xen/arch/arm/include/asm/vgic.h b/xen/arch/arm/include/asm/vgic.h index d2a9fc7d83..3d44868039 100644 --- a/xen/arch/arm/include/asm/vgic.h +++ b/xen/arch/arm/include/asm/vgic.h @@ -286,7 +286,7 @@ static inline paddr_t vgic_dist_base(const struct vgic_dist *vgic) * Offset of GICD_<FOO><n> with its rank, for GICD_<FOO> size <s> with * <b>-bits-per-interrupt. */ -#define REG_RANK_INDEX(b, n, s) ((((n) >> s) & ((b)-1)) % 32) +#define REG_RANK_INDEX(b, n, s) ((((n) >> (s)) & ((b) - 1)) % 32) extern struct vcpu *vgic_get_target_vcpu(struct vcpu *v, unsigned int virq); -- 2.34.1
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |