* [PATCH 0/2] x86: simplify sysctl registrations
@ 2023-03-10 23:32 Luis Chamberlain
2023-03-10 23:32 ` [PATCH 1/2] x86: simplify one-level sysctl registration for abi_table2 Luis Chamberlain
2023-03-10 23:32 ` [PATCH 2/2] x86: simplify one-level sysctl registration for itmt_kern_table Luis Chamberlain
0 siblings, 2 replies; 3+ messages in thread
From: Luis Chamberlain @ 2023-03-10 23:32 UTC (permalink / raw)
To: luto, tglx, mingo, bp, dave.hansen, x86, hpa
Cc: ebiederm, keescook, yzaikin, j.granados, patches, linux-fsdevel,
linux-kernel, Luis Chamberlain
These are trivial conversions to reduce more code and avoid API calls
that we are deprecating [0].
[0] https://lore.kernel.org/all/20230310223947.3917711-1-mcgrof@kernel.org/T/#u
Luis Chamberlain (2):
x86: simplify one-level sysctl registration for abi_table2
x86: simplify one-level sysctl registration for itmt_kern_table
arch/x86/entry/vdso/vdso32-setup.c | 11 +----------
arch/x86/kernel/itmt.c | 11 +----------
2 files changed, 2 insertions(+), 20 deletions(-)
--
2.39.1
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH 1/2] x86: simplify one-level sysctl registration for abi_table2
2023-03-10 23:32 [PATCH 0/2] x86: simplify sysctl registrations Luis Chamberlain
@ 2023-03-10 23:32 ` Luis Chamberlain
2023-03-10 23:32 ` [PATCH 2/2] x86: simplify one-level sysctl registration for itmt_kern_table Luis Chamberlain
1 sibling, 0 replies; 3+ messages in thread
From: Luis Chamberlain @ 2023-03-10 23:32 UTC (permalink / raw)
To: luto, tglx, mingo, bp, dave.hansen, x86, hpa
Cc: ebiederm, 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>
---
arch/x86/entry/vdso/vdso32-setup.c | 11 +----------
1 file changed, 1 insertion(+), 10 deletions(-)
diff --git a/arch/x86/entry/vdso/vdso32-setup.c b/arch/x86/entry/vdso/vdso32-setup.c
index 3b300a773c7e..f3b3cacbcbb0 100644
--- a/arch/x86/entry/vdso/vdso32-setup.c
+++ b/arch/x86/entry/vdso/vdso32-setup.c
@@ -70,18 +70,9 @@ static struct ctl_table abi_table2[] = {
{}
};
-static struct ctl_table abi_root_table2[] = {
- {
- .procname = "abi",
- .mode = 0555,
- .child = abi_table2
- },
- {}
-};
-
static __init int ia32_binfmt_init(void)
{
- register_sysctl_table(abi_root_table2);
+ register_sysctl("abi", abi_table2);
return 0;
}
__initcall(ia32_binfmt_init);
--
2.39.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [PATCH 2/2] x86: simplify one-level sysctl registration for itmt_kern_table
2023-03-10 23:32 [PATCH 0/2] x86: simplify sysctl registrations Luis Chamberlain
2023-03-10 23:32 ` [PATCH 1/2] x86: simplify one-level sysctl registration for abi_table2 Luis Chamberlain
@ 2023-03-10 23:32 ` Luis Chamberlain
1 sibling, 0 replies; 3+ messages in thread
From: Luis Chamberlain @ 2023-03-10 23:32 UTC (permalink / raw)
To: luto, tglx, mingo, bp, dave.hansen, x86, hpa
Cc: ebiederm, 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>
---
arch/x86/kernel/itmt.c | 11 +----------
1 file changed, 1 insertion(+), 10 deletions(-)
diff --git a/arch/x86/kernel/itmt.c b/arch/x86/kernel/itmt.c
index 9ff480e94511..670eb08b972a 100644
--- a/arch/x86/kernel/itmt.c
+++ b/arch/x86/kernel/itmt.c
@@ -77,15 +77,6 @@ static struct ctl_table itmt_kern_table[] = {
{}
};
-static struct ctl_table itmt_root_table[] = {
- {
- .procname = "kernel",
- .mode = 0555,
- .child = itmt_kern_table,
- },
- {}
-};
-
static struct ctl_table_header *itmt_sysctl_header;
/**
@@ -114,7 +105,7 @@ int sched_set_itmt_support(void)
return 0;
}
- itmt_sysctl_header = register_sysctl_table(itmt_root_table);
+ itmt_sysctl_header = register_sysctl("kernel", itmt_kern_table);
if (!itmt_sysctl_header) {
mutex_unlock(&itmt_update_mutex);
return -ENOMEM;
--
2.39.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
end of thread, other threads:[~2023-03-10 23:33 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-03-10 23:32 [PATCH 0/2] x86: simplify sysctl registrations Luis Chamberlain
2023-03-10 23:32 ` [PATCH 1/2] x86: simplify one-level sysctl registration for abi_table2 Luis Chamberlain
2023-03-10 23:32 ` [PATCH 2/2] x86: simplify one-level sysctl registration for itmt_kern_table Luis Chamberlain
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).