Re: [PATCH 1/2] cpumask: Fix kernel-doc formatting errors in cpumask.h

From: Akira Yokosawa
Date: Thu Mar 06 2025 - 20:06:50 EST


Hi,

Yury Norov wrote:
> On Fri, Mar 07, 2025 at 12:38:41AM +0900, Akira Yokosawa wrote:
>> Hello Viresh,
>>
>> On Thu, 6 Mar 2025 16:06:50 +0530, 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, 37 insertions(+), 28 deletions(-)
>>>
>>> diff --git a/include/linux/cpumask.h b/include/linux/cpumask.h
>>> index 36a890d0dd57..73ba808c559f 100644
>>> --- a/include/linux/cpumask.h
>>> +++ b/include/linux/cpumask.h
>>> @@ -20,7 +20,7 @@
>>> * cpumask_pr_args - printf args to output a cpumask
>>> * @maskp: cpumask to be printed
>>> *
>>> - * Can be used to provide arguments for '%*pb[l]' when printing a cpumask.
>>> + * Can be used to provide arguments for '\%*pb[l]' when printing a cpumask.
>>
>> kernel-doc (script) can recognize the pattern of %*pb but not %*pb[l].
>> "%*bp [l]" should work here.
>> (without quotes and a white space in front of "[").
>
> So why not fixing kernel-doc instead?

That would be great!

At the moment, re-implementation of kernel-doc into python is under way [1].

[1]: https://lore.kernel.org/cover.1740387599.git.mchehab+huawei@xxxxxxxxxx/

It is a bug compatible porting from perl to python3, but it is likely
to be merged during 6.16 merge window.

I think it would be nicer to do the fix on top of python3 kernel-doc
after that happens.

Thanks, Akira

>
>> No need to escape "%".
>>
>>> */
>>> #define cpumask_pr_args(maskp) nr_cpu_ids, cpumask_bits(maskp)
>>>
[...]