From: Luis Chamberlain <mcgrof@kernel.org>
To: herbert@gondor.apana.org.au, davem@davemloft.net
Cc: ebiederm@xmission.com, linux-crypto@vger.kernel.org,
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] crypto: simplify one-level sysctl registration for crypto_sysctl_table
Date: Fri, 10 Mar 2023 15:21:50 -0800 [thread overview]
Message-ID: <20230310232150.3957148-1-mcgrof@kernel.org> (raw)
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>
---
If not clear, see this new doc:
https://lore.kernel.org/all/20230310223947.3917711-1-mcgrof@kernel.org/T/#u
But the skinny is we can deprecate long term APIs from sysctl that
uses recursion.
crypto/fips.c | 11 +----------
1 file changed, 1 insertion(+), 10 deletions(-)
diff --git a/crypto/fips.c b/crypto/fips.c
index b05d3c7b3ca5..92fd506abb21 100644
--- a/crypto/fips.c
+++ b/crypto/fips.c
@@ -66,20 +66,11 @@ static struct ctl_table crypto_sysctl_table[] = {
{}
};
-static struct ctl_table crypto_dir_table[] = {
- {
- .procname = "crypto",
- .mode = 0555,
- .child = crypto_sysctl_table
- },
- {}
-};
-
static struct ctl_table_header *crypto_sysctls;
static void crypto_proc_fips_init(void)
{
- crypto_sysctls = register_sysctl_table(crypto_dir_table);
+ crypto_sysctls = register_sysctl("crypto", crypto_sysctl_table);
}
static void crypto_proc_fips_exit(void)
--
2.39.1
next reply other threads:[~2023-03-10 23:22 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-10 23:21 Luis Chamberlain [this message]
2023-03-17 3:29 ` [PATCH] crypto: simplify one-level sysctl registration for crypto_sysctl_table Herbert Xu
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=20230310232150.3957148-1-mcgrof@kernel.org \
--to=mcgrof@kernel.org \
--cc=davem@davemloft.net \
--cc=ebiederm@xmission.com \
--cc=herbert@gondor.apana.org.au \
--cc=j.granados@samsung.com \
--cc=keescook@chromium.org \
--cc=linux-crypto@vger.kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=patches@lists.linux.dev \
--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).