From dd56080d9be16624ed8840a2beb8924a4f4ba270 Mon Sep 17 00:00:00 2001 From: Jiafei Pan Date: Thu, 1 Apr 2021 13:32:57 +0800 Subject: [PATCH] interrupt_controller: gic: fix some macro definition Add parenthesis for the parameters to avoid the issues if parameter is an expression but not an immediate value. Signed-off-by: Jiafei Pan --- include/drivers/interrupt_controller/gic.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/drivers/interrupt_controller/gic.h b/include/drivers/interrupt_controller/gic.h index c733dfa613e..a6aa99dc2f4 100644 --- a/include/drivers/interrupt_controller/gic.h +++ b/include/drivers/interrupt_controller/gic.h @@ -193,12 +193,12 @@ #endif /* CONFIG_GIC_V2 */ /* GICD_SGIR */ -#define GICD_SGIR_TGTFILT(x) (x << 24) +#define GICD_SGIR_TGTFILT(x) ((x) << 24) #define GICD_SGIR_TGTFILT_CPULIST GICD_SGIR_TGTFILT(0b00) #define GICD_SGIR_TGTFILT_ALLBUTREQ GICD_SGIR_TGTFILT(0b01) #define GICD_SGIR_TGTFILT_REQONLY GICD_SGIR_TGTFILT(0b10) -#define GICD_SGIR_CPULIST(x) (x << 16) +#define GICD_SGIR_CPULIST(x) ((x) << 16) #define GICD_SGIR_CPULIST_CPU(n) GICD_SGIR_CPULIST(BIT(n)) #define GICD_SGIR_NSATT BIT(15)