From patchwork Fri Feb 26 01:22:11 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Morton X-Patchwork-Id: 12105559 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-20.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,MENTIONS_GIT_HOSTING,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 542D0C433E0 for ; Fri, 26 Feb 2021 01:22:15 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id BCFCA64EE1 for ; Fri, 26 Feb 2021 01:22:14 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org BCFCA64EE1 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=linux-foundation.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 46B4A8D0003; Thu, 25 Feb 2021 20:22:14 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 41BB36B0109; Thu, 25 Feb 2021 20:22:14 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 30A9E8D0003; Thu, 25 Feb 2021 20:22:14 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0122.hostedemail.com [216.40.44.122]) by kanga.kvack.org (Postfix) with ESMTP id 15E296B0108 for ; Thu, 25 Feb 2021 20:22:14 -0500 (EST) Received: from smtpin01.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with ESMTP id DE56A1841FC94 for ; Fri, 26 Feb 2021 01:22:13 +0000 (UTC) X-FDA: 77858668146.01.7D31DF1 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by imf28.hostedemail.com (Postfix) with ESMTP id 7739A2000380 for ; Fri, 26 Feb 2021 01:22:13 +0000 (UTC) Received: by mail.kernel.org (Postfix) with ESMTPSA id 11CE464EE2; Fri, 26 Feb 2021 01:22:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linux-foundation.org; s=korg; t=1614302532; bh=TVrxXkYTJcU0Gp/HSjm3U7SJ7YxdjhEj83u/xBA/uFM=; h=Date:From:To:Subject:In-Reply-To:From; b=yI8DsRdU4PM11pnkAUS+LVrgPqaR28oFO3l802OLQoQOFQ2t/POmKAE9KAmFkv021 EN+8MUYI/J0r3jvnY91gCmqAxm40by+5nbhcAWEynL1LT75etHeya8Nfj5JLlIL/Vw ahC8wmWVrXr10A2JMI5C49pHEgPJzH1xSpL/VAD8= Date: Thu, 25 Feb 2021 17:22:11 -0800 From: Andrew Morton To: akpm@linux-foundation.org, guilak@linux.vnet.ibm.com, linux-mm@kvack.org, masahiroy@kernel.org, mchehab@kernel.org, mm-commits@vger.kernel.org, rdunlap@infradead.org, rlrevell@joe-job.com, torvalds@linux-foundation.org Subject: [patch 108/118] init/version.c: remove Version_ symbol Message-ID: <20210226012211.04CF0wM3g%akpm@linux-foundation.org> In-Reply-To: <20210225171452.713967e96554bb6a53e44a19@linux-foundation.org> User-Agent: s-nail v14.8.16 X-Rspamd-Server: rspam04 X-Rspamd-Queue-Id: 7739A2000380 X-Stat-Signature: k49nn1oby3mnjdujnbaih3zfwnopkj1p Received-SPF: none (linux-foundation.org>: No applicable sender policy available) receiver=imf28; identity=mailfrom; envelope-from=""; helo=mail.kernel.org; client-ip=198.145.29.99 X-HE-DKIM-Result: pass/pass X-HE-Tag: 1614302533-119739 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: From: Masahiro Yamada Subject: 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 197dcffc8ba0 ("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 4eb9241127a0 ("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 --- init/version.c | 8 -------- 1 file changed, 8 deletions(-) --- a/init/version.c~init-versionc-remove-version_linux_version_code-symbol +++ a/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 = {