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 Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0DCEAD1A426 for ; Fri, 11 Oct 2024 22:17:08 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 45CF06B009A; Fri, 11 Oct 2024 18:17:08 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 3BDEE6B009B; Fri, 11 Oct 2024 18:17:08 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 269606B009F; Fri, 11 Oct 2024 18:17:08 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0012.hostedemail.com [216.40.44.12]) by kanga.kvack.org (Postfix) with ESMTP id 038356B009A for ; Fri, 11 Oct 2024 18:17:07 -0400 (EDT) Received: from smtpin25.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay09.hostedemail.com (Postfix) with ESMTP id 7142381370 for ; Fri, 11 Oct 2024 22:17:03 +0000 (UTC) X-FDA: 82662732852.25.F134A0D Received: from casper.infradead.org (casper.infradead.org [90.155.50.34]) by imf24.hostedemail.com (Postfix) with ESMTP id EF1DC180008 for ; Fri, 11 Oct 2024 22:17:03 +0000 (UTC) Authentication-Results: imf24.hostedemail.com; dkim=pass header.d=infradead.org header.s=casper.20170209 header.b=J1rZ+qrS; spf=none (imf24.hostedemail.com: domain of rdunlap@infradead.org has no SPF policy when checking 90.155.50.34) smtp.mailfrom=rdunlap@infradead.org; dmarc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1728684955; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=oeW1HyXR4hV35TAnMpQXj1iUWZ/ily35TUmXRLi56NE=; b=bFZEgu08AbP709GoLkYMzJQc4UYvrsuDk5TqILz44F3xTvyBsF5B1lCnfewe+XAIvCN4rv KQNn9RX5MXZoTw6B5AaB4QD4JN3JZSF0FyKStMd1uO+gGvRYvPidXaqlhtZ4BHKFEGXr2u wYKkyEWcPo9w/tdpA1QFGHKc9AypNkw= ARC-Authentication-Results: i=1; imf24.hostedemail.com; dkim=pass header.d=infradead.org header.s=casper.20170209 header.b=J1rZ+qrS; spf=none (imf24.hostedemail.com: domain of rdunlap@infradead.org has no SPF policy when checking 90.155.50.34) smtp.mailfrom=rdunlap@infradead.org; dmarc=none ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1728684955; a=rsa-sha256; cv=none; b=vMY4GMvJAuOg6mvit4tSdob2nIX2vpKfg+79vV8C6Bd/QVxQFBVEYiHb4kF2G8+mCV6Gm/ IhH0OA7LNAyXFeZ9t729EURx1Lt8WtGyrGZ3INnqtX4cUtdXhzff2B/3omwxyAAA+Tl67q diWZShu0sF6HNlJ6AQF4oh18IjqKurY= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=Content-Transfer-Encoding:Content-Type: In-Reply-To:References:Cc:To:From:Subject:MIME-Version:Date:Message-ID:Sender :Reply-To:Content-ID:Content-Description; bh=oeW1HyXR4hV35TAnMpQXj1iUWZ/ily35TUmXRLi56NE=; b=J1rZ+qrSJBa4v5Am3OfmB7t5ry bLly0BP4HuHLByPgX2UoCQHUtRhaZkSvVDgoLmiu4zs1nYIEx5QF1ZSYVl5WjR4YFolSuAMYE4c88 ZPfVhSgqQOJksiIXm+LPcXWkewUBssIzpOoNmZHISLT+JpzMthfXo4ts22WKXzxt+QIkIPkQvXZK4 hfJkfvcS+eSKU0qt5Pov+qciDcd78YOum5IwjAMY3bUuol6pVeUd8XrqyQNq8DOMu+bKCd3TGMAtu /rOmJmWrdIo2xi70+UMcGEeyws56Ya5uyL/Omd/Yt+2SfF9KzZGaJnHlFPci4O3p54d1FD+2etQh0 clQ9DKJg==; Received: from [50.53.2.24] (helo=[192.168.254.17]) by casper.infradead.org with esmtpsa (Exim 4.98 #2 (Red Hat Linux)) id 1szNwN-0000000BzZO-0YIk; Fri, 11 Oct 2024 22:16:57 +0000 Message-ID: <9e09f97e-90ca-4a36-a6cc-0234d683c9fa@infradead.org> Date: Fri, 11 Oct 2024 15:16:47 -0700 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [partial fix] Re: [PATCH] mm, slab: add kerneldocs for common SLAB_ flags From: Randy Dunlap To: Jonathan Corbet , Vlastimil Babka , David Rientjes , Christoph Lameter , Horia Geanta Cc: Hyeonggon Yoo <42.hyeyoo@gmail.com>, Roman Gushchin , Andrew Morton , linux-mm@kvack.org, linux-doc@vger.kernel.org References: <20241009142936.56092-2-vbabka@suse.cz> <878quxe2kw.fsf@trenco.lwn.net> <878quxb4rm.fsf@trenco.lwn.net> <8b0c1bb9-4a9a-4f8e-87df-275994df739d@infradead.org> <1406d498-84bf-49aa-9efd-6480ad618582@infradead.org> <46c52676-c402-4b39-b634-a401f7a7a571@infradead.org> <5b16b00f-749c-431b-baeb-7accb76b492b@infradead.org> Content-Language: en-US In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Rspamd-Server: rspam03 X-Rspam-User: X-Rspamd-Queue-Id: EF1DC180008 X-Stat-Signature: a3we7sfdpuomc8uhonkb1zbu7y4jh3kg X-HE-Tag: 1728685023-392732 X-HE-Meta: U2FsdGVkX19+uihJkULuEC7+2ACIHSglz/q11u7CwsOC/2V10de/qwMHwqtH68hEhCmfio5Ra4A8j+2LzHGkIQ4lIKTK113ip4lVIgQRdZLb88mAhv74CSPT4PyDqf2L+NaEDaWaF5jqlusgsGobsl4K0tP8A20d/LkYBdxKkzN7iJ+fwKstLZNd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Zrq7lrTlIuDwigAYdohV+MlB6tdrWEaH9HVyXhwBMPc3800dQSgi8pFmhNODYmCR8gJ2+KlG77K5s9ctNEiWdTP8d8L9/tSZSGuthJQVQ+dG8w8ohukpDXDHbrQ04z2gtHwRswsYcgfFLhfVdlj7kDO1+e0JHR/DqOybo7I6Ob+OTMO1yn2pFahj+T7tmAAb4+CC0O4RUjruV/eMk4QQ4I6E/jMDDoo2ZSbcCNL7xr+A41FiG8HchSTG/7Bnyh1DCTybOCSYgjmcJhtbQuebVoQkrFwyLQOFskdie0dDgxUlEThU32lQUywKmnrZ9jh/AxMnsvfMyO10gb0Pb6icYluSGkw== 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: List-Subscribe: List-Unsubscribe: On 10/10/24 8:07 PM, Randy Dunlap wrote: > > > On 10/10/24 4:54 PM, Randy Dunlap wrote: >> >> >> On 10/10/24 4:43 PM, Randy Dunlap wrote: >>> >>> >>> On 10/9/24 10:06 PM, Randy Dunlap wrote: >>>> >>>> >>>> On 10/9/24 3:02 PM, Randy Dunlap wrote: >>>>> >>>>> >>>>> On 10/9/24 9:49 AM, Jonathan Corbet wrote: >>>>>> Vlastimil Babka writes: >>>>>> >>> >>> The main problem is that output_function_rst() does not support object-like macros while >>> output_function_man() does. There is still a bunch of sphinx_version handling that I know >>> nothing about, so the present output (after my trivial patch) leaves more to be done. >>> >>> Well, the *main* problem is that the output is not consistent. Sometimes my tests don't fail >>> as they did at first. >>> >>> >>> This patch drops the trailing "()" for object-like macros in output_function_rst() >>> but there is still more to be done. >>> >>> --------------------- > > This one mostly works for me although I don't care for the second line > here. I guess it has something to do with cross-referencing(?), but IDK. > That seems to be normal but this patch now causes regressions for macros that do have parameters. Back to searching... > > """ > SLAB_TYPESAFE_BY_RCU > ``SLAB_TYPESAFE_BY_RCU `` > > WARNING READ THIS! > > Description > """ > > --- > From: Randy Dunlap > Subject: [PATCH] kernel-doc: allow object-like macros in ReST output > > output_function_rst() does not handle object-like macros. It presents > a trailing "()" while output_function_man() handles these macros > correctly. > > Fixes: cbb4d3e6510b ("scripts/kernel-doc: handle object-like macros") > Signed-off-by: Randy Dunlap > Cc: Horia Geanta > Cc: Jonathan Corbet > Cc: linux-doc@vger.kernel.org > Cc: Vlastimil Babka > --- > scripts/kernel-doc | 13 ++++++++++--- > 1 file changed, 10 insertions(+), 3 deletions(-) > > --- linux-next-20241009.orig/scripts/kernel-doc > +++ linux-next-20241009/scripts/kernel-doc > @@ -822,10 +822,13 @@ sub output_function_rst(%) { > my $oldprefix = $lineprefix; > > my $signature = ""; > + my $noret = 0; > + > if ($args{'functiontype'} ne "") { > $signature = $args{'functiontype'} . " " . $args{'function'} . " ("; > } else { > - $signature = $args{'function'} . " ("; > + $signature = $args{'function'} . " "; > + $noret = 1; > } > > my $count = 0; > @@ -844,7 +847,9 @@ sub output_function_rst(%) { > } > } > > - $signature .= ")"; > + if (!$noret) { > + $signature .= ")"; > + } > > if ($sphinx_major < 3) { > if ($args{'typedef'}) { > @@ -890,7 +895,9 @@ sub output_function_rst(%) { > # > print ".. container:: kernelindent\n\n"; > $lineprefix = " "; > - print $lineprefix . "**Parameters**\n\n"; > + if (!$noret) { > + print $lineprefix . "**Parameters**\n\n"; > + } > foreach $parameter (@{$args{'parameterlist'}}) { > my $parameter_name = $parameter; > $parameter_name =~ s/\[.*//; > > -- ~Randy