From: Anant Thazhemadam <anant.thazhemadam@gmail.com>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Anant Thazhemadam <anant.thazhemadam@gmail.com>,
Johan Hovold <johan@kernel.org>,
Minas Harutyunyan <hminas@synopsys.com>,
Peter Chen <peter.chen@nxp.com>
Cc: linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH v4 0/3] drivers: usb: misc: update to use usb_control_msg_{send|recv}() API
Date: Sat, 27 Mar 2021 04:02:48 +0530 [thread overview]
Message-ID: <20210326223251.753952-1-anant.thazhemadam@gmail.com> (raw)
The new usb_control_msg_{send|recv}() API provides a more convenient way
of using usb_control_msg() in some usecases. Using this, short reads 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
wherever it would be a good fit, and also update the return value
checking mechanisms in place (if any), as necessary so nothing breaks.
Changes in v4:
* Drop all proposed changes to drivers (from v3) where the new API
doesn't fit appropriately.
* Update commit messages.
* Link to v3:
https://lore.kernel.org/linux-usb/YBF9exziI12OCSuA@hovoldconsulting.com/T/#m269ab33b52331c134bbbc77d13cb65c2194a6093
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 (3):
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: usbsevseg: update to use usb_control_msg_send()
drivers/usb/misc/ehset.c | 76 +++++++++++++++---------------------
drivers/usb/misc/ezusb.c | 16 +-------
drivers/usb/misc/usbsevseg.c | 60 ++++++++--------------------
3 files changed, 51 insertions(+), 101 deletions(-)
--
2.25.1
next reply other threads:[~2021-03-26 22:34 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-03-26 22:32 Anant Thazhemadam [this message]
2021-03-26 22:32 ` [PATCH v4 1/3] usb: misc: ehset: update to use the " Anant Thazhemadam
2021-03-26 22:32 ` [PATCH v4 2/3] usb: misc: ezusb: update to use usb_control_msg_send() Anant Thazhemadam
2021-03-26 22:32 ` [PATCH v4 3/3] usb: misc: usbsevseg: " Anant Thazhemadam
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=20210326223251.753952-1-anant.thazhemadam@gmail.com \
--to=anant.thazhemadam@gmail.com \
--cc=gregkh@linuxfoundation.org \
--cc=hminas@synopsys.com \
--cc=johan@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=peter.chen@nxp.com \
/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
all inboxes | Powered by JetHome®