Commit 94674b15 authored by Mike Frysinger's avatar Mike Frysinger

Blackfin: debug-mmrs: prevent macro arg from expanding

Passing a non-simple expression in as the addr arg could incorrectly
apply the pointer cast resulting in misbehavior.  Add proper paren.
Signed-off-by: default avatarMike Frysinger <vapier@gentoo.org>
parent 7595ac07
...@@ -27,7 +27,7 @@ ...@@ -27,7 +27,7 @@
#define PORT_MUX BFIN_PORT_MUX #define PORT_MUX BFIN_PORT_MUX
#endif #endif
#define _d(name, bits, addr, perms) debugfs_create_x##bits(name, perms, parent, (u##bits *)addr) #define _d(name, bits, addr, perms) debugfs_create_x##bits(name, perms, parent, (u##bits *)(addr))
#define d(name, bits, addr) _d(name, bits, addr, S_IRUSR|S_IWUSR) #define d(name, bits, addr) _d(name, bits, addr, S_IRUSR|S_IWUSR)
#define d_RO(name, bits, addr) _d(name, bits, addr, S_IRUSR) #define d_RO(name, bits, addr) _d(name, bits, addr, S_IRUSR)
#define d_WO(name, bits, addr) _d(name, bits, addr, S_IWUSR) #define d_WO(name, bits, addr) _d(name, bits, addr, S_IWUSR)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment