[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20210126183403.911653-1-anant.thazhemadam@gmail.com>
Date: Wed, 27 Jan 2021 00:03:51 +0530
From: Anant Thazhemadam <anant.thazhemadam@...il.com>
To: Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
"Gustavo A. R. Silva" <gustavoars@...nel.org>,
Xu Wang <vulab@...as.ac.cn>,
Liu Shixin <liushixin2@...wei.com>,
Peter Chen <peter.chen@....com>,
Minas Harutyunyan <hminas@...opsys.com>,
Chunfeng Yun <chunfeng.yun@...iatek.com>,
Lee Jones <lee.jones@...aro.org>, Tom Rix <trix@...hat.com>,
Evgeny Novikov <novikov@...ras.ru>,
Alan Stern <stern@...land.harvard.edu>,
Bixuan Cui <cuibixuan@...wei.com>,
Anant Thazhemadam <anant.thazhemadam@...il.com>
Cc: linux-usb@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: [PATCH v3 00/12] drivers: usb: misc: update to use usb_control_msg_{send|recv}() API
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
Powered by blists - more mailing lists