From patchwork Fri Mar 10 22:52:36 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Luis R. Rodriguez" X-Patchwork-Id: 13170369 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 E9CC4C7618A for ; Fri, 10 Mar 2023 22:52:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230132AbjCJWwx (ORCPT ); Fri, 10 Mar 2023 17:52:53 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60164 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231759AbjCJWwv (ORCPT ); Fri, 10 Mar 2023 17:52:51 -0500 Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D26EE10CEB6; Fri, 10 Mar 2023 14:52:50 -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:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From: Reply-To:Content-Type:Content-ID:Content-Description; bh=QW9GIbAobkeAXWbUYe5gq2AaLt/O0c18zzLfU/gY9Eg=; b=zGkV+OLlEKWU+12XWv2DkVkSEu b3wSv+r4o8A9DyZ79zE9r+xoj5nbYWztfKpbo+APy07H1OVlcgy0S8Xu3+ANsFRXLVxQFV1Ui+wMh 7y+O4+fPY0EZZO0G9jj/koXh/wJ73RqLQpd9G2VpPnNfJFgGEMBhb8JYbLd56op2YEEYN+OZPwjzt WEk0KZ3Sx2HpwCR+SOcLXjibh0LYRMeb/mearHB1w8lnn50wiMP4CA1x8HVytqC59RN7eTHht4zf9 ar8m14K6i9OnW9jXlfMlYA63nt3Cr2TKggHHjMTaeMWMRSlX8SAnZxj4/JRM9aLDF9LXLs7SyBPar Pq0G6vaw==; Received: from mcgrof by bombadil.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1palbL-00GWqp-RQ; Fri, 10 Mar 2023 22:52:39 +0000 From: Luis Chamberlain To: chuck.lever@oracle.com, jlayton@kernel.org, trond.myklebust@hammerspace.com, anna@kernel.org, davem@davemloft.net, edumazet@google.com, pabeni@redhat.com, kuba@kernel.org, linux-nfs@vger.kernel.org Cc: ebiederm@xmission.com, keescook@chromium.org, yzaikin@google.com, j.granados@samsung.com, patches@lists.linux.dev, linux-fsdevel@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Luis Chamberlain Subject: [PATCH 5/5] sunrpc: simplify one-level sysctl registration for debug_table Date: Fri, 10 Mar 2023 14:52:36 -0800 Message-Id: <20230310225236.3939443-6-mcgrof@kernel.org> X-Mailer: git-send-email 2.37.1 In-Reply-To: <20230310225236.3939443-1-mcgrof@kernel.org> References: <20230310225236.3939443-1-mcgrof@kernel.org> MIME-Version: 1.0 Sender: Luis Chamberlain Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org There is no need to declare an extra tables to just create directory, this can be easily be done with a prefix path with register_sysctl(). Simplify this registration. Signed-off-by: Luis Chamberlain --- net/sunrpc/sysctl.c | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/net/sunrpc/sysctl.c b/net/sunrpc/sysctl.c index 4120797bf740..8000828b139f 100644 --- a/net/sunrpc/sysctl.c +++ b/net/sunrpc/sysctl.c @@ -80,21 +80,11 @@ static struct ctl_table debug_table[] = { { } }; -static struct ctl_table sunrpc_table[] = { - { - .procname = "sunrpc", - .mode = 0555, - .child = debug_table - }, - { } -}; - - void rpc_register_sysctl(void) { if (!sunrpc_table_header) - sunrpc_table_header = register_sysctl_table(sunrpc_table); + sunrpc_table_header = register_sysctl("sunrpc", debug_table); } void