From: Johannes Berg <johan...@sipsolutions.net>
Date: Fri, 25 Jan 2019 10:08:28 +0100

> From: Johannes Berg <johannes.b...@intel.com>
> 
> 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.b...@intel.com>
> ---
> Dave, it looks like we're the only users of this right now,
> so let me know if you'd prefer I take it through my tree.
> Also, this conflicts with the fix I just made to the place
> where I got it wrong, but obviously the resolution is to
> just take the version without the maxattr argument.

Please take it through your tree in that case.  It'll probably
be the more painless way to merge this.

Reply via email to