* [PATCH] crypto: simplify one-level sysctl registration for crypto_sysctl_table
@ 2023-03-10 23:21 Luis Chamberlain
2023-03-17 3:29 ` Herbert Xu
0 siblings, 1 reply; 2+ messages in thread
From: Luis Chamberlain @ 2023-03-10 23:21 UTC (permalink / raw)
To: herbert, davem
Cc: ebiederm, linux-crypto, keescook, yzaikin, j.granados, patches,
linux-fsdevel, linux-kernel, Luis Chamberlain
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
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] crypto: simplify one-level sysctl registration for crypto_sysctl_table
2023-03-10 23:21 [PATCH] crypto: simplify one-level sysctl registration for crypto_sysctl_table Luis Chamberlain
@ 2023-03-17 3:29 ` Herbert Xu
0 siblings, 0 replies; 2+ messages in thread
From: Herbert Xu @ 2023-03-17 3:29 UTC (permalink / raw)
To: Luis Chamberlain
Cc: davem, ebiederm, linux-crypto, keescook, yzaikin, j.granados,
patches, linux-fsdevel, linux-kernel
On Fri, Mar 10, 2023 at 03:21:50PM -0800, Luis Chamberlain wrote:
> 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(-)
Patch applied. Thanks.
--
Email: Herbert Xu <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2023-03-17 3:30 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-03-10 23:21 [PATCH] crypto: simplify one-level sysctl registration for crypto_sysctl_table Luis Chamberlain
2023-03-17 3:29 ` Herbert Xu
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).