Re: [PATCH] kernel-doc: allow object-like macros in ReST output

From: Jonathan Corbet
Date: Thu Oct 17 2024 - 11:34:07 EST


Randy Dunlap <rdunlap@xxxxxxxxxxxxx> writes:

> output_function_rst() does not handle object-like macros. It presents
> a trailing "()" while output_function_man() handles these macros
> correctly.
>
> Update output_function_rst() to handle object-like macros.
> Don't show the "Parameters" heading if there are no parameters.
>
> For output_function_man(), don't show the "ARGUMENTS" heading if there
> are no parameters.
>
> I have tested this quite a bit with my ad hoc test files for both ReST
> and man format outputs. The generated output looks good.
>
> Fixes: cbb4d3e6510b ("scripts/kernel-doc: handle object-like macros")
> Signed-off-by: Randy Dunlap <rdunlap@xxxxxxxxxxxxx>
> Cc: Horia Geanta <horia.geanta@xxxxxxxxxxxxx>
> Cc: Jonathan Corbet <corbet@xxxxxxx>
> Cc: Vlastimil Babka <vbabka@xxxxxxx>
> ---
> Cc: linux-doc@xxxxxxxxxxxxxxx
>
> @Jon, feel free to update the attribution for your patch or I can do it
> and send a v2 if you like.
>
> scripts/kernel-doc | 43 ++++++++++++++++++++++++++++++-------------
> 1 file changed, 30 insertions(+), 13 deletions(-)

Applied - thanks for doing this.

jon