From 42566bde6cd365a09b9ea1194a11fddf8d4fd2f6 Mon Sep 17 00:00:00 2001 From: Masahiro Yamada Date: Thu, 25 Feb 2021 17:22:11 -0800 Subject: [PATCH] init/version.c: remove Version_ symbol This code hunk creates a Version_ symbol if CONFIG_KALLSYMS is disabled. For example, building the kernel v5.10 for allnoconfig creates the following symbol: $ nm vmlinux | grep Version_ c116b028 B Version_330240 There is no in-tree user of this symbol. Commit d855aa497569 ("init/version.c: define version_string only if CONFIG_KALLSYMS is not defined") mentions that Version_* is only used with ksymoops. However, a commit in the pre-git era [1] had added the statement, "ksymoops is useless on 2.6. Please use the Oops in its original format". That statement existed until commit 67cf7c4c63fc ("Documentation: admin-guide: update bug-hunting.rst") finally removed the stale ksymoops information. This symbol is no longer needed. [1] https://git.kernel.org/pub/scm/linux/kernel/git/history/history.git/commit/?id=ad68b2f085f5c79e4759ca2d13947b3c885ee831 Link: https://lkml.kernel.org/r/20210120033452.2895170-1-masahiroy@kernel.org Signed-off-by: Masahiro Yamada Cc: Mauro Carvalho Chehab Cc: Randy Dunlap Cc: Daniel Guilak Cc: Lee Revell Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- init/version.c | 8 -------- 1 file changed, 8 deletions(-) diff --git a/init/version.c b/init/version.c index 80d2b7566b397..92afc782b0434 100644 --- a/init/version.c +++ b/init/version.c @@ -16,14 +16,6 @@ #include #include -#ifndef CONFIG_KALLSYMS -#define version(a) Version_ ## a -#define version_string(a) version(a) - -extern int version_string(LINUX_VERSION_CODE); -int version_string(LINUX_VERSION_CODE); -#endif - struct uts_namespace init_uts_ns = { .ns.count = REFCOUNT_INIT(2), .name = { -- 2.39.5