From patchwork Mon May 22 21:08:12 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Luis Chamberlain X-Patchwork-Id: 13251133 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7A0D1C77B73 for ; Mon, 22 May 2023 21:08:57 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234308AbjEVVI4 (ORCPT ); Mon, 22 May 2023 17:08:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35458 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231241AbjEVVIz (ORCPT ); Mon, 22 May 2023 17:08:55 -0400 Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E882F9D; Mon, 22 May 2023 14:08:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Sender:Content-Transfer-Encoding: MIME-Version:Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-Type: Content-ID:Content-Description:In-Reply-To:References; bh=ruA1o1aWWqhoGunqxzs4d011qFZVDul7CrOFbNPB0ws=; b=ms2snZCjiEJFl5SmiuOFzrdKQ6 MYICcqiEnfWgGuIvZPyTwWCLAxBPXwTyJK2C+UQ6arMXNyL6Hcrpr/KeoD09Luk5woD4jxokn8AqR Ce1damz3W/RLHF+v+S0jzo5xerE6IKDIh+s0a63d5C/KdXHmYdlB+0pF0FV5I5a43cE3Pu/FwVxjG 9BSLpzNyI+K8ospD5vZ20z/1v3b9gNTOdvmprPE47bgPmXMnOgaWZwWbaxpcygLUGvZdvrrfQ5F0H HSsiKJjhNQ6APzqDA7KPyJwibBo+0XW3Y4lKSAuGXvDTVlOsHxqAKCEzJP7M67AmAtM0Y2rY0AtKY SQSBOpVg==; Received: from mcgrof by bombadil.infradead.org with local (Exim 4.96 #2 (Red Hat Linux)) id 1q1ClL-0083JV-1j; Mon, 22 May 2023 21:08:15 +0000 From: Luis Chamberlain To: keescook@chromium.org, yzaikin@google.com, ebiederm@xmission.com, arnd@arndb.de, bp@alien8.de, James.Bottomley@HansenPartnership.com, deller@gmx.de, tglx@linutronix.de, mingo@redhat.com, dave.hansen@linux.intel.com, x86@kernel.org, hpa@zytor.com, luto@kernel.org, peterz@infradead.org, brgerst@gmail.com, christophe.jaillet@wanadoo.fr, kirill.shutemov@linux.intel.com, jroedel@suse.de Cc: j.granados@samsung.com, akpm@linux-foundation.org, willy@infradead.org, linux-parisc@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, Luis Chamberlain Subject: [PATCH 0/2] kernel/sysctl.c: remove to major base directories Date: Mon, 22 May 2023 14:08:12 -0700 Message-Id: <20230522210814.1919325-1-mcgrof@kernel.org> X-Mailer: git-send-email 2.38.1 MIME-Version: 1.0 Sender: Luis Chamberlain Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@vger.kernel.org Arnd, x86 folks, your review for the second patch would be greatly appreciated. Now that Joel has cleaned up and removed one of the routines which we wanted to deprecate, remove two major arrays from kernel/sysctl.c which are empty or almost empty. One of them, the debug one just needs moving to its source, so do that. The move for the signal sysctl costs us 23 bytes but we have already saved 1465 bytes with the other recent cleanup Joel made. The next step is to depreecate one more call and then we can simplify the registration to only use ARRAY_SIZE() completely and remove the extra empty entries all over. That should save us tons of bytes all around in the kernel and we'd then later kill for good all recursion possible sysctl registration calls. These patches apply on top of sysctl-next [0] which already carry Joel's patches. [0] https://git.kernel.org/pub/scm/linux/kernel/git/mcgrof/linux.git/log/?h=sysctl-next Luis Chamberlain (2): sysctl: remove empty dev table signal: move show_unhandled_signals sysctl to its own file arch/parisc/kernel/traps.c | 1 + arch/x86/kernel/signal.c | 1 + arch/x86/kernel/traps.c | 1 + arch/x86/kernel/umip.c | 1 + arch/x86/mm/fault.c | 1 + kernel/signal.c | 23 +++++++++++++++++++++++ kernel/sysctl.c | 19 ------------------- 7 files changed, 28 insertions(+), 19 deletions(-)