Skip to contentSkip to conversation

USB: ohci: ohci_pdriver.h: fix missing kernel-doc comments

PATCH Superseded Randy Dunlap 2 participants 2 messages Feb 28 USB

v1 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 USB: ohci: ohci_pdriver.h: fix missing kernel-doc comments

Convert comments to kernel-doc format to avoid kernel-doc warnings:

Warning: include/linux/usb/ohci_pdriver.h:32 struct member 'power_on'
not described in 'usb_ohci_pdata'
Warning: include/linux/usb/ohci_pdriver.h:32 struct member 'power_off'
not described in 'usb_ohci_pdata'
Warning: include/linux/usb/ohci_pdriver.h:32 struct member 'power_suspend'
not described in 'usb_ohci_pdata'

---
Cc: Alan Stern <[email protected]>
Cc: [email protected]
Cc: Greg Kroah-Hartman <[email protected]>

 include/linux/usb/ohci_pdriver.h |   10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)
include/linux/usb/ohci_pdriver.h +6 -4
@@ -23,12 +23,14 @@ struct usb_ohci_pdata {
 	unsigned	no_big_frame_no:1;
 	unsigned int	num_ports;
 
-	/* Turn on all power and clocks */
+	/** @power_on: Turn on all power and clocks */
 	int (*power_on)(struct platform_device *pdev);
-	/* Turn off all power and clocks */
+	/** @power_off: Turn off all power and clocks */
 	void (*power_off)(struct platform_device *pdev);
-	/* Turn on only VBUS suspend power and hotplug detection,
-	 * turn off everything else */
+	/**
+	 * @power_suspend: Turn on only VBUS suspend power and hotplug
+	 * detection, turn off everything else
+	 */
 	void (*power_suspend)(struct platform_device *pdev);
 };
 
#1 lore raw
Quoted 28 lines · Randy Dunlap

Convert comments to kernel-doc format to avoid kernel-doc warnings:

Warning: include/linux/usb/ohci_pdriver.h:32 struct member 'power_on'
not described in 'usb_ohci_pdata'
Warning: include/linux/usb/ohci_pdriver.h:32 struct member 'power_off'
not described in 'usb_ohci_pdata'
Warning: include/linux/usb/ohci_pdriver.h:32 struct member 'power_suspend'
not described in 'usb_ohci_pdata'

---
Cc: Alan Stern <[email protected]>
Cc: [email protected]
Cc: Greg Kroah-Hartman <[email protected]>

 include/linux/usb/ohci_pdriver.h |   10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)
include/linux/usb/ohci_pdriver.h +1 -2
@@ -23,12 +23,14 @@ struct usb_ohci_pdata {
 	unsigned	no_big_frame_no:1;
 	unsigned int	num_ports;
 
-	/* Turn on all power and clocks */
+	/** @power_on: Turn on all power and clocks */
 	int (*power_on)(struct platform_device *pdev);
-	/* Turn off all power and clocks */

include/linux/usb/ohci_pdriver.h struct usb_ohci_pdata { · line 35

Quoted 10 lines
include/linux/usb/ohci_pdriver.h +5 -2
+	/** @power_off: Turn off all power and clocks */
 	void (*power_off)(struct platform_device *pdev);
-	/* Turn on only VBUS suspend power and hotplug detection,
-	 * turn off everything else */
+	/**
+	 * @power_suspend: Turn on only VBUS suspend power and hotplug
+	 * detection, turn off everything else
+	 */
 	void (*power_suspend)(struct platform_device *pdev);
 };

Shouldn't the function-pointer descriptions go in the big kerneldoc comment just before the start of the structure declaration? That way they would be consistent with the descriptions of the other data fields.

Alan Stern