Skip to contentSkip to conversation

ia64: simplify one-level sysctl registration for kdump_ctl_table

PATCH New Luis Chamberlain 1 participant 1 message Mar 10, 2023 VFS

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ia64: simplify one-level sysctl registration for kdump_ctl_table

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.

---

If ia64 is not removed from the kernel feel free to take this or I can take it through sysctl-next.

 arch/ia64/kernel/crash.c | 11 +----------
 1 file changed, 1 insertion(+), 10 deletions(-)
arch/ia64/kernel/crash.c +1 -10
index 76730f34685c..88b3ce3e66cd 100644
@@ -234,15 +234,6 @@ static struct ctl_table kdump_ctl_table[] = {
 	},
 	{ }
 };
-
-static struct ctl_table sys_table[] = {
-	{
-	  .procname = "kernel",
-	  .mode = 0555,
-	  .child = kdump_ctl_table,
-	},
-	{ }
-};
 #endif
 
 static int
@@ -257,7 +248,7 @@ machine_crash_setup(void)
 	if((ret = register_die_notifier(&kdump_init_notifier_nb)) != 0)
 		return ret;
 #ifdef CONFIG_SYSCTL
-	register_sysctl_table(sys_table);
+	register_sysctl("kernel", kdump_ctl_table);
 #endif
 	return 0;
 }
Signature · 1 line
2.39.1