linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v3 00/12] drivers: usb: misc: update to use usb_control_msg_{send|recv}() API
@ 2021-01-26 18:33 Anant Thazhemadam
  2021-01-26 18:33 ` [PATCH v3 01/12] usb: misc: appledisplay: update to use the " Anant Thazhemadam
                   ` (12 more replies)
  0 siblings, 13 replies; 31+ messages in thread
From: Anant Thazhemadam @ 2021-01-26 18:33 UTC (permalink / raw)
  To: Greg Kroah-Hartman, Gustavo A. R. Silva, Xu Wang, Liu Shixin,
	Peter Chen, Minas Harutyunyan, Chunfeng Yun, Lee Jones, Tom Rix,
	Evgeny Novikov, Alan Stern, Bixuan Cui, Anant Thazhemadam
  Cc: linux-usb, linux-kernel

The new usb_control_msg_{send|recv}() API provides an improved way of 
using usb_control_msg(). Using this, short reads/writes 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, and
also update the return value checking mechanisms in place (if any), as
necessary so nothing breaks.

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/20201130013103.2580467-1-anant.thazhemadam@gmail.com/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/20201129160612.1908074-1-anant.thazhemadam@gmail.com/ 


Anant Thazhemadam (12):
  usb: misc: appledisplay: update to use the
    usb_control_msg_{send|recv}() API
  usb: misc: cypress_cy7c63: update to use usb_control_msg_recv()
  usb: misc: cytherm: update to use usb_control_msg_recv()
  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: iowarrior: update to use the usb_control_msg_{send|recv}()
    API
  usb: misc: isight_firmware: update to use usb_control_msg_send()
  usb: misc: ldusb: update to use usb_control_msg_send()
  usb: misc: lvstest: update to use the usb_control_msg_{send|recv}()
    API
  usb: misc: trancevibrator: update to use usb_control_msg_send()
  usb: misc: usbsevseg: update to use usb_control_msg_send()
  usb: misc: usbtest: update to use the usb_control_msg_{send|recv}()
    API

 drivers/usb/misc/appledisplay.c    |  46 +++++------
 drivers/usb/misc/cypress_cy7c63.c  |  21 ++---
 drivers/usb/misc/cytherm.c         | 128 ++++++++++-------------------
 drivers/usb/misc/ehset.c           |  76 ++++++++---------
 drivers/usb/misc/ezusb.c           |  16 +---
 drivers/usb/misc/iowarrior.c       |  34 ++++----
 drivers/usb/misc/isight_firmware.c |  30 +++----
 drivers/usb/misc/ldusb.c           |   8 +-
 drivers/usb/misc/lvstest.c         |  38 ++++-----
 drivers/usb/misc/trancevibrator.c  |   4 +-
 drivers/usb/misc/usbsevseg.c       |  60 ++++----------
 drivers/usb/misc/usbtest.c         |  69 +++++++---------
 12 files changed, 198 insertions(+), 332 deletions(-)

-- 
2.25.1


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

end of thread, other threads:[~2021-01-27 17:23 UTC | newest]

Thread overview: 31+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-26 18:33 [PATCH v3 00/12] drivers: usb: misc: update to use usb_control_msg_{send|recv}() API Anant Thazhemadam
2021-01-26 18:33 ` [PATCH v3 01/12] usb: misc: appledisplay: update to use the " Anant Thazhemadam
2021-01-27 13:58   ` Johan Hovold
2021-01-27 14:42     ` Anant Thazhemadam
2021-01-27 17:20       ` Johan Hovold
2021-01-26 18:33 ` [PATCH v3 02/12] usb: misc: cypress_cy7c63: update to use usb_control_msg_recv() Anant Thazhemadam
2021-01-27 14:09   ` Johan Hovold
2021-01-27 14:40     ` Anant Thazhemadam
2021-01-26 18:33 ` [PATCH v3 03/12] usb: misc: cytherm: " Anant Thazhemadam
2021-01-27 14:21   ` Johan Hovold
2021-01-26 18:33 ` [PATCH v3 04/12] usb: misc: ehset: update to use the usb_control_msg_{send|recv}() API Anant Thazhemadam
2021-01-27 14:49   ` Johan Hovold
2021-01-26 18:33 ` [PATCH v3 05/12] usb: misc: ezusb: update to use usb_control_msg_send() Anant Thazhemadam
2021-01-27 14:52   ` Johan Hovold
2021-01-26 18:33 ` [PATCH v3 06/12] usb: misc: iowarrior: update to use the usb_control_msg_{send|recv}() API Anant Thazhemadam
2021-01-27 14:59   ` Johan Hovold
2021-01-26 18:33 ` [PATCH v3 07/12] usb: misc: isight_firmware: update to use usb_control_msg_send() Anant Thazhemadam
2021-01-27 15:04   ` Johan Hovold
2021-01-26 18:33 ` [PATCH v3 08/12] usb: misc: ldusb: " Anant Thazhemadam
2021-01-27 15:06   ` Johan Hovold
2021-01-26 18:39 ` [PATCH v3 09/12] usb: misc: lvstest: update to use the usb_control_msg_{send|recv}() API Anant Thazhemadam
2021-01-27 15:15   ` Johan Hovold
2021-01-26 18:40 ` [PATCH v3 10/12] usb: misc: trancevibrator: update to use usb_control_msg_send() Anant Thazhemadam
2021-01-27 15:17   ` Johan Hovold
2021-01-26 18:40 ` [PATCH v3 11/12] usb: misc: usbsevseg: " Anant Thazhemadam
2021-01-27 16:46   ` Johan Hovold
     [not found] ` <20210126184043.915235-1-anant.thazhemadam@gmail.com>
2021-01-26 18:47   ` [PATCH v3 12/12] [PATCH v3 12/12] usb: misc: usbtest: update to use the, usb_control_msg_{send|recv}() API Anant Thazhemadam
2021-01-27 11:31     ` Greg Kroah-Hartman
2021-01-27 12:12 ` [RESEND PATCH v3 12/12] usb: misc: usbtest: update to use the " Anant Thazhemadam
2021-01-27 16:26   ` Alan Stern
2021-01-27 17:00   ` 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).