On Sat, Feb 22, 2014 at 03:46:48PM +0800, Viller Hsiao wrote: > Due to name collision in ftrace safe_load and safe_store macros, > these macros cannot take expressions as operands. > > For example, compiler will complain for a macro call like the following: > safe_store_code(new_code2, ip + 4, faulted); > > arch/mips/include/asm/ftrace.h:61:6: note: in definition of macro 'safe_store' > : [dst] "r" (dst), [src] "r" (src)\ > ^ > arch/mips/kernel/ftrace.c:118:2: note: in expansion of macro 'safe_store_code' > safe_store_code(new_code2, ip + 4, faulted); > ^ > arch/mips/kernel/ftrace.c:118:32: error: undefined named operand 'ip + 4' > safe_store_code(new_code2, ip + 4, faulted); > ^ > arch/mips/include/asm/ftrace.h:61:6: note: in definition of macro 'safe_store' > : [dst] "r" (dst), [src] "r" (src)\ > ^ > arch/mips/kernel/ftrace.c:118:2: note: in expansion of macro 'safe_store_code' > safe_store_code(new_code2, ip + 4, faulted); > ^ > > This patch tweaks variable naming in those macros to allow flexible > operands. Interesting catch - and while I think your patch indeed is an improvment nobody seems to have observed this in a kernel tree, so I'm going to treat this as a non-urgent improvment and queue it for 3.15. If this can be triggered in any -stable or v3.14-rc7 tree, please let me know. Thanks, Ralf