Skip to content

drivers: usb: misc: update to use usb_control_msg_{send|recv}() API

Anant Thazhemadam linux-usb lkml 4 versions – New

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v4 Latest3 patches 0 repliesNew
  2. v312 patches 18 repliesSuperseded
  3. v215 patches 6 repliesSuperseded
Earlier versions · 1
VersionPostedPatchesRepliesStatus
v115 patches3 repliesSuperseded

Changes in v4 from the cover letter

* Drop all proposed changes to drivers (from v3) where the new API doesn't fit appropriately.
* Update commit messages.
* Link to v3:

Patches in v4 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3usb: misc: ehset: update to use the usb_control_msg_{send|recv}() APIdrivers/usb/misc/ehset.c+32 -440 replies
2/3usb: misc: ezusb: update to use usb_control_msg_send()drivers/usb/misc/ezusb.c+2 -140 replies
3/3usb: misc: usbsevseg: update to use usb_control_msg_send()drivers/usb/misc/usbsevseg.c+17 -430 replies

Reviews trailers per patch

2 of 3 patches have a Reviewed-by or Acked-by.

PatchPeter ChenJohan Hovold
1/3R-b R-b
2/3R-b
3/3

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v4 thread

Cover letter [PATCH v4 0/3] drivers: usb: misc: update to use usb_control_msg_{send|recv}() API

The new usb_control_msg_{send|recv}() API provides a more convenient way of using usb_control_msg() in some usecases. Using this, short reads are considered as errors, data can be used off the stack, and the need for the calling function to create a raw usb pipe is eliminated. This patch series aims to update existing instances of usb_control_msg() in drivers/usb/misc/* to usb_control_msg_{send|recv}() appropriately wherever it would be a good fit, and also update the return value checking mechanisms in place (if any), as necessary so nothing breaks.

Changes in v4:

* Drop all proposed changes to drivers (from v3) where the new API doesn't fit appropriately.
* Update commit messages.
* Link to v3:

      https://lore.kernel.org/linux-usb/[email protected]/T/#m269ab33b52331c134bbbc77d13cb65c2194a6093

Changes in v3:

* idmouse, emi26 and emi62 are left unchanged, and are not updated.
-> since control transfers in idmouse are without a data stage, there's no
real advantage in using the new helper here.
-> in emi26, and emi62, FW_LOAD_SIZE = 1048 (> 1024). Thus, if we try to use the
new helpers, it will result in either build warnings, or memory being allocated.

* Link to v2:

      https://lore.kernel.org/linux-usb/[email protected]/T/

Changes in v2:

* Buffer variables that were previously dynamically allocated are no longer dynamically allocated unless they have a variable length (since that threw a warning).

* Link to v1:

        https://lore.kernel.org/linux-usb/[email protected]/ 

Anant Thazhemadam (3):
usb: misc: ehset: update to use the usb_control_msg_{send|recv}() API
usb: misc: ezusb: update to use usb_control_msg_send()
usb: misc: usbsevseg: update to use usb_control_msg_send()

 drivers/usb/misc/ehset.c     | 76 +++++++++++++++---------------------
 drivers/usb/misc/ezusb.c     | 16 +-------
 drivers/usb/misc/usbsevseg.c | 60 ++++++++--------------------
 3 files changed, 51 insertions(+), 101 deletions(-)
Signature · 1 line
2.25.1