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 1/6] s390: simplify one-level sysctl registration for topology_ctl_table
Date: Fri, 10 Mar 2023 15:45:20 -0800	[thread overview]
Message-ID: <20230310234525.3986352-2-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/kernel/topology.c | 12 +-----------
 1 file changed, 1 insertion(+), 11 deletions(-)

diff --git a/arch/s390/kernel/topology.c b/arch/s390/kernel/topology.c
index c6eecd4a5302..e5d6a1c25d13 100644
--- a/arch/s390/kernel/topology.c
+++ b/arch/s390/kernel/topology.c
@@ -637,16 +637,6 @@ static struct ctl_table topology_ctl_table[] = {
 	{ },
 };
 
-static struct ctl_table topology_dir_table[] = {
-	{
-		.procname	= "s390",
-		.maxlen		= 0,
-		.mode		= 0555,
-		.child		= topology_ctl_table,
-	},
-	{ },
-};
-
 static int __init topology_init(void)
 {
 	timer_setup(&topology_timer, topology_timer_fn, TIMER_DEFERRABLE);
@@ -654,7 +644,7 @@ static int __init topology_init(void)
 		set_topology_timer();
 	else
 		topology_update_polarization_simple();
-	register_sysctl_table(topology_dir_table);
+	register_sysctl("s390", topology_ctl_table);
 	return device_create_file(cpu_subsys.dev_root, &dev_attr_dispatching);
 }
 device_initcall(topology_init);
-- 
2.39.1


  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 ` Luis Chamberlain [this message]
2023-03-10 23:45 ` [PATCH 2/6] s390: simplify one-level syctl registration for s390dbf_table Luis Chamberlain
2023-03-10 23:45 ` [PATCH 3/6] s390: simplify one-level sysctl registration for appldata_table Luis Chamberlain
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-2-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).