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 5/6] s390: simplify one-level sysctl registration for page_table_sysctl
Date: Fri, 10 Mar 2023 15:45:24 -0800 [thread overview]
Message-ID: <20230310234525.3986352-6-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/mm/pgalloc.c | 12 +-----------
1 file changed, 1 insertion(+), 11 deletions(-)
diff --git a/arch/s390/mm/pgalloc.c b/arch/s390/mm/pgalloc.c
index 2de48b2c1b04..0f68b7257e08 100644
--- a/arch/s390/mm/pgalloc.c
+++ b/arch/s390/mm/pgalloc.c
@@ -33,19 +33,9 @@ static struct ctl_table page_table_sysctl[] = {
{ }
};
-static struct ctl_table page_table_sysctl_dir[] = {
- {
- .procname = "vm",
- .maxlen = 0,
- .mode = 0555,
- .child = page_table_sysctl,
- },
- { }
-};
-
static int __init page_table_register_sysctl(void)
{
- return register_sysctl_table(page_table_sysctl_dir) ? 0 : -ENOMEM;
+ return register_sysctl("vm", page_table_sysctl) ? 0 : -ENOMEM;
}
__initcall(page_table_register_sysctl);
--
2.39.1
next prev parent reply other threads:[~2023-03-10 23:46 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 ` [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 ` Luis Chamberlain [this message]
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-6-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).