[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <c195c68f-e815-4428-9134-8746198a4611@infradead.org>
Date: Tue, 9 Sep 2025 17:02:00 -0700
From: Randy Dunlap <rdunlap@...radead.org>
To: Mauro Carvalho Chehab <mchehab+huawei@...nel.org>
Cc: Linux Doc Mailing List <linux-doc@...r.kernel.org>,
Jonathan Corbet <corbet@....net>, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] kernel-doc: add support for handling global variables
On 9/9/25 4:50 PM, Randy Dunlap wrote:
>
>
> On 9/9/25 4:49 PM, Randy Dunlap wrote:
>>
>>
>> On 9/9/25 4:09 PM, Mauro Carvalho Chehab wrote:
>>> Em Tue, 9 Sep 2025 14:06:43 -0700
>>> Randy Dunlap <rdunlap@...radead.org> escreveu:
>>>
>>>> On 9/9/25 12:58 PM, Mauro Carvalho Chehab wrote:
>>>>> Em Tue, 9 Sep 2025 00:27:20 -0700
>>>>> Randy Dunlap <rdunlap@...radead.org> escreveu:
>>>
>>>>>> +.. kernel-doc:: init/kdoc-globals-test.c
>>>>>> + :identifiers:
>>>>>>
>>>>>> The html output says
>>>>>> "Kernel Globals"
>>>>>> but nothing else.
>>>>>
>>>>> I usually don't add :identifiers: on kernel-doc entries. If you use
>>>>> identifiers, you need to explicitly tell what symbols you want.
>>>>
>>>> Well, it worked/works without using having any identifiers listed, and
>>>> the docs in Documentation/doc-guide/kernel-doc.rst says that they are
>>>> optional:
>>>>
>>>> identifiers: *[ function/type ...]*
>>>> Include documentation for each *function* and *type* in *source*.
>>>> If no *function* is specified, the documentation for all functions
>>>> and types in the *source* will be included.
>>>> *type* can be a struct, union, enum, or typedef identifier.
>>>
>>> Hmm.. looking the entire logic:
>>>
>>> elif 'identifiers' in self.options:
>>> identifiers = self.options.get('identifiers').split()
>>> if identifiers:
>>> for i in identifiers:
>>> i = i.rstrip("\\").strip()
>>> if not i:
>>> continue
>>>
>>> cmd += ['-function', i]
>>> self.msg_args["symbol"].append(i)
>>> else:
>>> cmd += ['-no-doc-sections']
>>> self.msg_args["no_doc_sections"] = True
>>>
>>> I suspect that an empty identifier could be raising an exception.
and it's being caught and ignored (not printed)?
>>> The right logic should be, instead:
>>>
>>> - elif 'identifiers' in self.options:
>>> - identifiers = self.options.get('identifiers').split()
>>> - if identifiers:
>>> - for i in identifiers:
>>> + elif 'identifiers' in self.options:
>>> + identifiers = self.options.get('identifiers')
>>> + if identifiers:
>>> + for i in identifiers.split():
>>>
>>> (tests needed)
>>
>> Sheesh, I can't find that code so that I can patch it.
>> (in today's linux-next 20250909)
>
> oops, I was looking in scripts/ and not in Documentation/.
> got it.
>
>> Anyway, does this take away something that currently works?
The output looks the same with this patch AFAICT.
--
~Randy
Powered by blists - more mailing lists