Skip to content

Commit 197dcff

Browse files
Daniel Guilaktorvalds
authored andcommitted
init/version.c: define version_string only if CONFIG_KALLSYMS is not defined
int Version_* is only used with ksymoops, which is only needed (according to README and Documentation/Changes) if CONFIG_KALLSYMS is NOT defined. Therefore this patch defines version_string only if CONFIG_KALLSYMS is not defined. Signed-off-by: Daniel Guilak <daniel@danielguilak.com> Cc: Randy Dunlap <randy.dunlap@oracle.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
1 parent 277e2c6 commit 197dcff

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

‎init/version.c‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,13 @@
1313
#include <linux/utsrelease.h>
1414
#include <linux/version.h>
1515

16+
#ifndef CONFIG_KALLSYMS
1617
#define version(a) Version_ ## a
1718
#define version_string(a) version(a)
1819

1920
extern int version_string(LINUX_VERSION_CODE);
2021
int version_string(LINUX_VERSION_CODE);
22+
#endif
2123

2224
struct uts_namespace init_uts_ns = {
2325
.kref = {

0 commit comments

Comments
 (0)