Re: [PATCH net-next] tools: ynl-gen: generate docs for <name>_max/_mask enums

From: Jakub Kicinski
Date: Wed Jun 14 2023 - 13:39:02 EST


On Wed, 14 Jun 2023 12:48:14 +0000 Kubalewski, Arkadiusz wrote:
> >From: Jakub Kicinski <kuba@xxxxxxxxxx>
> >Sent: Wednesday, June 14, 2023 2:59 AM
> >
> >On Wed, 14 Jun 2023 01:17:09 +0200 Arkadiusz Kubalewski wrote:
> >> Including ynl generated uapi header files into source kerneldocs
> >> (rst files in Documentation/) produces warnings during documentation
> >> builds (i.e. make htmldocs)
> >>
> >> Prevent warnings by generating also description for enums where
> >> rander_max was selected.
> >
> >Do you reckon that documenting the meta-values makes sense, or should
> >we throw a:
> >
> >/* private: */
> >
>
> Most probably it doesn't..
> Tried this:
> /*
> [ other values description ]
> * private:
> * @__<NAME>_MAX
> */
> and this:
> /*
> [ other values description ]
> * private: @__<NAME>_MAX
> */
>
> Both are not working as we would expect.
>
> Do you mean to have double comments for enums? like:
> /*
> [ other values description ]
> */
> /*
> * private:
> * @__<NAME>_MAX
> */
>
> >comment in front of them so that kdoc ignores them? Does user space
> >have any use for those? If we want to document them...
>
> Hmm, do you recall where I can find proper format of such ignore enum comment
> for kdoc generation?
> Or maybe we need to also submit patch to some kdoc build process to actually
> change the current behavior?

It's explained in the kdoc documentation :(
https://docs.kernel.org/doc-guide/kernel-doc.html#members