• Joel Granados's avatar
    sysctl: Add size to register_sysctl · 9edbfe92
    Joel Granados authored
    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: default avatarJoel Granados <j.granados@samsung.com>
    Suggested-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
    Signed-off-by: default avatarLuis Chamberlain <mcgrof@kernel.org>
    9edbfe92
appldata_base.c 10.5 KB