From patchwork Fri Mar 10 23:35:21 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Luis Chamberlain X-Patchwork-Id: 13170451 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 80E28C6FA99 for ; Fri, 10 Mar 2023 23:37:04 +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:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:Cc :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=1nD/c5COfEhHFRFoSokcKqi2r90sonIwPobGCb74uVU=; b=Uhsf/mxpNa4R4x rULylIVpzLeIlEVzYc2tcuoxU+k9bLnX8RIM6MrLVN/VR8SDdZ+p8E209QICXIAtu9pX+ma0OGZ8S UF/im25aopU+kjwGNIYrGrfV474jmsVvGo1nSWv/YvFwPc/X7cElH/Xc1LiIiew/X6PXR4TWOriB+ HJj0dZmY4zkY3yBHOOXT57kKDEdWxSSVhHrNz9ZnDBp9dZF1UTxQXd6wQeNBjGJjuNdKGnta3Tag4 dFdk4pkCUNnz5cdMYN6OUqK8SDtR6VTQ+G6sxBMUj6d0AXzXLyo0u6RZOxGJA7jKECiVgQ4rZc5kE nOSQou8hW8kdFqjD4L/A==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pamHP-00Gfl8-Vu; Fri, 10 Mar 2023 23:36:08 +0000 Received: from mcgrof by bombadil.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1pamGh-00GfIo-DK; Fri, 10 Mar 2023 23:35:23 +0000 From: Luis Chamberlain To: linux@armlinux.org.uk, linux-arm-kernel@lists.infradead.org Cc: ebiederm@xmission.com, keescook@chromium.org, yzaikin@google.com, j.granados@samsung.com, patches@lists.linux.dev, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, Luis Chamberlain Subject: [PATCH] arm: simplify two-level sysctl registration for ctl_isa_vars Date: Fri, 10 Mar 2023 15:35:21 -0800 Message-Id: <20230310233521.3971907-1-mcgrof@kernel.org> X-Mailer: git-send-email 2.37.1 MIME-Version: 1.0 X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org There is no need to declare two tables to just create directories, this can be easily be done with a prefix path with register_sysctl(). Simplify this registration. Signed-off-by: Luis Chamberlain --- For more details see the new docs being updated [0]. [0] https://lore.kernel.org/all/20230310223947.3917711-1-mcgrof@kernel.org/T/#u arch/arm/kernel/isa.c | 18 +----------------- 1 file changed, 1 insertion(+), 17 deletions(-) diff --git a/arch/arm/kernel/isa.c b/arch/arm/kernel/isa.c index d8a509c5d5bd..20218876bef2 100644 --- a/arch/arm/kernel/isa.c +++ b/arch/arm/kernel/isa.c @@ -40,27 +40,11 @@ static struct ctl_table ctl_isa_vars[4] = { static struct ctl_table_header *isa_sysctl_header; -static struct ctl_table ctl_isa[2] = { - { - .procname = "isa", - .mode = 0555, - .child = ctl_isa_vars, - }, {} -}; - -static struct ctl_table ctl_bus[2] = { - { - .procname = "bus", - .mode = 0555, - .child = ctl_isa, - }, {} -}; - void __init register_isa_ports(unsigned int membase, unsigned int portbase, unsigned int portshift) { isa_membase = membase; isa_portbase = portbase; isa_portshift = portshift; - isa_sysctl_header = register_sysctl_table(ctl_bus); + isa_sysctl_header = register_sysctl("bus/isa", ctl_isa_vars); }