Skip to content

Commit 11a9219

Browse files
committed
kernel misc: Remove the now superfluous sentinel elements from ctl_table array
This commit comes at the tail end of a greater effort to remove the empty elements at the end of the ctl_table arrays (sentinels) which will reduce the overall build time size of the kernel and run time memory bloat by ~64 bytes per sentinel (further information Link : https://lore.kernel.org/all/ZO5Yx5JFogGi%[email protected]/) Remove the sentinel from ctl_table arrays. Reduce by one the values used to compare the size of the adjusted arrays. Signed-off-by: Joel Granados <[email protected]>
1 parent 4cece76 commit 11a9219

15 files changed

+1
-18
lines changed

kernel/acct.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,6 @@ static struct ctl_table kern_acct_table[] = {
8484
.mode = 0644,
8585
.proc_handler = proc_dointvec,
8686
},
87-
{ }
8887
};
8988

9089
static __init int kernel_acct_sysctls_init(void)

kernel/exit.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,6 @@ static struct ctl_table kern_exit_table[] = {
9494
.mode = 0644,
9595
.proc_handler = proc_douintvec,
9696
},
97-
{ }
9897
};
9998

10099
static __init int kernel_exit_sysctls_init(void)

kernel/hung_task.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -314,7 +314,6 @@ static struct ctl_table hung_task_sysctls[] = {
314314
.proc_handler = proc_dointvec_minmax,
315315
.extra1 = SYSCTL_NEG_ONE,
316316
},
317-
{}
318317
};
319318

320319
static void __init hung_task_sysctl_init(void)

kernel/kexec_core.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -948,7 +948,6 @@ static struct ctl_table kexec_core_sysctls[] = {
948948
.mode = 0644,
949949
.proc_handler = kexec_limit_handler,
950950
},
951-
{ }
952951
};
953952

954953
static int __init kexec_core_sysctl_init(void)

kernel/latencytop.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,6 @@ static struct ctl_table latencytop_sysctl[] = {
8585
.mode = 0644,
8686
.proc_handler = sysctl_latencytop,
8787
},
88-
{}
8988
};
9089
#endif
9190

kernel/panic.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,6 @@ static struct ctl_table kern_panic_table[] = {
100100
.mode = 0644,
101101
.proc_handler = proc_douintvec,
102102
},
103-
{ }
104103
};
105104

106105
static __init int kernel_panic_sysctls_init(void)

kernel/pid_namespace.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -307,7 +307,6 @@ static struct ctl_table pid_ns_ctl_table[] = {
307307
.extra1 = SYSCTL_ZERO,
308308
.extra2 = &pid_max,
309309
},
310-
{ }
311310
};
312311
#endif /* CONFIG_CHECKPOINT_RESTORE */
313312

kernel/pid_sysctl.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,6 @@ static struct ctl_table pid_ns_ctl_table_vm[] = {
4141
.extra1 = SYSCTL_ZERO,
4242
.extra2 = SYSCTL_TWO,
4343
},
44-
{ }
4544
};
4645
static inline void register_pid_ns_sysctl_table_vm(void)
4746
{

kernel/reboot.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1295,7 +1295,6 @@ static struct ctl_table kern_reboot_table[] = {
12951295
.mode = 0644,
12961296
.proc_handler = proc_dointvec,
12971297
},
1298-
{ }
12991298
};
13001299

13011300
static void __init kernel_reboot_sysctls_init(void)

kernel/signal.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4840,7 +4840,6 @@ static struct ctl_table signal_debug_table[] = {
48404840
.proc_handler = proc_dointvec
48414841
},
48424842
#endif
4843-
{ }
48444843
};
48454844

48464845
static int __init init_signal_sysctls(void)

0 commit comments

Comments
 (0)