[tip:,x86/cleanups] x86: Simplify one-level sysctl registration for abi_table2

Message ID 167951125196.5837.18123258541770428595.tip-bot2@tip-bot2
State New
Headers
Series [tip:,x86/cleanups] x86: Simplify one-level sysctl registration for abi_table2 |

Commit Message

tip-bot2 for Thomas Gleixner March 22, 2023, 6:54 p.m. UTC
  The following commit has been merged into the x86/cleanups branch of tip:

Commit-ID:     3f6cc47f5eb40d96ce8cf443282a2c29fd629a76
Gitweb:        https://git.kernel.org/tip/3f6cc47f5eb40d96ce8cf443282a2c29fd629a76
Author:        Luis Chamberlain <mcgrof@kernel.org>
AuthorDate:    Fri, 10 Mar 2023 15:32:47 -08:00
Committer:     Dave Hansen <dave.hansen@linux.intel.com>
CommitterDate: Wed, 22 Mar 2023 11:47:21 -07:00

x86: Simplify one-level sysctl registration for abi_table2

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>
Signed-off-by: Dave Hansen <dave.hansen@linux.intel.com>
Link: https://lore.kernel.org/all/20230310233248.3965389-2-mcgrof%40kernel.org
---
 arch/x86/entry/vdso/vdso32-setup.c | 11 +----------
 1 file changed, 1 insertion(+), 10 deletions(-)
  

Patch

diff --git a/arch/x86/entry/vdso/vdso32-setup.c b/arch/x86/entry/vdso/vdso32-setup.c
index 3b300a7..f3b3cac 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);