From: Akira Yokosawa <akiyks@gmail.com>
To: Jiri Slaby <jslaby@suse.cz>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Jonathan Corbet <corbet@lwn.net>
Cc: Akira Yokosawa <akiyks@gmail.com>,
linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH] docs/driver-api/miscellaneous: Remove kernel-doc of serial_core.c
Date: Wed, 2 Nov 2022 20:48:01 +0900 [thread overview]
Message-ID: <4e54c76a-138a-07e0-985a-dd83cb622208@gmail.com> (raw)
Since merge of tty-6.0-rc1, "make htmldocs" with Sphinx >=3.1 emits
a bunch of warnings indicating duplicate kernel-doc comments from
drivers/tty/serial/serial_core.c.
This is due to the kernel-doc directive for serial_core.c in
serial/drivers.rst added in the merge. It conflicts with an existing
kernel-doc directive in miscellaneous.rst.
Remove the latter directive and resolve the duplicates.
Signed-off-by: Akira Yokosawa <akiyks@gmail.com>
Fixes: 607ca0f742b7 ("Merge tag 'tty-6.0-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty")
Cc: stable@vger.kernel.org # 6.0
Cc: Jiri Slaby <jslaby@suse.cz>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
Hi Jiri,
I've seeing the increased warnings of duplicates from "make htmldocs"
since the 6.0 merge window. They look like (partial):
/linux/Documentation/driver-api/serial/driver.rst:111: WARNING: Duplicate C declaration, also defined at driver-api/miscellaneous:111.
Declaration is '.. c:function:: void uart_write_wakeup(struct uart_port *port)'.
/linux/Documentation/driver-api/serial/driver.rst:111: WARNING: Duplicate C declaration, also defined at driver-api/miscellaneous:111.
Declaration is '.. c:None:: struct uart_port *port'.
/linux/Documentation/driver-api/serial/driver.rst:343: WARNING: Duplicate C declaration, also defined at driver-api/miscellaneous:343.
Declaration is '.. c:function:: void uart_update_timeout(struct uart_port *port, unsigned int cflag, unsigned int baud)'.
/linux/Documentation/driver-api/serial/driver.rst:343: WARNING: Duplicate C declaration, also defined at driver-api/miscellaneous:343.
Declaration is '.. c:None:: struct uart_port *port'.
/linux/Documentation/driver-api/serial/driver.rst:343: WARNING: Duplicate C declaration, also defined at driver-api/miscellaneous:343.
Declaration is '.. c:None:: unsigned int cflag'.
/linux/Documentation/driver-api/serial/driver.rst:343: WARNING: Duplicate C declaration, also defined at driver-api/miscellaneous:343.
Declaration is '.. c:None:: unsigned int baud'.
/linux/Documentation/driver-api/serial/driver.rst:376: WARNING: Duplicate C declaration, also defined at driver-api/miscellaneous:376.
These warning messages are not easy to track down, as there is an
unresolved issue in Sphinx's C domain parser who can't handle a
function and a struct of the same name and causes duplicates in a
later stage of Sphinx processing.
But the warnings shown above turned out to be true duplicates.
There is a not-clearly-documented rule in including kernel-doc
comments into .rst files. Any kernel-doc comment can be included
at most once in the whole documentation tree. Otherwise, you can't
be sure of which target a cross-reference points to.
As I don't have full context of these kernel-doc comments, this is
meant as a band-aide patch, especially the reference to
serial/driver.rst added at the bottom.
If I can get acks from you and/or Greg, I'd like Jon to take the
fix, as this issue affects the -doc tree most.
Thanks,
Akira
--
Documentation/driver-api/miscellaneous.rst | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/Documentation/driver-api/miscellaneous.rst b/Documentation/driver-api/miscellaneous.rst
index 304ffb146cf9..4a5104a368ac 100644
--- a/Documentation/driver-api/miscellaneous.rst
+++ b/Documentation/driver-api/miscellaneous.rst
@@ -16,12 +16,11 @@ Parallel Port Devices
16x50 UART Driver
=================
-.. kernel-doc:: drivers/tty/serial/serial_core.c
- :export:
-
.. kernel-doc:: drivers/tty/serial/8250/8250_core.c
:export:
+See serial/driver.rst for related APIs.
+
Pulse-Width Modulation (PWM)
============================
base-commit: 30a0b95b1335e12efef89dd78518ed3e4a71a763
--
2.25.1
next reply other threads:[~2022-11-02 11:48 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-02 11:48 Akira Yokosawa [this message]
2022-11-03 6:35 ` [PATCH] docs/driver-api/miscellaneous: Remove kernel-doc of serial_core.c Jiri Slaby
2022-11-09 14:45 ` Akira Yokosawa
2022-11-21 13:46 ` Akira Yokosawa
2022-11-21 20:59 ` Jonathan Corbet
2022-11-21 21:01 ` Jonathan Corbet
2022-11-21 23:10 ` Akira Yokosawa
2022-11-21 23:29 ` Jonathan Corbet
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=4e54c76a-138a-07e0-985a-dd83cb622208@gmail.com \
--to=akiyks@gmail.com \
--cc=corbet@lwn.net \
--cc=gregkh@linuxfoundation.org \
--cc=jslaby@suse.cz \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.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).