arm/vgic: fix MISRA C 2012 Rule 20.7 violation

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>
This commit is contained in:
Xenia Ragiadakou authored and Jan Beulich committed 2022-08-24 14:22:29 +02:00
1 parent 335f3f62b6
commit 7bb36cbb93
1 file changed
+1 -1
+1 -1
View 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
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.