usb: Fix up movement of USB core kerneldoc location
Subsystems (3)
PATCH 1/1 usb: Fix up movement of USB core kerneldoc location
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.
---
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(-)
Documentation/driver-api/usb/usb.rst +8 -7
@@ -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. -.. 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 ===============================
Signature · 1 line
2.25.1
Greg KH
maintainerQuoted 25 lines · Fabio Estevam
Commit
855b35ea96c4("usb: common: move function's kerneldoc next to its definition") moved the USB common function documentation out of thelinux/usb/ch9.hheader file intodrivers/usb/common/common.canddrivers/usb/common/debug.c, which causes the following 'make htmldocs' build warning:
include/linux/usb/ch9.h:1: warning: no structured comments foundFix 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 <[email protected]>Signed-off-by Fabio Estevam <[email protected]>---
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()
Quoted 3 lines
They were not documented prior to
855b35ea96c4.Please let me know if this is OK or not.
Looks great, thank you for this, I'll go queue it up now!
greg k-h
Quoted 38 lines · Fabio Estevam
Commit
855b35ea96c4("usb: common: move function's kerneldoc next to its definition") moved the USB common function documentation out of thelinux/usb/ch9.hheader file intodrivers/usb/common/common.canddrivers/usb/common/debug.c, which causes the following 'make htmldocs' build warning:
include/linux/usb/ch9.h:1: warning: no structured comments foundFix 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 <[email protected]>Signed-off-by Fabio Estevam <[email protected]>---
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(-)Documentation/driver-api/usb/usb.rst +0
-0@@ -109,15 +109,16 @@ well as to make sure they aren't relying on some HCD-specific behavior. USB-Standard Types
Documentation/driver-api/usb/usb.rst well as to make sure they aren't relying on some HCD-specific behavior. · line 115
Quoted 10 lines
Documentation/driver-api/usb/usb.rst +4
-4================== -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
Quoted 14 lines
Documentation/driver-api/usb/usb.rst +4
-3-.. 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 ===============================Signature · 1 line
2.25.1
Hi Alan,
Quoted 7 lines · Alan Stern
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. Whatdrivers/usb/common/common.ccontains is the definitions of the functions declared ininclude/linux/usb/ch9.h, which is a different file (although it does #include the file ininclude/uapi/linux/usb/).
It seems we can no longer refer include/linux/usb/ch9.h inside the kerneldoc marker, as this file does not contain any comments anymore.
Would this change on top of this patch be OK?
Thanks
(quoted diff) +0 -0
b/Documentation/driver-api/usb/usb.rst
index 543e70434da2..251cab7cacd7 100644
Documentation/driver-api/usb/usb.rst +0 -0
@@ -109,16 +109,10 @@ well as to make sure they aren't relying on some
HCD-specific behavior.
USB-Standard Types
==================
-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. -
-.. kernel-doc:: drivers/usb/common/common.c
- :export:
-
-.. kernel-doc:: drivers/usb/common/debug.c
- :export:
+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.
Host-Side Data Types and Macros
===============================
Signature · 1 line
2.25.1