linux-next.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Akira Yokosawa <akiyks@gmail.com>
To: Bagas Sanjaya <bagasdotme@gmail.com>,
	Stephen Rothwell <sfr@canb.auug.org.au>,
	Jakub Kicinski <kuba@kernel.org>
Cc: Ben Greear <greearb@candelatech.com>,
	Pavel Begunkov <asml.silence@gmail.com>,
	"David S. Miller" <davem@davemloft.net>,
	netdev@vger.kernel.org, linux-next@vger.kernel.org,
	linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org
Subject: Re: [PATCH net-next v3] net/core: Rephrase function description of __dev_queue_xmit()
Date: Sun, 8 May 2022 20:48:10 +0900	[thread overview]
Message-ID: <0cf2306a-2218-2cd5-ad54-0d73e25680a7@gmail.com> (raw)
In-Reply-To: <20220507084643.18278-1-bagasdotme@gmail.com>

On 2022/05/07 17:46,
Bagas Sanjaya wrote:
> Commit c526fd8f9f4f21 ("net: inline dev_queue_xmit()") inlines
> dev_queue_xmit() that contains comment quote from Ben Greear, which
> originates from commit af191367a75262 ("[NET]: Document ->hard_start_xmit()
> locking in comments.").It triggers htmldocs warning:

What I asked was the explanation of *why* the inlining of the
function caused the new warning.

Your explanation above tries to tell *what* the offending commit
did, which is not what I asked.  Furthermore, your explanation
is not accurate in that the comment block does not belong to
dev_queue_xmit() but to __dev_queue_xmit().

After seeking the answer myself, I reached a conclusion that
it is wrong to meddle with the comment block.

So, appended below is my version of the fix with the answer to
Stephen's question, "I am not sure why this has turned up just now."

Stephen, Jakub, what do you think?

        Thanks, Akira

----8<--------------
From: Akira Yokosawa <akiyks@gmail.com>
Subject: [PATCH -next] net/core: Hide __dev_queue_xmit()'s kernel-doc

Commit c526fd8f9f4f21 ("net: inline dev_queue_xmit()") added
export of __dev_queue_exit() to cope with inlining of its
wrapper functions dev_queue_xmit() and dev_queue_xmit_accel().
This made __dev_queue_exit()'s comment block visible to Sphinx
processing in "make htmldocs" because
Documentation/networking/kapi.rst has the directive of:

    .. kernel-doc:: net/core/dev.c
       :export:

Unfortunately, the kernel-doc style comment has a number of
issues when parsed as RestructuredText.  Stephen reported a
new warning message from "make htmldocs" caused by one of
such issues.

The leading "__" in the function name indicates that it is an
internal API and should not be widely used.
Exposing documentation of such a function in HTML and PDF
documentations does not make sense.

For the time being, hide the kernel-doc style comment from Sphinx
processing by removing the kernel-doc marker of "/**".

Proper kernel-doc comments should be added to the inlined
wrapper functions, which is deferred to those who are familiar
with those netdev APIs.

Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Fixes: c526fd8f9f4f21 ("net: inline dev_queue_xmit()")
Link: https://lore.kernel.org/linux-next/20220503073420.6d3f135d@canb.auug.org.au/
Signed-off-by: Akira Yokosawa <akiyks@gmail.com>
Cc: Jakub Kicinski <kuba@kernel.org>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: Pavel Begunkov <asml.silence@gmail.com>
---
 net/core/dev.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/net/core/dev.c b/net/core/dev.c
index c2d73595a7c3..a97fd413d705 100644
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -4085,8 +4085,7 @@ struct netdev_queue *netdev_core_pick_tx(struct net_device *dev,
 	return netdev_get_tx_queue(dev, queue_index);
 }
 
-/**
- *	__dev_queue_xmit - transmit a buffer
+/*	__dev_queue_xmit - transmit a buffer
  *	@skb: buffer to transmit
  *	@sb_dev: suboordinate device used for L2 forwarding offload
  *
-- 
2.25.1


  reply	other threads:[~2022-05-08 11:59 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-07  8:46 [PATCH net-next v3] net/core: Rephrase function description of __dev_queue_xmit() Bagas Sanjaya
2022-05-08 11:48 ` Akira Yokosawa [this message]
2022-05-09  6:54   ` Bagas Sanjaya
2022-05-09  6:59     ` Bagas Sanjaya
2022-05-09 17:05       ` Jakub Kicinski

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=0cf2306a-2218-2cd5-ad54-0d73e25680a7@gmail.com \
    --to=akiyks@gmail.com \
    --cc=asml.silence@gmail.com \
    --cc=bagasdotme@gmail.com \
    --cc=davem@davemloft.net \
    --cc=greearb@candelatech.com \
    --cc=kuba@kernel.org \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-next@vger.kernel.org \
    --cc=netdev@vger.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;
as well as URLs for NNTP newsgroup(s).