Thread (2 messages) 2 messages, 2 authors, 2017-02-07
STALE3521d

[PATCH] staging: sm750fb: Enclose macro arguments in parentheses

From: Matthieu Simon <hidden>
Date: 2017-02-07 19:11:22
Subsystem: staging - silicon motion sm750 frame buffer driver, staging subsystem, the rest · Maintainers: Sudip Mukherjee, Teddy Wang, Sudip Mukherjee, Greg Kroah-Hartman, Linus Torvalds

checkpatch noticed possible precedence issues resulting in the definition
of PEEK32 and POKE32. So, these arguments should be enclosed in
parentheses.

Signed-off-by: Matthieu Simon <redacted>
---
 drivers/staging/sm750fb/ddk750_chip.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/staging/sm750fb/ddk750_chip.h b/drivers/staging/sm750fb/ddk750_chip.h
index e63b8b293816..a5f910344373 100644
--- a/drivers/staging/sm750fb/ddk750_chip.h
+++ b/drivers/staging/sm750fb/ddk750_chip.h
@@ -10,8 +10,8 @@
 #include <linux/uaccess.h>
 
 /* software control endianness */
-#define PEEK32(addr) readl(addr + mmio750)
-#define POKE32(addr, data) writel(data, addr + mmio750)
+#define PEEK32(addr) readl((addr) + mmio750)
+#define POKE32(addr, data) writel((data), (addr) + mmio750)
 
 extern void __iomem *mmio750;
 
-- 
Matthieu
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help