Re: [PATCH V2 1/2] cpumask: Fix kernel-doc formatting errors in cpumask.h
From: Akira Yokosawa
Date: Fri Mar 07 2025 - 04:23:26 EST
Hi,
Only a couple of minor nits.
Viresh Kumar wrote:
> This fixes various kernel-doc formatting errors in cpumask.h:
>
> - WARNING: Inline literal start-string without end-string.
> - ERROR: Unexpected indentation.
> - ERROR: Unknown target name: "gfp".
>
> Signed-off-by: Viresh Kumar <viresh.kumar@xxxxxxxxxx>
> ---
> include/linux/cpumask.h | 65 +++++++++++++++++++++--------------------
> 1 file changed, 34 insertions(+), 31 deletions(-)
>
[...]
> @@ -667,7 +670,7 @@ void cpumask_xor(struct cpumask *dstp, const struct cpumask *src1p,
> }
>
> /**
> - * cpumask_andnot - *dstp = *src1p & ~*src2p
> + * cpumask_andnot - *@dstp = *@src1p & ~*@src2p
The latter part needs to be "&~ *@src2p".
Note: kernel-doc (script) recognizes the pattern of *@name, but not ~*@name
at the moment. (No warning from Sphinx, but the rendered doc doesn't look
right.)
> * @dstp: the cpumask result
> * @src1p: the first input
> * @src2p: the second input
[...]
> @@ -729,7 +732,7 @@ bool cpumask_intersects(const struct cpumask *src1p, const struct cpumask *src2p
> }
>
> /**
> - * cpumask_subset - (*src1p & ~*src2p) == 0
> + * cpumask_subset - (*@src1p & ~*@src2p) == 0
Ditto.
> * @src1p: the first input
> * @src2p: the second input
> *
[...]
> @@ -789,11 +792,11 @@ unsigned int cpumask_weight_and(const struct cpumask *srcp1, const struct cpumas
> }
>
> /**
> - * cpumask_weight_andnot - Count of bits in (*srcp1 & ~*srcp2)
> + * cpumask_weight_andnot - Count of bits in (*@srcp1 & ~*@srcp2)
Ditto.
With above patterns taken care of:
Reviewed-by: Akira Yokosawa <akiyks@xxxxxxxxx>
> * @srcp1: the cpumask to count bits (< nr_cpu_ids) in.
> * @srcp2: the cpumask to count bits (< nr_cpu_ids) in.
> *
> - * Return: count of bits set in both *srcp1 and *srcp2
> + * Return: count of bits set in both *@srcp1 and *@srcp2
> */
> static __always_inline
> unsigned int cpumask_weight_andnot(const struct cpumask *srcp1,
[...]
Thanks, Akira