]> www.infradead.org Git - users/jedix/linux-maple.git/commit
sysctl: Remove check for sentinel element in ctl_table arrays
authorJoel Granados <j.granados@samsung.com>
Tue, 4 Jun 2024 06:29:21 +0000 (08:29 +0200)
committerJoel Granados <j.granados@samsung.com>
Thu, 13 Jun 2024 08:50:52 +0000 (10:50 +0200)
commitd7a76ec87195ced6910b0ca10ca133bb316c90f5
tree70fc6091ac3e45e52a446659907628231ff2397a
parente2a6c472de7a5e5a1455a9fff1cfc55a1dd888af
sysctl: Remove check for sentinel element in ctl_table arrays

Use ARRAY_SIZE exclusively by removing the check to ->procname in the
stopping criteria of the loops traversing ctl_table arrays. This commit
finalizes the removal of the sentinel elements at the end of ctl_table
arrays which reduces the build time size 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 entry->procname evaluation from the for loop stopping
criteria in sysctl and sysctl_net.

Signed-off-by: Joel Granados <j.granados@samsung.com>
fs/proc/proc_sysctl.c
net/sysctl_net.c