aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2011-06-16 18:22:11 -0400
committerMike Frysinger <vapier@gentoo.org>2011-07-23 01:18:20 -0400
commit94674b15df4fdb111aeb2b07e67a818db5faa3c3 (patch)
treecf16b91c7b9543f8dcaa80c2410658697b73ba32 /arch
parent7595ac0711723dbc07e07ebb8c91ad56df4ab49d (diff)
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: Mike Frysinger <vapier@gentoo.org>
Diffstat (limited to 'arch')
-rw-r--r--arch/blackfin/kernel/debug-mmrs.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/blackfin/kernel/debug-mmrs.c b/arch/blackfin/kernel/debug-mmrs.c
index 26ebfe8f63c2..bafae8717903 100644
--- a/arch/blackfin/kernel/debug-mmrs.c
+++ b/arch/blackfin/kernel/debug-mmrs.c
@@ -27,7 +27,7 @@
27#define PORT_MUX BFIN_PORT_MUX 27#define PORT_MUX BFIN_PORT_MUX
28#endif 28#endif
29 29
30#define _d(name, bits, addr, perms) debugfs_create_x##bits(name, perms, parent, (u##bits *)addr) 30#define _d(name, bits, addr, perms) debugfs_create_x##bits(name, perms, parent, (u##bits *)(addr))
31#define d(name, bits, addr) _d(name, bits, addr, S_IRUSR|S_IWUSR) 31#define d(name, bits, addr) _d(name, bits, addr, S_IRUSR|S_IWUSR)
32#define d_RO(name, bits, addr) _d(name, bits, addr, S_IRUSR) 32#define d_RO(name, bits, addr) _d(name, bits, addr, S_IRUSR)
33#define d_WO(name, bits, addr) _d(name, bits, addr, S_IWUSR) 33#define d_WO(name, bits, addr) _d(name, bits, addr, S_IWUSR)