diff options
author | Joel Granados <joel.granados@gmail.com> | 2023-08-09 13:49:58 +0300 |
---|---|---|
committer | Luis Chamberlain <mcgrof@kernel.org> | 2023-08-16 01:26:17 +0300 |
commit | 9edbfe92a0a1355bae1e47c8f542ac0d39f19f8c (patch) | |
tree | 9a327fa4329fb47e9d5f4666ea2ca7c0dfa694d3 /arch/s390/appldata/appldata_base.c | |
parent | bff97cf11b261972cae90299432238cc9a9a6a51 (diff) | |
download | linux-9edbfe92a0a1355bae1e47c8f542ac0d39f19f8c.tar.xz |
sysctl: Add size to register_sysctl
This commit adds table_size to register_sysctl in preparation for the
removal of the sentinel elements in the ctl_table arrays (last empty
markers). And though we do *not* remove any sentinels in this commit, we
set things up by either passing the table_size explicitly or using
ARRAY_SIZE on the ctl_table arrays.
We replace the register_syctl function with a macro that will add the
ARRAY_SIZE to the new register_sysctl_sz function. In this way the
callers that are already using an array of ctl_table structs do not
change. For the callers that pass a ctl_table array pointer, we pass the
table_size to register_sysctl_sz instead of the macro.
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 'arch/s390/appldata/appldata_base.c')
-rw-r--r-- | arch/s390/appldata/appldata_base.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/s390/appldata/appldata_base.c b/arch/s390/appldata/appldata_base.c index bbefe5e86bdf..3b0994625652 100644 --- a/arch/s390/appldata/appldata_base.c +++ b/arch/s390/appldata/appldata_base.c @@ -365,7 +365,7 @@ int appldata_register_ops(struct appldata_ops *ops) ops->ctl_table[0].proc_handler = appldata_generic_handler; ops->ctl_table[0].data = ops; - ops->sysctl_header = register_sysctl(appldata_proc_name, ops->ctl_table); + ops->sysctl_header = register_sysctl_sz(appldata_proc_name, ops->ctl_table, 1); if (!ops->sysctl_header) goto out; return 0; |