From: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
To: Mike Rapoport <rppt@kernel.org>
Cc: Linux Doc Mailing List <linux-doc@vger.kernel.org>,
Jonathan Corbet <corbet@lwn.net>,
Andrew Morton <akpm@linux-foundation.org>,
linux-kernel@vger.kernel.org, linux-mm@kvack.org
Subject: Re: [PATCH v4 19/52] memblock: get rid of a :c:type leftover
Date: Wed, 30 Sep 2020 17:13:27 +0200 [thread overview]
Message-ID: <20200930171327.509ee344@coco.lan> (raw)
In-Reply-To: <20200930142323.GL2142832@kernel.org>
Em Wed, 30 Sep 2020 17:23:23 +0300
Mike Rapoport <rppt@kernel.org> escreveu:
> Hello Mauro,
>
> On Wed, Sep 30, 2020 at 03:24:42PM +0200, Mauro Carvalho Chehab wrote:
> > chanseset b3a7bb1851c8 ("docs: get rid of :c:type explicit declarations for structs")
> > removed several :c:type: markups, except by one.
> >
> > Now, Sphinx 3.x complains about it:
> >
> > .../Documentation/core-api/boot-time-mm:26: ../mm/memblock.c:51: WARNING: Unparseable C cross-reference: 'struct\nmemblock_type'
> > Invalid C declaration: Expected identifier in nested name, got keyword: struct [error at 6]
> > struct
> > memblock_type
> > ------^
>
> Maybe this warning is caused by '\n' between struct and memblock_type?
> There are two more occurences of :c:type: around and they do not seem to
> cause warnings.
Yeah, maybe. Yet, according with:
https://www.sphinx-doc.org/en/master/usage/restructuredtext/domains.html#c-roles
c:type: should only be used together with ".. c:type", and this
doesn't work anymore for declaring structs, as the only valid
ways of using it after Sphinx 3.0 are:
.. c:type:: typedef-like declaration
.. c:type:: name
So, the old syntax generated by kernel doc:
.. c:type:: struct foo
Doesn't work anymore. Kernel-doc now uses, instead:
.. c:struct:: foo
(if version >= 3.0)
So, the right tag would be: :c:struct`foo`, if Sphinx > 3
or c:type:`foo` for older versions.
Better to rely on having the automarkup solving this for
us.
-
>
> > As, on Sphinx 3.x, the right markup is c:struct:`foo`.
> >
> > So, let's remove it, relying on automarkup.py to convert it.
> >
> > Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
> > ---
> > mm/memblock.c | 4 ++--
> > 1 file changed, 2 insertions(+), 2 deletions(-)
> >
> > diff --git a/mm/memblock.c b/mm/memblock.c
> > index 165f40a8a254..326c6b3fec1d 100644
> > --- a/mm/memblock.c
> > +++ b/mm/memblock.c
> > @@ -50,8 +50,8 @@
> > *
> > * Each region is represented by :c:type:`struct memblock_region` that
>
> Can you please also convert this one?
>
> > * defines the region extents, its attributes and NUMA node id on NUMA
> > - * systems. Every memory type is described by the :c:type:`struct
> > - * memblock_type` which contains an array of memory regions along with
> > + * systems. Every memory type is described by the struct memblock_type
> > + * which contains an array of memory regions along with
> > * the allocator metadata. The "memory" and "reserved" types are nicely
> > * wrapped with :c:type:`struct memblock`. This structure is statically
>
> And this?
Good point.
I'll change those too for the next version.
>
> > * initialized at build time. The region arrays are initially sized to
> > --
> > 2.26.2
> >
>
Thanks,
Mauro
next prev parent reply other threads:[~2020-09-30 15:13 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <cover.1601467849.git.mchehab+huawei@kernel.org>
2020-09-30 13:24 ` [PATCH v4 19/52] memblock: get rid of a :c:type leftover Mauro Carvalho Chehab
2020-09-30 14:23 ` Mike Rapoport
2020-09-30 15:13 ` Mauro Carvalho Chehab [this message]
2020-09-30 13:24 ` [PATCH v4 22/52] docs: get rid of :c:type explicit declarations for structs Mauro Carvalho Chehab
2020-09-30 14:26 ` Mike Rapoport
2020-09-30 15:01 ` Takashi Iwai
2020-09-30 16:50 ` André Almeida
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=20200930171327.509ee344@coco.lan \
--to=mchehab+huawei@kernel.org \
--cc=akpm@linux-foundation.org \
--cc=corbet@lwn.net \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=rppt@kernel.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;
as well as URLs for NNTP newsgroup(s).