diff options
author | Johannes Berg <johannes.berg@intel.com> | 2019-01-25 10:08:28 +0100 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2019-02-01 11:06:55 +0100 |
commit | 23323289b1543b445d1f10aeab1bcfd84f2ca50a (patch) | |
tree | ebf5858e66a307631968e165bd788a1314991f2b /include/linux/ipc.h | |
parent | 752cfee90d11e280d727617bf8d6df894141e157 (diff) |
netlink: reduce NLA_POLICY_NESTED{,_ARRAY} arguments
In typical cases, there's no need to pass both the maxattr
and the policy array pointer, as the maxattr should just be
ARRAY_SIZE(policy) - 1. Therefore, to be less error prone,
just remove the maxattr argument from the default macros
and deduce the size accordingly.
Leave the original macros with a leading underscore to use
here and in case somebody needs to pass a policy pointer
where the policy isn't declared in the same place and thus
ARRAY_SIZE() cannot be used.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'include/linux/ipc.h')
0 files changed, 0 insertions, 0 deletions