summaryrefslogtreecommitdiffstats
path: root/net/ax25
diff options
context:
space:
mode:
authorJoel Granados <joel.granados@gmail.com>2023-08-09 12:50:00 +0200
committerLuis Chamberlain <mcgrof@kernel.org>2023-08-15 15:26:17 -0700
commit95d4977876d6658fdee58be8c8668aac68c25dd2 (patch)
tree6d100d3ef40dcce07dbe56cb76de6832f44cc983 /net/ax25
parent3bc269cfd3e119be84b69d95aec3a9e147016bb2 (diff)
downloadlinux-95d4977876d6658fdee58be8c8668aac68c25dd2.tar.gz
linux-95d4977876d6658fdee58be8c8668aac68c25dd2.tar.bz2
linux-95d4977876d6658fdee58be8c8668aac68c25dd2.zip
sysctl: Add size to register_net_sysctl function
This commit adds size to the register_net_sysctl indirection function to facilitate the removal of the sentinel elements (last empty markers) from the ctl_table arrays. Though we don't actually remove any sentinels in this commit, register_net_sysctl* now has the capability of forwarding table_size for when that happens. We create a new function register_net_sysctl_sz with an extra size argument. A macro replaces the existing register_net_sysctl. The size in the macro is SIZE_MAX instead of ARRAY_SIZE to avoid compilation errors while we systematically migrate to register_net_sysctl_sz. Will change to ARRAY_SIZE in subsequent commits. Care is taken to add table_size to the stopping criteria in such a way that when we remove the empty sentinel element, it will continue stopping in the last element of the ctl_table array. Signed-off-by: Joel Granados <j.granados@samsung.com> Suggested-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Luis Chamberlain <mcgrof@kernel.org>
Diffstat (limited to 'net/ax25')
0 files changed, 0 insertions, 0 deletions