linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/6] USB: serial: use wrappers for usb_control_msg()
@ 2021-08-01 20:31 Himadri Pandya
  2021-08-01 20:31 ` [PATCH v2 1/6] USB: serial: ch314: use usb_control_msg_recv() and usb_control_msg_send() Himadri Pandya
                   ` (6 more replies)
  0 siblings, 7 replies; 15+ messages in thread
From: Himadri Pandya @ 2021-08-01 20:31 UTC (permalink / raw)
  To: johan, gregkh, linux-usb, linux-kernel; +Cc: Himadri Pandya

There are many usages of usb_control_msg() that can use the new wrapper
functions usb_contro_msg_send() & usb_control_msg_recv() for better
error checks on short reads and writes. They can also be used to avoid
allocating redundant dma buffers that are generally required to use
usb_control_msg(). Hence use them whenever possible and avoid using
usb_control_msg() directly.

Changes in v2:
 - Drop unnecessary use of wrappers
 - Drop unrelated style changes

Additional Info:
- This is a super late follow-up on v1 that was submitted a while
ago(my sincere apologies). (All patches are rebased and
compile tested.)
- v1 patches: https://lkml.org/lkml/2020/11/4/40
- Patches that introduced the wrapper functions:
  https://lkml.org/lkml/2020/9/14/859

Himadri Pandya (6):
  USB: serial: ch314: use usb_control_msg_recv() and
    usb_control_msg_send()
  USB: serial: cp210x: use usb_control_msg_recv() and
    usb_control_msg_send()
  USB: serial: f81232: use usb_control_msg_recv() and
    usb_control_msg_send()
  USB: serial: ftdi_sio: use usb_control_msg_recv()
  USB: serial: keyspan_pda: use usb_control_msg_recv()
  USB: serial: kl5kusb105: use usb_control_msg_recv() and
    usb_control_msg_send()

 drivers/usb/serial/ch341.c       |  97 +++++++++-------------------
 drivers/usb/serial/cp210x.c      | 107 +++++++++----------------------
 drivers/usb/serial/f81232.c      |  96 ++++++++++-----------------
 drivers/usb/serial/ftdi_sio.c    |  53 +++++----------
 drivers/usb/serial/keyspan_pda.c |  70 +++++++++-----------
 drivers/usb/serial/kl5kusb105.c  |  79 ++++++++++-------------
 6 files changed, 173 insertions(+), 329 deletions(-)

-- 
2.17.1


^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2021-09-26 13:00 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-01 20:31 [PATCH v2 0/6] USB: serial: use wrappers for usb_control_msg() Himadri Pandya
2021-08-01 20:31 ` [PATCH v2 1/6] USB: serial: ch314: use usb_control_msg_recv() and usb_control_msg_send() Himadri Pandya
2021-09-21 11:26   ` Johan Hovold
2021-08-01 20:31 ` [PATCH v2 2/6] USB: serial: cp210x: " Himadri Pandya
2021-09-21 11:34   ` Johan Hovold
2021-08-01 20:31 ` [PATCH v2 3/6] USB: serial: f81232: " Himadri Pandya
2021-09-21 12:06   ` Johan Hovold
2021-08-01 20:31 ` [PATCH v2 4/6] USB: serial: ftdi_sio: use usb_control_msg_recv() Himadri Pandya
2021-09-21 12:17   ` Johan Hovold
2021-08-01 20:31 ` [PATCH v2 5/6] USB: serial: keyspan_pda: " Himadri Pandya
2021-09-21 12:27   ` Johan Hovold
2021-08-01 20:31 ` [PATCH v2 6/6] USB: serial: kl5kusb105: use usb_control_msg_recv() and usb_control_msg_send() Himadri Pandya
2021-09-21 12:41   ` Johan Hovold
2021-09-26 13:00     ` Himadri Pandya
2021-09-21 11:10 ` [PATCH v2 0/6] USB: serial: use wrappers for usb_control_msg() Johan Hovold

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).