linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Luis Chamberlain <mcgrof@kernel.org>
To: hca@linux.ibm.com, agordeev@linux.ibm.com,
	borntraeger@linux.ibm.com, svens@linux.ibm.com,
	linux-s390@vger.kernel.org, sudipm.mukherjee@gmail.com
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 <mcgrof@kernel.org>
Subject: [PATCH 3/6] s390: simplify one-level sysctl registration for appldata_table
Date: Fri, 10 Mar 2023 15:45:22 -0800	[thread overview]
Message-ID: <20230310234525.3986352-4-mcgrof@kernel.org> (raw)
In-Reply-To: <20230310234525.3986352-1-mcgrof@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 <mcgrof@kernel.org>
---
 arch/s390/appldata/appldata_base.c | 12 +-----------
 1 file changed, 1 insertion(+), 11 deletions(-)

diff --git a/arch/s390/appldata/appldata_base.c b/arch/s390/appldata/appldata_base.c
index c0fd29133f27..c593f2228083 100644
--- a/arch/s390/appldata/appldata_base.c
+++ b/arch/s390/appldata/appldata_base.c
@@ -66,16 +66,6 @@ static struct ctl_table appldata_table[] = {
 	{ },
 };
 
-static struct ctl_table appldata_dir_table[] = {
-	{
-		.procname	= appldata_proc_name,
-		.maxlen		= 0,
-		.mode		= S_IRUGO | S_IXUGO,
-		.child		= appldata_table,
-	},
-	{ },
-};
-
 /*
  * Timer
  */
@@ -422,7 +412,7 @@ static int __init appldata_init(void)
 	appldata_wq = alloc_ordered_workqueue("appldata", 0);
 	if (!appldata_wq)
 		return -ENOMEM;
-	appldata_sysctl_header = register_sysctl_table(appldata_dir_table);
+	appldata_sysctl_header = register_sysctl(appldata_proc_name, appldata_table);
 	return 0;
 }
 
-- 
2.39.1


  parent reply	other threads:[~2023-03-10 23:45 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-10 23:45 [PATCH 0/6] s390: simplify sysctl registration Luis Chamberlain
2023-03-10 23:45 ` [PATCH 1/6] s390: simplify one-level sysctl registration for topology_ctl_table Luis Chamberlain
2023-03-10 23:45 ` [PATCH 2/6] s390: simplify one-level syctl registration for s390dbf_table Luis Chamberlain
2023-03-10 23:45 ` Luis Chamberlain [this message]
2023-03-10 23:45 ` [PATCH 4/6] s390: simplify one level sysctl registration for cmm_table Luis Chamberlain
2023-03-10 23:45 ` [PATCH 5/6] s390: simplify one-level sysctl registration for page_table_sysctl Luis Chamberlain
2023-03-10 23:45 ` [PATCH 6/6] s390: simplify dynamic sysctl registration for appldata_register_ops Luis Chamberlain
2023-03-13 13:13   ` Vasily Gorbik
2023-03-13 13:16 ` [PATCH 0/6] s390: simplify sysctl registration Vasily Gorbik

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230310234525.3986352-4-mcgrof@kernel.org \
    --to=mcgrof@kernel.org \
    --cc=agordeev@linux.ibm.com \
    --cc=borntraeger@linux.ibm.com \
    --cc=ebiederm@xmission.com \
    --cc=hca@linux.ibm.com \
    --cc=j.granados@samsung.com \
    --cc=keescook@chromium.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-s390@vger.kernel.org \
    --cc=patches@lists.linux.dev \
    --cc=sudipm.mukherjee@gmail.com \
    --cc=svens@linux.ibm.com \
    --cc=yzaikin@google.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).