diff options
author | Joel Granados <j.granados@samsung.com> | 2023-09-13 11:10:57 +0200 |
---|---|---|
committer | Luis Chamberlain <mcgrof@kernel.org> | 2023-09-20 13:59:56 -0700 |
commit | 4b5a099d0100c7e34dd2849aac5a6953124e0f4d (patch) | |
tree | 1a44f884362b4b6ab2c36dd16ec3cb3c0cf4d73c | |
parent | d530c1f73b550ad0e4c7be74dc897ed52abf662a (diff) | |
download | linux-4b5a099d0100c7e34dd2849aac5a6953124e0f4d.tar.gz linux-4b5a099d0100c7e34dd2849aac5a6953124e0f4d.tar.xz |
arch/x86: Remove now superfluous sentinel elem from ctl_table arrays
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%2FcBo@bombadil.infradead.org/)
Remove sentinel element from sld_sysctl and itmt_kern_table. This
removal is safe because register_sysctl_init and register_sysctl
implicitly use the array size in addition to checking for the sentinel.
Reviewed-by: Ingo Molnar <mingo@kernel.org>
Acked-by: Dave Hansen <dave.hansen@linux.intel.com> # for x86
Signed-off-by: Joel Granados <j.granados@samsung.com>
Signed-off-by: Luis Chamberlain <mcgrof@kernel.org>
-rw-r--r-- | arch/x86/kernel/cpu/intel.c | 3 | ||||
-rw-r--r-- | arch/x86/kernel/itmt.c | 3 |
2 files changed, 2 insertions, 4 deletions
diff --git a/arch/x86/kernel/cpu/intel.c b/arch/x86/kernel/cpu/intel.c index be4045628fd3..e63391b82624 100644 --- a/arch/x86/kernel/cpu/intel.c +++ b/arch/x86/kernel/cpu/intel.c @@ -1015,8 +1015,7 @@ static struct ctl_table sld_sysctls[] = { .proc_handler = proc_douintvec_minmax, .extra1 = SYSCTL_ZERO, .extra2 = SYSCTL_ONE, - }, - {} + } }; static int __init sld_mitigate_sysctl_init(void) diff --git a/arch/x86/kernel/itmt.c b/arch/x86/kernel/itmt.c index ee4fe8cdb857..5f2ccff38297 100644 --- a/arch/x86/kernel/itmt.c +++ b/arch/x86/kernel/itmt.c @@ -73,8 +73,7 @@ static struct ctl_table itmt_kern_table[] = { .proc_handler = sched_itmt_update_handler, .extra1 = SYSCTL_ZERO, .extra2 = SYSCTL_ONE, - }, - {} + } }; static struct ctl_table_header *itmt_sysctl_header; |