From: Bastien Curutchet Date: Mon, 21 Oct 2024 15:13:25 +0000 (+0200) Subject: memory: ti-aemif: Correct macro to ensure avoiding precedence issues X-Git-Url: http://git.dujemihanovic.xyz/login.html?a=commitdiff_plain;h=7a7b13838f11f6dbb3049a44b8884e9139f39b5e;p=u-boot.git memory: ti-aemif: Correct macro to ensure avoiding precedence issues Fix following CHECK pointed out by checkpatch: CHECK: Macro argument 'cs' may be better as '(cs)' to avoid precedence issues #62: FILE: drivers/memory/ti-aemif.c:15: +#define AEMIF_CONFIG(cs) (0x10 + (cs * 4)) Signed-off-by: Bastien Curutchet Reviewed-by: Tom Rini --- diff --git a/drivers/memory/ti-aemif.c b/drivers/memory/ti-aemif.c index 29131f536a..127a262894 100644 --- a/drivers/memory/ti-aemif.c +++ b/drivers/memory/ti-aemif.c @@ -12,7 +12,7 @@ #define AEMIF_WAITCYCLE_CONFIG (KS2_AEMIF_CNTRL_BASE + 0x4) #define AEMIF_NAND_CONTROL (KS2_AEMIF_CNTRL_BASE + 0x60) #define AEMIF_ONENAND_CONTROL (KS2_AEMIF_CNTRL_BASE + 0x5c) -#define AEMIF_CONFIG(cs) (KS2_AEMIF_CNTRL_BASE + 0x10 + (cs * 4)) +#define AEMIF_CONFIG(cs) (KS2_AEMIF_CNTRL_BASE + 0x10 + ((cs) * 4)) #define AEMIF_CFG_SELECT_STROBE(v) ((v) ? 1 << 31 : 0) #define AEMIF_CFG_EXTEND_WAIT(v) ((v) ? 1 << 30 : 0)