Re: kerneldoc warnings since commit 538fc2ee870a3 ("rcu: Introduce kfree_rcu() single-argument macro")

From: Uladzislau Rezki
Date: Tue Jan 05 2021 - 08:15:30 EST


Dear, Lukas.

> Dear Uladzislau,
>
> in commit 538fc2ee870a3 ("rcu: Introduce kfree_rcu() single-argument
> macro"), you have refactored the kfree_rcu macro.
>
> Since then, make htmldocs warns:
>
> ./include/linux/rcupdate.h:882: warning: Excess function parameter
> 'ptr' description in 'kfree_rcu'
> ./include/linux/rcupdate.h:882: warning: Excess function parameter
> 'rhf' description in 'kfree_rcu'
>
> As you deleted the two arguments in the macro definition, kerneldoc
> cannot resolve the argument names in the macro's kerneldoc
> documentation anymore and warns about that.
>
> Probably, it is best to just turn the formal kerneldoc references to
> the two arguments, which are not used in the macro definition anymore,
> simply into two informal references in the documentation.
>
Thanks for your suggestion. I am not sure if htmldocs supports something
like "__maybe_unused", but tend to say that it does not. See below the
patch:

<snip>