Skip to content

Commit f0557d9

Browse files
committed
memory: pl172: Enclose macro argument usage in parenthesis
Macros arguments should be enclosed by parenthesis for safety. Signed-off-by: Krzysztof Kozlowski <[email protected]>
1 parent 46c7111 commit f0557d9

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

drivers/memory/pl172.c

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
#include <linux/of_platform.h>
2222
#include <linux/time.h>
2323

24-
#define MPMC_STATIC_CFG(n) (0x200 + 0x20 * n)
24+
#define MPMC_STATIC_CFG(n) (0x200 + 0x20 * (n))
2525
#define MPMC_STATIC_CFG_MW_8BIT 0x0
2626
#define MPMC_STATIC_CFG_MW_16BIT 0x1
2727
#define MPMC_STATIC_CFG_MW_32BIT 0x2
@@ -31,17 +31,17 @@
3131
#define MPMC_STATIC_CFG_EW BIT(8)
3232
#define MPMC_STATIC_CFG_B BIT(19)
3333
#define MPMC_STATIC_CFG_P BIT(20)
34-
#define MPMC_STATIC_WAIT_WEN(n) (0x204 + 0x20 * n)
34+
#define MPMC_STATIC_WAIT_WEN(n) (0x204 + 0x20 * (n))
3535
#define MPMC_STATIC_WAIT_WEN_MAX 0x0f
36-
#define MPMC_STATIC_WAIT_OEN(n) (0x208 + 0x20 * n)
36+
#define MPMC_STATIC_WAIT_OEN(n) (0x208 + 0x20 * (n))
3737
#define MPMC_STATIC_WAIT_OEN_MAX 0x0f
38-
#define MPMC_STATIC_WAIT_RD(n) (0x20c + 0x20 * n)
38+
#define MPMC_STATIC_WAIT_RD(n) (0x20c + 0x20 * (n))
3939
#define MPMC_STATIC_WAIT_RD_MAX 0x1f
40-
#define MPMC_STATIC_WAIT_PAGE(n) (0x210 + 0x20 * n)
40+
#define MPMC_STATIC_WAIT_PAGE(n) (0x210 + 0x20 * (n))
4141
#define MPMC_STATIC_WAIT_PAGE_MAX 0x1f
42-
#define MPMC_STATIC_WAIT_WR(n) (0x214 + 0x20 * n)
42+
#define MPMC_STATIC_WAIT_WR(n) (0x214 + 0x20 * (n))
4343
#define MPMC_STATIC_WAIT_WR_MAX 0x1f
44-
#define MPMC_STATIC_WAIT_TURN(n) (0x218 + 0x20 * n)
44+
#define MPMC_STATIC_WAIT_TURN(n) (0x218 + 0x20 * (n))
4545
#define MPMC_STATIC_WAIT_TURN_MAX 0x0f
4646

4747
/* Maximum number of static chip selects */

0 commit comments

Comments
 (0)