• Johannes Berg's avatar
    netlink: reduce NLA_POLICY_NESTED{,_ARRAY} arguments · 23323289
    Johannes Berg authored
    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: default avatarJohannes Berg <johannes.berg@intel.com>
    23323289
nl80211.c 436 KB