From: Jani Nikula <jani.nikula@linux.intel.com>
To: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>,
Randy Dunlap <rdunlap@infradead.org>
Cc: linux-kernel@vger.kernel.org,
Andrew Morton <akpm@linux-foundation.org>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Pavel Machek <pavel@ucw.cz>, Len Brown <len.brown@intel.com>,
linux-pm@vger.kernel.org, Jonathan Corbet <corbet@lwn.net>,
linux-doc@vger.kernel.org,
"James E.J. Bottomley" <James.Bottomley@hansenpartnership.com>
Subject: Re: [PATCH v4] kernel.h: add comments for system_states
Date: Mon, 08 Sep 2025 12:22:06 +0300 [thread overview]
Message-ID: <f6e0f7409df67e0554885cacb74023a8aad9a717@intel.com> (raw)
In-Reply-To: <20250907181719.0138c054@foz.lan>
On Sun, 07 Sep 2025, Mauro Carvalho Chehab <mchehab+huawei@kernel.org> wrote:
> Heh, looking at Sphinx doc at:
> https://www.sphinx-doc.org/en/master/usage/domains/c.html:
>
> .. c:member:: declaration
> .. c:var:: declaration
>
> Describes a C struct member or variable. Example signature:
>
> .. c:member:: PyObject *PyTypeObject.tp_bases
>
> The difference between the two directives is only cosmetic.
>
> I guess the best is to encode it as:
>
> prototype = args.other_stuff["var_type"]
> self.data += f"\n\n.. c:var:: {prototype}\n\n"
>
> And let Sphinx format it for us.
In the same vein, I believe we should let Sphinx format everything else
for us as well. Function parameters should use ":param foo: desc" and
struct/union members should be indented within the enclosing
struct/union.
I also think we're going way overboard with including e.g. struct
definition in the output. I'd just chuck those away and maybe add links
to kernel git source for the definition instead.
BR,
Jani.
--
Jani Nikula, Intel
next prev parent reply other threads:[~2025-09-08 9:22 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-09-04 6:36 [PATCH v4] kernel.h: add comments for system_states Randy Dunlap
2025-09-05 9:02 ` Jani Nikula
2025-09-05 12:11 ` Mauro Carvalho Chehab
2025-09-05 13:06 ` Jani Nikula
2025-09-05 13:38 ` Mauro Carvalho Chehab
2025-09-05 22:07 ` Randy Dunlap
2025-09-06 8:56 ` Mauro Carvalho Chehab
2025-09-06 17:13 ` Randy Dunlap
2025-09-06 21:30 ` Mauro Carvalho Chehab
2025-09-07 13:35 ` Mauro Carvalho Chehab
2025-09-07 16:17 ` Mauro Carvalho Chehab
2025-09-08 9:22 ` Jani Nikula [this message]
2025-09-08 11:08 ` Mauro Carvalho Chehab
2025-09-07 21:46 ` Mauro Carvalho Chehab
2025-09-06 12:13 ` James Bottomley
2025-09-08 9:36 ` Jani Nikula
2025-09-05 22:00 ` Randy Dunlap
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=f6e0f7409df67e0554885cacb74023a8aad9a717@intel.com \
--to=jani.nikula@linux.intel.com \
--cc=James.Bottomley@hansenpartnership.com \
--cc=akpm@linux-foundation.org \
--cc=corbet@lwn.net \
--cc=gregkh@linuxfoundation.org \
--cc=len.brown@intel.com \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=mchehab+huawei@kernel.org \
--cc=pavel@ucw.cz \
--cc=rdunlap@infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox