diff options
author | Joel Granados <j.granados@samsung.com> | 2023-06-27 15:30:19 +0200 |
---|---|---|
committer | Joel Granados <j.granados@samsung.com> | 2024-04-24 09:43:53 +0200 |
commit | 11a921909fea230cf7afcd6842a9452f3720b61b (patch) | |
tree | 2b641868896db98620558b85fcc6891a456385f3 /kernel/ucount.c | |
parent | 4cece764965020c22cff7665b18a012006359095 (diff) |
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%2FcBo@bombadil.infradead.org/)
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 <j.granados@samsung.com>
Diffstat (limited to 'kernel/ucount.c')
-rw-r--r-- | kernel/ucount.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/kernel/ucount.c b/kernel/ucount.c index 4aa6166cb856..e196da0204dc 100644 --- a/kernel/ucount.c +++ b/kernel/ucount.c @@ -87,7 +87,6 @@ static struct ctl_table user_table[] = { UCOUNT_ENTRY("max_fanotify_groups"), UCOUNT_ENTRY("max_fanotify_marks"), #endif - { } }; #endif /* CONFIG_SYSCTL */ @@ -96,7 +95,7 @@ bool setup_userns_sysctls(struct user_namespace *ns) #ifdef CONFIG_SYSCTL struct ctl_table *tbl; - BUILD_BUG_ON(ARRAY_SIZE(user_table) != UCOUNT_COUNTS + 1); + BUILD_BUG_ON(ARRAY_SIZE(user_table) != UCOUNT_COUNTS); setup_sysctl_set(&ns->set, &set_root, set_is_seen); tbl = kmemdup(user_table, sizeof(user_table), GFP_KERNEL); if (tbl) { |