summaryrefslogtreecommitdiff
path: root/drivers/memory
diff options
context:
space:
mode:
authorBastien Curutchet <[email protected]>2024-10-21 17:13:25 +0200
committerTom Rini <[email protected]>2024-10-29 18:45:22 -0600
commit7a7b13838f11f6dbb3049a44b8884e9139f39b5e (patch)
treefd8076ad33fb9464e688b46803b4f3373c572903 /drivers/memory
parentbef9fdbed2e525ce9264d2ae2fbcb37db7472052 (diff)
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 <[email protected]> Reviewed-by: Tom Rini <[email protected]>
Diffstat (limited to 'drivers/memory')
-rw-r--r--drivers/memory/ti-aemif.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/memory/ti-aemif.c b/drivers/memory/ti-aemif.c
index 29131f536a6..127a262894a 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)