Skip to contentSkip to conversation

USB: core: Fix docs warning caused by wireless_status feature

PATCH Applied Bastien Nocera 3 participants 6 messages Apr 5, 2023 – Apr 6, 2023

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 USB: core: Fix docs warning caused by wireless_status feature

Fix wrongly named 'dev' parameter in doc block, should have been iface:
drivers/usb/core/message.c:1939: warning: Function parameter or member 'iface' not described in 'usb_set_wireless_status' drivers/usb/core/message.c:1939: warning: Excess function parameter 'dev' description in 'usb_set_wireless_status'

And fix missing struct member doc in kernel API, and reorder to
match struct:
include/linux/usb.h:270: warning: Function parameter or member 'wireless_status_work' not described in 'usb_interface'

Fixes 0a4db185f078 ("USB: core: Add API to change the wireless_status")

---
Added missing link and sob, thanks to bentiss for the quick review

 drivers/usb/core/message.c | 2 +-
 include/linux/usb.h        | 6 ++++--
 2 files changed, 5 insertions(+), 3 deletions(-)
drivers/usb/core/message.c +1 -1
index 7930dca84616..7c7f88ca4f62 100644
@@ -1926,7 +1926,7 @@ static void __usb_wireless_status_intf(struct work_struct *ws)
 
 /**
  * usb_set_wireless_status - sets the wireless_status struct member
- * @dev: the device to modify
+ * @iface: the interface to modify
  * @status: the new wireless status
  *
  * Set the wireless_status struct member to the new value, and emit
include/linux/usb.h +4 -2
index a48eeec62a66..56f4758f3c31 100644
@@ -203,14 +203,16 @@ enum usb_wireless_status {
  *	following a reset or suspend operation it doesn't support.
  * @authorized: This allows to (de)authorize individual interfaces instead
  *	a whole device in contrast to the device authorization.
+ * @wireless_status: if the USB device uses a receiver/emitter combo, whether
+ *	the emitter is connected.
+ * @wireless_status_work: Used for scheduling wireless status changes
+ * 	from atomic context.
  * @dev: driver model's view of this device
  * @usb_dev: if an interface is bound to the USB major, this will point
  *	to the sysfs representation for that device.
  * @reset_ws: Used for scheduling resets from atomic context.
  * @resetting_device: USB core reset the device, so use alt setting 0 as
  *	current; needs bandwidth alloc after reset.
- * @wireless_status: if the USB device uses a receiver/emitter combo, whether
- *	the emitter is connected.
  *
  * USB device drivers attach to interfaces on a physical device.  Each
  * interface encapsulates a single high level function, such as feeding
Signature · 1 line
2.40.0
#1 lore raw
Quoted 11 lines · Bastien Nocera

Fix wrongly named 'dev' parameter in doc block, should have been iface:
drivers/usb/core/message.c:1939: warning: Function parameter or member 'iface' not described in 'usb_set_wireless_status' drivers/usb/core/message.c:1939: warning: Excess function parameter 'dev' description in 'usb_set_wireless_status'

And fix missing struct member doc in kernel API, and reorder to
match struct:
include/linux/usb.h:270: warning: Function parameter or member 'wireless_status_work' not described in 'usb_interface'

Fixes 0a4db185f078 ("USB: core: Add API to change the wireless_status")

I do not see that git commit id anywhere, where is it from? What tree?

Ah, input tree, not much I can do there...

thanks,

greg k-h

#2 lore raw
Quoted 19 lines · Greg Kroah-Hartman
Quoted 12 lines · Bastien Nocera

Fix wrongly named 'dev' parameter in doc block, should have been iface:
drivers/usb/core/message.c:1939: warning: Function parameter or member 'iface' not described in 'usb_set_wireless_status' drivers/usb/core/message.c:1939: warning: Excess function parameter 'dev' description in 'usb_set_wireless_status'

And fix missing struct member doc in kernel API, and reorder to match struct:
include/linux/usb.h:270: warning: Function parameter or member 'wireless_status_work' not described in 'usb_interface'

Quoted 5 lines

Link:
https://lore.kernel.org/linux-next/[email protected]/T/#t

Fixes 0a4db185f078 ("USB: core: Add API to change the

wireless_status")

Quoted 4 lines

I do not see that git commit id anywhere, where is it from?  What tree?

Ah, input tree, not much I can do there...

Yes, it's from the hid tree.

Benjamin is waiting on either Alan or yourself ack'ing the changes before pushing it through the hid tree, to avoid stepping on somebody else's toes.

The patch seems to fix the warnings in my local tests, let me know if you have any comments about the wording.

Cheers

maintainer Acked-by
#3 lore raw
Quoted 25 lines · Bastien Nocera
Quoted 19 lines · Greg Kroah-Hartman
Quoted 12 lines · Bastien Nocera

Fix wrongly named 'dev' parameter in doc block, should have been iface:
drivers/usb/core/message.c:1939: warning: Function parameter or member 'iface' not described in 'usb_set_wireless_status' drivers/usb/core/message.c:1939: warning: Excess function parameter 'dev' description in 'usb_set_wireless_status'

And fix missing struct member doc in kernel API, and reorder to match struct:
include/linux/usb.h:270: warning: Function parameter or member 'wireless_status_work' not described in 'usb_interface'

Quoted 5 lines

Link:
https://lore.kernel.org/linux-next/[email protected]/T/#t

Fixes 0a4db185f078 ("USB: core: Add API to change the

wireless_status")

Quoted 4 lines

I do not see that git commit id anywhere, where is it from?  What tree?

Ah, input tree, not much I can do there...

Quoted 8 lines

Yes, it's from the hid tree.

Benjamin is waiting on either Alan or yourself ack'ing the changes before pushing it through the hid tree, to avoid stepping on somebody else's toes.

The patch seems to fix the warnings in my local tests, let me know if you have any comments about the wording.

Nope:

#4 lore raw
Quoted 33 lines · Greg Kroah-Hartman
Quoted 31 lines · Bastien Nocera
Quoted 19 lines · Greg Kroah-Hartman
Quoted 12 lines · Bastien Nocera

Fix wrongly named 'dev' parameter in doc block, should have been iface:
drivers/usb/core/message.c:1939: warning: Function parameter or member 'iface' not described in 'usb_set_wireless_status' drivers/usb/core/message.c:1939: warning: Excess function parameter 'dev' description in 'usb_set_wireless_status'

And fix missing struct member doc in kernel API, and reorder to match struct:
include/linux/usb.h:270: warning: Function parameter or member 'wireless_status_work' not described in 'usb_interface'

Quoted 5 lines

Link:
https://lore.kernel.org/linux-next/[email protected]/T/#t

Fixes 0a4db185f078 ("USB: core: Add API to change the

wireless_status")

Quoted 4 lines

I do not see that git commit id anywhere, where is it from? What tree?

Ah, input tree, not much I can do there...

Yes, it's from the hid tree.

Benjamin is waiting on either Alan or yourself ack'ing the changes before pushing it through the hid tree, to avoid stepping on somebody else's toes.

Quoted 7 lines
Quoted 2 lines

The patch seems to fix the warnings in my local tests, let me know if you have any comments about the wording.

Nope:

Thanks!

I have fixed a small checkpatch warning about using space before tab and applied as the b4 thank you notice should have already mentioned.

Cheers,
Benjamin

#5 lore raw
In reply to Bastien Nocera
Quoted 9 lines · Bastien Nocera

Fix wrongly named 'dev' parameter in doc block, should have been iface:
drivers/usb/core/message.c:1939: warning: Function parameter or member 'iface' not described in 'usb_set_wireless_status' drivers/usb/core/message.c:1939: warning: Excess function parameter 'dev' description in 'usb_set_wireless_status'

And fix missing struct member doc in kernel API, and reorder to
match struct:
include/linux/usb.h:270: warning: Function parameter or member 'wireless_status_work' not described in 'usb_interface'

[...]

Applied to https://git.kernel.org/pub/scm/linux/kernel/git/hid/hid.git (for-6.4/logitech-hidpp), thanks!

[1/1] USB: core: Fix docs warning caused by wireless_status feature

      https://git.kernel.org/hid/hid/c/539adfedbd2d

Cheers,

Signature · 1 line
Benjamin Tissoires <[email protected]>