From nobody Wed Feb 11 18:50:05 2026 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 B1183C6FA99 for ; Fri, 10 Mar 2023 23:35:42 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231674AbjCJXfk (ORCPT ); Fri, 10 Mar 2023 18:35:40 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47474 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230477AbjCJXfh (ORCPT ); Fri, 10 Mar 2023 18:35:37 -0500 Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4104D13F685; Fri, 10 Mar 2023 15:35:36 -0800 (PST) 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=hPK/fuqWGb+L/yq0FoqZh+t2EUt8CyQKsPoCgU3n1N4=; b=WyfomRn9EHkdBQ+D/rCj4zc+2d r1EkjoZHO3xPwW9cM6oVpfstEGHHLjaz7SIF2ztkAnQJE1Iz67ybBYXnt5DbPlwRcLyxjBM7CdK6Z 3G5wGOORt71OnSCkdt+LgvoPKi4hcWBiV0dRwd4UzJodzpMlrsIL0mxYojGnHLBp2MajyRA2MubuA hqPgTuwbAXnWNGtKuQFgphJrHQVW+KbudGfyvVmrwvtwbGPfT8+VXPevRh/qAW17qFfMUVWMWO53n UJuLTolXNEXGWjwbq+fBz6npkmEEP+5V+5VoYdJtYiote9/eo/NXh0Sx1pGmtx5XMhtw7EX4O7sUd zzMRjGsw==; 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 Content-Transfer-Encoding: quoted-printable Sender: Luis Chamberlain Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" 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 =20 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] =3D { =20 static struct ctl_table_header *isa_sysctl_header; =20 -static struct ctl_table ctl_isa[2] =3D { - { - .procname =3D "isa", - .mode =3D 0555, - .child =3D ctl_isa_vars, - }, {} -}; - -static struct ctl_table ctl_bus[2] =3D { - { - .procname =3D "bus", - .mode =3D 0555, - .child =3D ctl_isa, - }, {} -}; - void __init register_isa_ports(unsigned int membase, unsigned int portbase, unsigned i= nt portshift) { isa_membase =3D membase; isa_portbase =3D portbase; isa_portshift =3D portshift; - isa_sysctl_header =3D register_sysctl_table(ctl_bus); + isa_sysctl_header =3D register_sysctl("bus/isa", ctl_isa_vars); } --=20 2.39.1