From patchwork Thu Oct 10 23:43:50 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Randy Dunlap X-Patchwork-Id: 13831317 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 CDBA5D2444F for ; Thu, 10 Oct 2024 23:44:30 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 2A81B6B007B; Thu, 10 Oct 2024 19:44:30 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 2311E6B0082; Thu, 10 Oct 2024 19:44:30 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 0D1A56B0083; Thu, 10 Oct 2024 19:44:30 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0016.hostedemail.com [216.40.44.16]) by kanga.kvack.org (Postfix) with ESMTP id DEEC66B007B for ; Thu, 10 Oct 2024 19:44:29 -0400 (EDT) Received: from smtpin23.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay09.hostedemail.com (Postfix) with ESMTP id 19D948029E for ; Thu, 10 Oct 2024 23:44:26 +0000 (UTC) X-FDA: 82659324216.23.859E930 Received: from desiato.infradead.org (desiato.infradead.org [90.155.92.199]) by imf08.hostedemail.com (Postfix) with ESMTP id 9A0D216000B for ; Thu, 10 Oct 2024 23:44:25 +0000 (UTC) Authentication-Results: imf08.hostedemail.com; dkim=pass header.d=infradead.org header.s=desiato.20200630 header.b=gBCchNKZ; spf=none (imf08.hostedemail.com: domain of rdunlap@infradead.org has no SPF policy when checking 90.155.92.199) 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=1728603729; 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=3ND0ZOmlZ8qD6GlFneDS9ZpI4dF1Ec9X9EfmmHCb8r0=; b=TKF9Vg3Iv3mzNr1NljkCtPa5ZevV9rEty0syf2fg/8dJLJWTPiMSVsO5KZJWKi7C6CsnIy c76hGp57RZzXDGyAocINIVw1HSlrParogO8TaE6gp4Rg6FujMtj/Ac82XPt7eVgscZaMQT U3U3LyyvP4Fxkq/KtqvCQRXAOPYPAO4= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1728603729; a=rsa-sha256; cv=none; b=OCLqnZZNyRiTa44pnNM5wfOuu7fG9jBfq+0eKwabzkyS/Y966ZDUB+qDisgLgeZGLVCpQj jnM0O9D242m5T3ByWCqNM7OOyQO/dQ2X7KOkXEvgjZBuYYNa4k5fakkdN2tZN5WejKwdu4 Uc4oAlLiOu5DNyAQUw7wFCAka8UWrlg= ARC-Authentication-Results: i=1; imf08.hostedemail.com; dkim=pass header.d=infradead.org header.s=desiato.20200630 header.b=gBCchNKZ; spf=none (imf08.hostedemail.com: domain of rdunlap@infradead.org has no SPF policy when checking 90.155.92.199) smtp.mailfrom=rdunlap@infradead.org; dmarc=none DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=desiato.20200630; 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=3ND0ZOmlZ8qD6GlFneDS9ZpI4dF1Ec9X9EfmmHCb8r0=; b=gBCchNKZJxNgZDZbj/bCR4JTnX rS42rBxY/PoGoOfRwu7FFBofXNkAQGpoV/O/qorTAIGqMr/Q4MUQQ+6+KdZfr7q0sGxXpbNrwkYyg 2HPXI03fwIN2L/5ph/UlU0dI+tEoM4XHHium+quG+ypZHlxJ9LTTKm1wAAUUSgBhzem0GcVDNtSiN winrkBRX0T33WG4sLKp3DBZ6/svkTQL/55JTDUdnzpAAsFx47bG5PNoU/lhwDxReKufhUlJKBX7Kn CodehpffS60KlnPRr3WWceRotrYPkSEx6Wl6b0X8QTNpr40y9DBjEi7zZXUbxzCaqsYRha+btZHrx Kf0aXltA==; Received: from [50.53.2.24] (helo=[192.168.254.17]) by desiato.infradead.org with esmtpsa (Exim 4.98 #2 (Red Hat Linux)) id 1sz2p8-00000005jql-0I7V; Thu, 10 Oct 2024 23:44:02 +0000 Message-ID: <46c52676-c402-4b39-b634-a401f7a7a571@infradead.org> Date: Thu, 10 Oct 2024 16:43:50 -0700 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: [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> Content-Language: en-US In-Reply-To: <1406d498-84bf-49aa-9efd-6480ad618582@infradead.org> X-Stat-Signature: sukqi7tkuaxmpj7gd9uzpnurxm6r95o9 X-Rspamd-Queue-Id: 9A0D216000B X-Rspam-User: X-Rspamd-Server: rspam08 X-HE-Tag: 1728603865-15255 X-HE-Meta: U2FsdGVkX1/WS2sqNNVboikSo2wQCkZA43a7BExjGqO0UxwsAUO0Yha2G7iS7XGrNJm7rXjBa75pl9dKe3uVP+YZlGeEl+JgOeKAfJWoyzOjPvlIfUY3NhayHEmr6j4NJaHcn5Oo63HBP61zm0j+K5x4sHbMK3KGi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0+I3fPf/V19wPVaTS2HbbLyvmr0tDAEOdgMrAr1u2e8DcoK7jmwMxD2GBEuFTSaleXngnJ1YWlccmVbFp+6Sec4vAOev1vp8iC/ezGQzhV9i9PGd7fktji+cDp5fdM/OfirWtOhIocBTT2Q9DfJM4+2uiHN0P5YfszTpT9LZ6QJd1S4/3NvY7blmZlfp+bzqUfdmX0RVgQ3srpD0MDge+7x/1dPJDlOBYxt4kzXNK070Ff0PqVHY5aChKam5GrKtRrMxw3IPTgX0d9Zp6gIPc/V9LNiPEiaCZESHagQ5rz7Uh8CcqDA8+2T5TcOBm75sCvdbnjtKpeIsKm47xQR3fWuheSd3KvK8XLRPquSSWvectb5nzA== 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/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: >>> >>>> Thanks for the hints. I hope if we can agree that documenting the macros was >>>> intended to be supported, doesn't break the build (there are users already) >>>> and has only those minor rendering issues, it can be used? >>> >>> I'd totally forgotten that this was supposed to work. >>> >>> Yes it can be used... $WE just need to find a way to make it work >>> properly. >> >> The code probably isn't expecting a macro on the right side. I'll take a look, >> but no promises. >> > That would have been too simple. > I haven't found the problem yet. Ran out of time. Will continue on it tommorrow/Thursday. 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. --------------------- 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 Signed-off-by: Randy Dunlap --- scripts/kernel-doc | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) --- linux-next-20241009.orig/scripts/kernel-doc +++ linux-next-20241009/scripts/kernel-doc @@ -822,10 +822,12 @@ sub output_function_rst(%) { my $oldprefix = $lineprefix; my $signature = ""; + my $noret = $signature eq ""; + if ($args{'functiontype'} ne "") { $signature = $args{'functiontype'} . " " . $args{'function'} . " ("; } else { - $signature = $args{'function'} . " ("; + $signature = $args{'function'} . " "; } my $count = 0; @@ -844,7 +846,9 @@ sub output_function_rst(%) { } } - $signature .= ")"; + if (!$noret) { + $signature .= ")"; + } if ($sphinx_major < 3) { if ($args{'typedef'}) {