From: Akira Yokosawa <akiyks@gmail.com>
To: Chandan Babu R <chandan.babu@oracle.com>, Christoph Hellwig <hch@lst.de>
Cc: Jonathan Corbet <corbet@lwn.net>,
Mauro Carvalho Chehab <mchehab@kernel.org>,
Stephen Rothwell <sfr@canb.auug.org.au>,
Andrew Morton <akpm@linux-foundation.org>,
linux-xfs@vger.kernel.org, linux-mm@kvack.org,
Akira Yokosawa <akiyks@gmail.com>
Subject: [PATCH 1/2] kernel-doc: Add unary operator * to $type_param_ref
Date: Tue, 27 Feb 2024 14:03:30 +0900 [thread overview]
Message-ID: <fa7249e6-0656-4daa-985d-28d350a452ac@gmail.com> (raw)
In kernel-doc comments, unary operator * collides with Sphinx/
docutil's markdown for emphasizing.
This resulted in additional warnings from "make htmldocs":
WARNING: Inline emphasis start-string without end-string.
, as reported recently [1].
Those have been worked around either by escaping * (like \*param) or by
using inline-literal form of ``*param``, both of which are specific
to Sphinx/docutils.
Such workarounds are against the kenrel-doc's ideal and should better
be avoided.
Instead, add "*" to the list of unary operators kernel-doc recognizes
and make the form of *@param available in kernel-doc comments.
Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Link: [1] https://lore.kernel.org/r/20240223153636.41358be5@canb.auug.org.au/
Acked-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Akira Yokosawa <akiyks@gmail.com>
Cc: Jonathan Corbet <corbet@lwn.net>
Cc: Mauro Carvalho Chehab <mchehab@kernel.org>
---
Note for Chandan
As both of patches 1/2 and 2/2 are needed to resolve the warning from
Sphinx which commit d7468609ee0f ("shmem: export shmem_get_folio") in
the xfs tree introduced, I'd like you to pick them up.
Thanks, Akira
---
scripts/kernel-doc | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/scripts/kernel-doc b/scripts/kernel-doc
index e8aefd258a29..d2f3fa3505c6 100755
--- a/scripts/kernel-doc
+++ b/scripts/kernel-doc
@@ -64,7 +64,7 @@ my $type_constant = '\b``([^\`]+)``\b';
my $type_constant2 = '\%([-_\w]+)';
my $type_func = '(\w+)\(\)';
my $type_param = '\@(\w*((\.\w+)|(->\w+))*(\.\.\.)?)';
-my $type_param_ref = '([\!~]?)\@(\w*((\.\w+)|(->\w+))*(\.\.\.)?)';
+my $type_param_ref = '([\!~\*]?)\@(\w*((\.\w+)|(->\w+))*(\.\.\.)?)';
my $type_fp_param = '\@(\w+)\(\)'; # Special RST handling for func ptr params
my $type_fp_param2 = '\@(\w+->\S+)\(\)'; # Special RST handling for structs with func ptr params
my $type_env = '(\$\w+)';
base-commit: 4b2f459d86252619448455013f581836c8b1b7da
--
2.34.1
next reply other threads:[~2024-02-27 5:03 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-27 5:03 Akira Yokosawa [this message]
2024-02-27 5:06 ` [PATCH 2/2] mm/shmem.c: Use new form of *@param in kernel-doc Akira Yokosawa
2024-02-28 22:40 ` [PATCH 1/2] kernel-doc: Add unary operator * to $type_param_ref Jonathan Corbet
2024-02-28 23:47 ` Darrick J. Wong
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=fa7249e6-0656-4daa-985d-28d350a452ac@gmail.com \
--to=akiyks@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=chandan.babu@oracle.com \
--cc=corbet@lwn.net \
--cc=hch@lst.de \
--cc=linux-mm@kvack.org \
--cc=linux-xfs@vger.kernel.org \
--cc=mchehab@kernel.org \
--cc=sfr@canb.auug.org.au \
/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