From: Anant Thazhemadam <anant.thazhemadam@gmail.com>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
"Gustavo A. R. Silva" <gustavoars@kernel.org>,
Xu Wang <vulab@iscas.ac.cn>, Liu Shixin <liushixin2@huawei.com>,
Peter Chen <peter.chen@nxp.com>,
Minas Harutyunyan <hminas@synopsys.com>,
Chunfeng Yun <chunfeng.yun@mediatek.com>,
Lee Jones <lee.jones@linaro.org>, Tom Rix <trix@redhat.com>,
Evgeny Novikov <novikov@ispras.ru>,
Alan Stern <stern@rowland.harvard.edu>,
Bixuan Cui <cuibixuan@huawei.com>,
Anant Thazhemadam <anant.thazhemadam@gmail.com>
Cc: linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH v3 00/12] drivers: usb: misc: update to use usb_control_msg_{send|recv}() API
Date: Wed, 27 Jan 2021 00:03:51 +0530 [thread overview]
Message-ID: <20210126183403.911653-1-anant.thazhemadam@gmail.com> (raw)
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
next reply other threads:[~2021-01-27 1:35 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-01-26 18:33 Anant Thazhemadam [this message]
2021-01-26 18:33 ` [PATCH v3 01/12] usb: misc: appledisplay: update to use the usb_control_msg_{send|recv}() API 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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210126183403.911653-1-anant.thazhemadam@gmail.com \
--to=anant.thazhemadam@gmail.com \
--cc=chunfeng.yun@mediatek.com \
--cc=cuibixuan@huawei.com \
--cc=gregkh@linuxfoundation.org \
--cc=gustavoars@kernel.org \
--cc=hminas@synopsys.com \
--cc=lee.jones@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=liushixin2@huawei.com \
--cc=novikov@ispras.ru \
--cc=peter.chen@nxp.com \
--cc=stern@rowland.harvard.edu \
--cc=trix@redhat.com \
--cc=vulab@iscas.ac.cn \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).