2023-12-06 18:13:48

by Randy Dunlap

[permalink] [raw]
Subject: [PATCH] usb: fotg210-udc: fix function kernel-doc comments

Correct kernel-doc comments to prevent warnings from
scripts/kernel-doc.

fotg210-udc.c:1103: warning: Function parameter or member 'g' not described in 'fotg210_vbus_session'
fotg210-udc.c:1103: warning: Excess function parameter '_gadget' description in 'fotg210_vbus_session'
fotg210-udc.c:1103: warning: No description found for return value of 'fotg210_vbus_session'
fotg210-udc.c:1129: warning: No description found for return value of 'fotg210_phy_event'

Signed-off-by: Randy Dunlap <[email protected]>
Cc: Linus Walleij <[email protected]>
Cc: Greg Kroah-Hartman <[email protected]>
Cc: [email protected]
---
drivers/usb/fotg210/fotg210-udc.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)

diff -- a/drivers/usb/fotg210/fotg210-udc.c b/drivers/usb/fotg210/fotg210-udc.c
--- a/drivers/usb/fotg210/fotg210-udc.c
+++ b/drivers/usb/fotg210/fotg210-udc.c
@@ -1094,10 +1094,10 @@ static int fotg210_udc_stop(struct usb_g

/**
* fotg210_vbus_session - Called by external transceiver to enable/disable udc
- * @_gadget: usb gadget
+ * @g: usb gadget
* @is_active: 0 if should disable UDC VBUS, 1 if should enable
*
- * Returns 0
+ * Returns: %0
*/
static int fotg210_vbus_session(struct usb_gadget *g, int is_active)
{
@@ -1122,7 +1122,7 @@ static const struct usb_gadget_ops fotg2
*
* Called by the USB Phy when a cable connect or disconnect is sensed.
*
- * Returns NOTIFY_OK or NOTIFY_DONE
+ * Returns: NOTIFY_OK or NOTIFY_DONE
*/
static int fotg210_phy_event(struct notifier_block *nb, unsigned long action,
void *data)


2023-12-07 10:04:30

by Linus Walleij

[permalink] [raw]
Subject: Re: [PATCH] usb: fotg210-udc: fix function kernel-doc comments

On Wed, Dec 6, 2023 at 7:13 PM Randy Dunlap <[email protected]> wrote:

> Correct kernel-doc comments to prevent warnings from
> scripts/kernel-doc.
>
> fotg210-udc.c:1103: warning: Function parameter or member 'g' not described in 'fotg210_vbus_session'
> fotg210-udc.c:1103: warning: Excess function parameter '_gadget' description in 'fotg210_vbus_session'
> fotg210-udc.c:1103: warning: No description found for return value of 'fotg210_vbus_session'
> fotg210-udc.c:1129: warning: No description found for return value of 'fotg210_phy_event'
>
> Signed-off-by: Randy Dunlap <[email protected]>
> Cc: Linus Walleij <[email protected]>
> Cc: Greg Kroah-Hartman <[email protected]>
> Cc: [email protected]

Reviewed-by: Linus Walleij <[email protected]>

Thanks for fixing this Randy!

Yours,
Linus Walleij