Re: [PATCH v4] kernel.h: add comments for system_states

Randy Dunlap
2025-09-05T22:00:42Z

On 9/5/25 2:02 AM, Jani Nikula wrote:
> On Wed, 03 Sep 2025, Randy Dunlap <rdunlap@infradead.org> wrote:
>> Provide some basic comments about the system_states and what they imply.
>> Also convert the comments to kernel-doc format.
>>
>> However, kernel-doc does not support kernel-doc notation on extern
>> struct/union/typedef/enum/etc. So I made this a DOC: block so that
>> I can use (insert) it into a Documentation (.rst) file and have it
>> look decent.
>
> The simple workaround is to separate the enum type and the variable:
>
> /**
> * kernel-doc for the enum
> */
> enum system_states {
> ...
> };
>
> /**
> * kernel-doc for the variable
> */
> extern enum system_states system_state;

Duh. Beautiful. Thanks.

@Andrew, please drop the v4 patch. I'll make another.

--
~Randy