Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp3477880rwd; Mon, 22 May 2023 14:37:20 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ67pxH3ozN5xBpHTapH1skXbiaqq/G75kp5rMO3WP9JCnWKMEl663j+1M3CJM9Z6jc9DCMD X-Received: by 2002:a05:6a20:3d27:b0:10c:6dbc:2810 with SMTP id y39-20020a056a203d2700b0010c6dbc2810mr211331pzi.62.1684791440557; Mon, 22 May 2023 14:37:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684791440; cv=none; d=google.com; s=arc-20160816; b=OVYk2ZxUkDEcJxYS4H27Lg6vx0sFx5pFd7cOUMYXMYkBQhXVqAauQHEf/tb/JZ7weG SJAz67Z5Nme0SSn4nkWqiUmvfa7erYfOf56y53iYzPoSacKsse1n2HnmqsDHln6Pzz8J rzRNyNlHjrhzZw5NzOAz+LcVZbNak/mCS7rkah2fnVTBUp8Z+tqX/QHsdo7+5dXS/syy XXJ4EtwKKhf7c8UavX1HnhcswN724MYjAXy0mifytQqBzLl/gqPNV4S/hS34+MAftj3d 9EMKPcl/br+I6KulY6gwQvvguUU2lev8+RVaiV4xPnsMtLokZVs8RkiLJ5o0qNOtVCMG hTdw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=SHkCwnoLOgnVuVhD20vulZh61NLbbufsccKwdmPmKe0=; b=dbWYyaMKAC7jIBCx6KJWtgKpkJ6CsFyoKPJIX1PMEbEuxY1R+dWnT+gBr3+zPlGaR6 RGS2onlIOklmZOHOCTZoCEpK47RQrVUoxTyGsPDlVnDBo3TD5QZk8LdHJYVZnstL3FJ1 q2TP0fqNdy6OXpA9urN+9asfdJoEO7XKb/75bnzUPB5PzwY3exSHMkJ66XQB7mkhUpnF yUnJuz9FgOJycYvQdCndD5Olxp/M9EKoRvjO1gMiSW7ereJD/9LLE/IFAZlA6QrYlTsP bq8nfzlDstwSJp46+kgagPJFbP6BdQewU4cWqUznGYQUWJeeM2STI0TEAYIkEHdqpzXA WDiw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=3+ViBShJ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id q1-20020a63ae01000000b0053076a4da8asi1184145pgf.770.2023.05.22.14.37.08; Mon, 22 May 2023 14:37:20 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=3+ViBShJ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235412AbjEVVI7 (ORCPT + 99 others); Mon, 22 May 2023 17:08:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35460 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231578AbjEVVIz (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 0ADB6B7; Mon, 22 May 2023 14:08:53 -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:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From: Reply-To:Content-Type:Content-ID:Content-Description; bh=SHkCwnoLOgnVuVhD20vulZh61NLbbufsccKwdmPmKe0=; b=3+ViBShJncDAQy18KcmgYZPDfh 2EZjgeRNFNk2NCSMlDeeEDwQ3QNAuELjYUd4ru9kJme1XuXSxJbvQl9pPjYXwgRl5jvvsv6MbjO8A LaXolrlAMYoKKltKZfYpjr0gzCDsSuh3LiGObMk8eRlDVo0jK/ii1UMGMsv23DtGN3x7abK87VzGv s4Q4/NmuPfGZLzhhki6F1KMn4wWH88IV+LHem8c5vtu2IadmqByk01bApHYPNm0IOqspuQpkF9k6h 4g/SN9gB92ZuixcWRyoKu/B7EWwHetM+WG2LBnp2p5NGvS7NLlb2y+ak1r8fGDnJLoyEU95vdI26i j38o91hQ==; Received: from mcgrof by bombadil.infradead.org with local (Exim 4.96 #2 (Red Hat Linux)) id 1q1ClL-0083Ja-1t; 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 1/2] sysctl: remove empty dev table Date: Mon, 22 May 2023 14:08:13 -0700 Message-Id: <20230522210814.1919325-2-mcgrof@kernel.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230522210814.1919325-1-mcgrof@kernel.org> References: <20230522210814.1919325-1-mcgrof@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: Luis Chamberlain X-Spam-Status: No, score=-4.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_EF,HEADER_FROM_DIFFERENT_DOMAINS, RCVD_IN_DNSWL_MED,SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Now that all the dev sysctls have been moved out we can remove the dev sysctl base directory. We don't need to create base directories, they are created for you as if using 'mkdir -p' with register_syctl() and register_sysctl_init(). For details refer to sysctl_mkdir_p() usage. We save 90 bytes with this changes: ./scripts/bloat-o-meter vmlinux.2.remove-sysctl-table vmlinux.3-remove-dev-table add/remove: 0/1 grow/shrink: 0/1 up/down: 0/-90 (-90) Function old new delta sysctl_init_bases 111 85 -26 dev_table 64 - -64 Total: Before=21257057, After=21256967, chg -0.00% Signed-off-by: Luis Chamberlain --- kernel/sysctl.c | 5 ----- 1 file changed, 5 deletions(-) diff --git a/kernel/sysctl.c b/kernel/sysctl.c index fa2aa8bd32b6..a7fdb828afb6 100644 --- a/kernel/sysctl.c +++ b/kernel/sysctl.c @@ -2344,16 +2344,11 @@ static struct ctl_table debug_table[] = { { } }; -static struct ctl_table dev_table[] = { - { } -}; - int __init sysctl_init_bases(void) { register_sysctl_init("kernel", kern_table); register_sysctl_init("vm", vm_table); register_sysctl_init("debug", debug_table); - register_sysctl_init("dev", dev_table); return 0; } -- 2.39.2