From: Mike Frysinger Date: Thu, 16 Jun 2011 22:22:11 +0000 (-0400) Subject: Blackfin: debug-mmrs: prevent macro arg from expanding X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=94674b15df4fdb111aeb2b07e67a818db5faa3c3;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git 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 --- 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 @@ #define PORT_MUX BFIN_PORT_MUX #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_RO(name, bits, addr) _d(name, bits, addr, S_IRUSR) #define d_WO(name, bits, addr) _d(name, bits, addr, S_IWUSR)