From 277e2c695907a70b316a31769cd891dc4d43b7f3 Mon Sep 17 00:00:00 2001 From: Daniel Guilak Date: Fri, 25 Jul 2008 01:45:49 -0700 Subject: init/version.c: silence sparse warning by declaring the version string Signed-off-by: Daniel Guilak Cc: Randy Dunlap Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- init/version.c | 1 + 1 file changed, 1 insertion(+) (limited to 'init/version.c') diff --git a/init/version.c b/init/version.c index 9d17d70ee02d..041fd822ce24 100644 --- a/init/version.c +++ b/init/version.c @@ -16,6 +16,7 @@ #define version(a) Version_ ## a #define version_string(a) version(a) +extern int version_string(LINUX_VERSION_CODE); int version_string(LINUX_VERSION_CODE); struct uts_namespace init_uts_ns = { -- cgit v1.2.2 From 197dcffc8ba0ea943fee86e28e99cd9575799772 Mon Sep 17 00:00:00 2001 From: Daniel Guilak Date: Fri, 25 Jul 2008 01:45:50 -0700 Subject: 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 Cc: Randy Dunlap Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- init/version.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'init/version.c') diff --git a/init/version.c b/init/version.c index 041fd822ce24..52a8b98642b8 100644 --- a/init/version.c +++ b/init/version.c @@ -13,11 +13,13 @@ #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 = { .kref = { -- cgit v1.2.2