From patchwork Mon Oct 2 11:30:38 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Joel Granados via B4 Relay X-Patchwork-Id: 13405873 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id CF3F0E784A4 for ; Mon, 2 Oct 2023 11:29:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:Reply-To:List-Subscribe:List-Help: List-Post:List-Archive:List-Unsubscribe:List-Id:Cc:To:In-Reply-To:References: Message-Id:MIME-Version:Subject:Date:From:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=FyBSE4FKb5tVi8DWGAOs4ukTAnV9azZBV68i/hjvzjQ=; b=nF4A4scAiPq8U2 3PXjr1wkI+hdOHrWARSfG8BoP4VR/97eS6z0uh62RAEWCWN0l8BebVkG3Yy4li0X732tjUF/n+sVG a7LWDiWzDD6BFoM0ocVUZshUjmwN24RQWfm9kr6P0DgvXMWqnZn22r01N6OIktKNyTi+AmW+7Qh6b n0o3nZzPOA4ERF+zpX3rPc+RBGDowKe06Bv2fifwpgBWHZLJ9Hn5nDknbDeKNLQYr4/pKRRkI5XaR v3nBxc0xmx7XTprP8Po4vrtS60JBLTeQS5G0DuMat60VYJRiGIy2c/SG4L4LkOJ70vxUsCNwdWsk2 olI4iPI97naKZs4LXMGw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qnH7K-00CXYW-0M; Mon, 02 Oct 2023 11:29:38 +0000 Received: from sin.source.kernel.org ([145.40.73.55]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qnH73-00CXGs-19; Mon, 02 Oct 2023 11:29:29 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by sin.source.kernel.org (Postfix) with ESMTP id 2EBA0CE0ECE; Mon, 2 Oct 2023 11:29:19 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPS id E58DFC433A9; Mon, 2 Oct 2023 11:29:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1696246157; bh=paEg7jbS6ClwadfTjCY8spaWc4zoBRD4LNZENNl+tI0=; h=From:Date:Subject:References:In-Reply-To:To:Cc:Reply-To:From; b=g63JmB3FwRN+ONhF0yFWNoeQbjgW/+dLj88bOfgo+g4WnhlVqgsUhvBXVnqIBEzEa NKA9xpv4v5bqJz5FshYIhdGxjJU/3V+BIpN6DXNW9yYrdu3/naHi10PvjraNLxtpvP lqVL9unEsn8m6mroat6KP9YTq+agMsSs1+ErBDFVshRf5GSQdusPBba1LGchOx1Xw8 ZC73IWYzrJKtOWva3dJcYa0yaY51FbhDQU/XF7igYRnnXwiQodv8iGaZ712BCL6IEh wNHCzz00hC9vYtc17q6bF+uXjeU37b1Ejcs8O5iyNoQZWkXnhXqj8ZfBgNxH5Kk0qe f49vMMABDx3zA== Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id C993EE784B3; Mon, 2 Oct 2023 11:29:16 +0000 (UTC) From: Joel Granados via B4 Relay Date: Mon, 02 Oct 2023 13:30:38 +0200 Subject: [PATCH v3 3/7] arch/x86: Remove now superfluous sentinel elem from ctl_table arrays MIME-Version: 1.0 Message-Id: <20231002-jag-sysctl_remove_empty_elem_arch-v3-3-606da2840a7a@samsung.com> References: <20231002-jag-sysctl_remove_empty_elem_arch-v3-0-606da2840a7a@samsung.com> In-Reply-To: <20231002-jag-sysctl_remove_empty_elem_arch-v3-0-606da2840a7a@samsung.com> To: Luis Chamberlain , willy@infradead.org, josh@joshtriplett.org, Kees Cook , Iurii Zaikin , Heiko Carstens , Vasily Gorbik , Alexander Gordeev , Christian Borntraeger , Sven Schnelle , Gerald Schaefer , Russell King , Catalin Marinas , Will Deacon , Mark Rutland , Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , x86@kernel.org, "H. Peter Anvin" , Andy Lutomirski , Paul Walmsley , Palmer Dabbelt , Albert Ou , Michael Ellerman , Nicholas Piggin , Christophe Leroy , Guo Ren , Alexey Gladkov Cc: linux-fsdevel@vger.kernel.org, linux-s390@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-riscv@lists.infradead.org, linuxppc-dev@lists.ozlabs.org, linux-ia64@vger.kernel.org, linux-csky@vger.kernel.org, Joel Granados , Ingo Molnar X-Mailer: b4 0.13-dev-86aa5 X-Developer-Signature: v=1; a=openpgp-sha256; l=1593; i=j.granados@samsung.com; h=from:subject:message-id; bh=PwJWF8dvooepoMNz/p+1M3MxYdMvjcobbwcaQ8BSBXs=; b=owEB7QES/pANAwAKAbqXzVK3lkFPAcsmYgBlGqoTaJgUocisU/uKHeKQW8lN62asIcRF0tSyU j1bINvl5aaJAbMEAAEKAB0WIQSuRwlXJeYxJc7LJ5C6l81St5ZBTwUCZRqqEwAKCRC6l81St5ZB T2WoC/42iLPK3Fpv9v0/UXHAJOtoq4rmwpC6LV+o8A8lRqkO0uVf5VMImgogTwxzXQr1P3Yp0/f VkRKFwLFysV0LI5OTH18s+1eSsihUKcyNYRItL+Uq+SG7vI8uv3w4uq7ydWykr0/1p5fe90bFnZ rT/ph6DGwQ4RaSRd2IwaAXrJoLHLTaGD3zAA5eRCmU++8Rwy2+XIB0JWzH9N6Mp7B4yMOH+oCni h64V+45R1T69SCPmnI4rrG9sYfo2+IWLBGP+D8FI36C+FMUkuhSBjEnDfpt24eZTWWnMsAsJRbS 541J6mTwxGXlPqq3c2f4wXLAMWCm7qio0X0B9ufvk4Ck4h8LNlUwr4yB41O/apZOtev+opRUo2B KvuQDk4hosgIzP4dO6PC22swDlVoomqCwgBL6V0twDOwiRoFLJstFxcGJY+c4YgKfSn9XOzxLK0 boNkZU5mRziaQEPzuSz2ndrwThriKlNPPGY3pJaax9H01L2JtJ5vAJV1/zgY7rDFMm7jU= X-Developer-Key: i=j.granados@samsung.com; a=openpgp; fpr=F1F8E46D30F0F6C4A45FF4465895FAAC338C6E77 X-Endpoint-Received: by B4 Relay for j.granados@samsung.com/default with auth_id=70 X-Original-From: Joel Granados X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20231002_042921_766437_DF28934A X-CRM114-Status: GOOD ( 13.05 ) X-BeenThere: linux-riscv@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: j.granados@samsung.com Sender: "linux-riscv" Errors-To: linux-riscv-bounces+linux-riscv=archiver.kernel.org@lists.infradead.org From: Joel Granados This commit comes at the tail end of a greater effort to remove the empty elements at the end of the ctl_table arrays (sentinels) which will reduce the overall build time size of the kernel and run time memory bloat by ~64 bytes per sentinel (further information Link : https://lore.kernel.org/all/ZO5Yx5JFogGi%2FcBo@bombadil.infradead.org/) Remove sentinel element from sld_sysctl and itmt_kern_table. This removal is safe because register_sysctl_init and register_sysctl implicitly use the array size in addition to checking for the sentinel. Reviewed-by: Ingo Molnar Acked-by: Dave Hansen # for x86 Signed-off-by: Joel Granados --- arch/x86/kernel/cpu/intel.c | 1 - arch/x86/kernel/itmt.c | 1 - 2 files changed, 2 deletions(-) diff --git a/arch/x86/kernel/cpu/intel.c b/arch/x86/kernel/cpu/intel.c index be4045628fd3..d9bb53f49a4d 100644 --- a/arch/x86/kernel/cpu/intel.c +++ b/arch/x86/kernel/cpu/intel.c @@ -1016,7 +1016,6 @@ static struct ctl_table sld_sysctls[] = { .extra1 = SYSCTL_ZERO, .extra2 = SYSCTL_ONE, }, - {} }; static int __init sld_mitigate_sysctl_init(void) diff --git a/arch/x86/kernel/itmt.c b/arch/x86/kernel/itmt.c index ee4fe8cdb857..9a7c03d47861 100644 --- a/arch/x86/kernel/itmt.c +++ b/arch/x86/kernel/itmt.c @@ -74,7 +74,6 @@ static struct ctl_table itmt_kern_table[] = { .extra1 = SYSCTL_ZERO, .extra2 = SYSCTL_ONE, }, - {} }; static struct ctl_table_header *itmt_sysctl_header;