|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [PATCH 4/7] xen/vgic: Fix MISRA C 2012 Rule 20.7 violation
On Fri, 19 Aug 2022, Xenia Ragiadakou wrote:
> In macro VGIC_V3_LR_INDEX(), add parentheses around the macro parameter
> to prevent against unintended expansions.
>
> Signed-off-by: Xenia Ragiadakou <burzalodowa@xxxxxxxxx>
Reviewed-by: Stefano Stabellini <sstabellini@xxxxxxxxxx>
> ---
> xen/arch/arm/include/asm/new_vgic.h | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/xen/arch/arm/include/asm/new_vgic.h
> b/xen/arch/arm/include/asm/new_vgic.h
> index ab57fcd91d..b7fa9ab11a 100644
> --- a/xen/arch/arm/include/asm/new_vgic.h
> +++ b/xen/arch/arm/include/asm/new_vgic.h
> @@ -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
> --
> 2.34.1
>
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |