public inbox for linux-usb@vger.kernel.org
 help / color / mirror / Atom feed
From: Alan Stern <stern@rowland.harvard.edu>
To: Fabio Estevam <festevam@gmail.com>
Cc: gregkh@linuxfoundation.org, chunfeng.yun@mediatek.com,
	sfr@canb.auug.org.au, linux-usb@vger.kernel.org,
	linux-next@vger.kernel.org, corbet@lwn.net,
	linux-doc@vger.kernel.org
Subject: Re: [PATCH] usb: Fix up movement of USB core kerneldoc location
Date: Sat, 24 Apr 2021 11:11:57 -0400	[thread overview]
Message-ID: <20210424151157.GA312740@rowland.harvard.edu> (raw)
In-Reply-To: <20210424135103.2476670-1-festevam@gmail.com>

On Sat, Apr 24, 2021 at 10:51:03AM -0300, Fabio Estevam wrote:
> Commit 855b35ea96c4 ("usb: common: move function's kerneldoc next to its
> definition") moved the USB common function documentation out of the
> linux/usb/ch9.h header file into drivers/usb/common/common.c and
> drivers/usb/common/debug.c, which causes the following 'make htmldocs'
> build warning:
> 
> include/linux/usb/ch9.h:1: warning: no structured comments found
> 
> Fix that up by pointing the documentation at the correct location.
> 
> Fixes: 855b35ea96c4 ("usb: common: move function's kerneldoc next to its definition")
> Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
> Signed-off-by: Fabio Estevam <festevam@gmail.com>
> ---
> Hi,
> 
> I compared the generated HTML and now the following functions are
> also documented after this patch:
> 
> usb_decode_interval()
> of_usb_get_dr_mode_by_phy()
> of_usb_host_tpl_support()
> of_usb_update_otg_caps()
> usb_of_get_companion_dev()
> 
> They were not documented prior to 855b35ea96c4.
> 
> Please let me know if this is OK or not.
> 
>  Documentation/driver-api/usb/usb.rst | 15 ++++++++-------
>  1 file changed, 8 insertions(+), 7 deletions(-)
> 
> diff --git a/Documentation/driver-api/usb/usb.rst b/Documentation/driver-api/usb/usb.rst
> index 078e981e2b16..543e70434da2 100644
> --- a/Documentation/driver-api/usb/usb.rst
> +++ b/Documentation/driver-api/usb/usb.rst
> @@ -109,15 +109,16 @@ well as to make sure they aren't relying on some HCD-specific behavior.
>  USB-Standard Types
>  ==================
>  
> -In ``<linux/usb/ch9.h>`` you will find the USB data types defined in
> -chapter 9 of the USB specification. These data types are used throughout
> -USB, and in APIs including this host side API, gadget APIs, usb character
> -devices and debugfs interfaces.
> +In ``drivers/usb/common/common.c`` and ``drivers/usb/common/debug.c`` you
> +will find the USB data types defined in chapter 9 of the USB specification.
> +These data types are used throughout USB, and in APIs including this host
> +side API, gadget APIs, usb character devices and debugfs interfaces.

This is quite wrong.

The USB data types defined in chapter 9 of the USB specification can 
actually be found in include/uapi/linux/usb/ch9.h.  What 
drivers/usb/common/common.c contains is the definitions of the functions 
declared in include/linux/usb/ch9.h, which is a different file (although 
it does #include the file in include/uapi/linux/usb/).

drivers/usb/common/debug.c, on the other hand, contains definitions of 
various functions used for debugging output.  If those functions are 
declared in a header file anywhere, I can't see it.

Alan Stern

> -.. kernel-doc:: include/linux/usb/ch9.h
> -   :internal:
> +.. kernel-doc:: drivers/usb/common/common.c
> +   :export:
>  
> -.. _usb_header:
> +.. kernel-doc:: drivers/usb/common/debug.c
> +   :export:
>  
>  Host-Side Data Types and Macros
>  ===============================
> -- 
> 2.25.1
> 

  parent reply	other threads:[~2021-04-24 15:12 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-24 13:51 [PATCH] usb: Fix up movement of USB core kerneldoc location Fabio Estevam
2021-04-24 14:00 ` Greg KH
2021-04-24 15:11 ` Alan Stern [this message]
2021-04-24 15:27   ` Fabio Estevam
  -- strict thread matches above, loose matches on Subject: below --
2021-04-24 10:47 [PATCH] USB: fix " Greg Kroah-Hartman
2021-04-24 11:09 ` Greg Kroah-Hartman
2021-04-24 11:25   ` Fabio Estevam
2021-04-24 12:29     ` Fabio Estevam
2021-04-24 12:43       ` Greg Kroah-Hartman
2021-04-24 12:45         ` Fabio Estevam
2021-04-24 16:42 ` Randy Dunlap

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=20210424151157.GA312740@rowland.harvard.edu \
    --to=stern@rowland.harvard.edu \
    --cc=chunfeng.yun@mediatek.com \
    --cc=corbet@lwn.net \
    --cc=festevam@gmail.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-next@vger.kernel.org \
    --cc=linux-usb@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