Skip to content

Commit cbdbf2a

Browse files
James Hoganrustyrussell
authored andcommitted
linux/kernel.h: define SYMBOL_PREFIX
Define SYMBOL_PREFIX to be the same as CONFIG_SYMBOL_PREFIX if set by the architecture, or "" otherwise. This avoids the need for ugly #ifdefs whenever symbols are referenced in asm blocks. Signed-off-by: James Hogan <james.hogan@imgtec.com> Cc: Andrew Morton <akpm@linux-foundation.org> Cc: Joe Perches <joe@perches.com> Cc: Paul Gortmaker <paul.gortmaker@windriver.com> Cc: Jean Delvare <khali@linux-fr.org> Cc: Ralf Baechle <ralf@linux-mips.org> Cc: Mike Frysinger <vapier@gentoo.org> Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
1 parent 3c46f3d commit cbdbf2a

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

include/linux/kernel.h

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -701,6 +701,13 @@ static inline void ftrace_dump(enum ftrace_dump_mode oops_dump_mode) { }
701701
#define COMPACTION_BUILD 0
702702
#endif
703703

704+
/* This helps us to avoid #ifdef CONFIG_SYMBOL_PREFIX */
705+
#ifdef CONFIG_SYMBOL_PREFIX
706+
#define SYMBOL_PREFIX CONFIG_SYMBOL_PREFIX
707+
#else
708+
#define SYMBOL_PREFIX ""
709+
#endif
710+
704711
/* Rebuild everything on CONFIG_FTRACE_MCOUNT_RECORD */
705712
#ifdef CONFIG_FTRACE_MCOUNT_RECORD
706713
# define REBUILD_DUE_TO_FTRACE_MCOUNT_RECORD

0 commit comments

Comments
 (0)