]> xenbits.xensource.com Git - people/tklengyel/xen.git/commitdiff
arm/vgic: fix MISRA C 2012 Rule 20.7 violation
authorXenia Ragiadakou <burzalodowa@gmail.com>
Wed, 24 Aug 2022 12:22:29 +0000 (14:22 +0200)
committerJan Beulich <jbeulich@suse.com>
Wed, 24 Aug 2022 12:22:29 +0000 (14:22 +0200)
In macro VGIC_V3_LR_INDEX(), add parentheses around the macro parameter
to prevent against unintended expansions.

Signed-off-by: Xenia Ragiadakou <burzalodowa@gmail.com>
Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>
xen/arch/arm/include/asm/new_vgic.h

index ab57fcd91d8831d492a6d535bd565a0a76998641..b7fa9ab11a0bb991cd475c6dadff650a73a4af4b 100644 (file)
@@ -43,7 +43,7 @@ enum vgic_type {
 
 #define VGIC_V2_MAX_LRS         (1 << 6)
 #define VGIC_V3_MAX_LRS         16
-#define VGIC_V3_LR_INDEX(lr)    (VGIC_V3_MAX_LRS - 1 - lr)
+#define VGIC_V3_LR_INDEX(lr)    (VGIC_V3_MAX_LRS - 1 - (lr))
 
 #define VGIC_CONFIG_EDGE        false
 #define VGIC_CONFIG_LEVEL       true