[PATCH v2 0/6] USB: serial: use wrappers for usb_control_msg()

From: Himadri Pandya
Date: Sun Aug 01 2021 - 16:32:34 EST


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