From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.1 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_2 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5C9D9C4727E for ; Wed, 30 Sep 2020 15:13:35 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id A2DC220657 for ; Wed, 30 Sep 2020 15:13:34 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=kernel.org header.i=@kernel.org header.b="zSART5+V" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org A2DC220657 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 2CB256B0062; Wed, 30 Sep 2020 11:13:34 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 27AE16B006E; Wed, 30 Sep 2020 11:13:34 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 190B26B0070; Wed, 30 Sep 2020 11:13:34 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0011.hostedemail.com [216.40.44.11]) by kanga.kvack.org (Postfix) with ESMTP id 044EE6B0062 for ; Wed, 30 Sep 2020 11:13:33 -0400 (EDT) Received: from smtpin08.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with ESMTP id AAD771E08 for ; Wed, 30 Sep 2020 15:13:33 +0000 (UTC) X-FDA: 77320071906.08.sail81_09136cf27193 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin08.hostedemail.com (Postfix) with ESMTP id 7C1341819E769 for ; Wed, 30 Sep 2020 15:13:33 +0000 (UTC) X-HE-Tag: sail81_09136cf27193 X-Filterd-Recvd-Size: 4588 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by imf06.hostedemail.com (Postfix) with ESMTP for ; Wed, 30 Sep 2020 15:13:32 +0000 (UTC) Received: from coco.lan (ip5f5ad5c4.dynamic.kabel-deutschland.de [95.90.213.196]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 90CAE20657; Wed, 30 Sep 2020 15:13:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1601478811; bh=tu8ftrC/0bjq3PeLZIRfKTlpvOojwl1EwbHoEDNIvgQ=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=zSART5+VxnaxSywTcYKJlwI5Q7jOjrzdig/Ri5UB6XV0cGLTo/PQ2wQ3Pvkfu5Q8N WxHXppc1DC+2Z7ZSlyG5UFS6o/AU24cfIcuz7+wKywKwaRNQIumKEV2w9trVeEK90V uxQ+K2wn3gRH32bIrLWXe6E0ItLA8gLyEEQiI05Q= Date: Wed, 30 Sep 2020 17:13:27 +0200 From: Mauro Carvalho Chehab To: Mike Rapoport Cc: Linux Doc Mailing List , Jonathan Corbet , Andrew Morton , linux-kernel@vger.kernel.org, linux-mm@kvack.org Subject: Re: [PATCH v4 19/52] memblock: get rid of a :c:type leftover Message-ID: <20200930171327.509ee344@coco.lan> In-Reply-To: <20200930142323.GL2142832@kernel.org> References: <0aab04f62bc3dfa82394e20d61c05c6efbfb4859.1601467849.git.mchehab+huawei@kernel.org> <20200930142323.GL2142832@kernel.org> X-Mailer: Claws Mail 3.17.6 (GTK+ 2.24.32; x86_64-redhat-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: Em Wed, 30 Sep 2020 17:23:23 +0300 Mike Rapoport 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 > > --- > > 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