[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <X8n+uO2nYzRcxaLk@localhost>
Date: Fri, 4 Dec 2020 10:17:44 +0100
From: Johan Hovold <johan@...nel.org>
To: Himadri Pandya <himadrispandya@...il.com>
Cc: johan@...nel.org, gregkh@...uxfoundation.org,
linux-usb@...r.kernel.org, linux-kernel@...r.kernel.org,
linux-kernel-mentees@...ts.linuxfoundation.org
Subject: Re: [PATCH 02/15] usb: serial: belkin_sa: use usb_control_msg_send()
On Wed, Nov 04, 2020 at 12:16:50PM +0530, Himadri Pandya wrote:
> The new usb_control_msg_send() nicely wraps usb_control_msg() with
> proper error check. Hence use the wrapper instead of calling
> usb_control_msg() directly.
>
> Signed-off-by: Himadri Pandya <himadrispandya@...il.com>
> ---
> drivers/usb/serial/belkin_sa.c | 35 +++++++++++++++++-----------------
> 1 file changed, 17 insertions(+), 18 deletions(-)
>
> diff --git a/drivers/usb/serial/belkin_sa.c b/drivers/usb/serial/belkin_sa.c
> index 9bb123ab9bc9..a5ff55f48303 100644
> --- a/drivers/usb/serial/belkin_sa.c
> +++ b/drivers/usb/serial/belkin_sa.c
> @@ -105,9 +105,10 @@ struct belkin_sa_private {
> #define WDR_TIMEOUT 5000 /* default urb timeout */
>
> /* assumes that struct usb_serial *serial is available */
> -#define BSA_USB_CMD(c, v) usb_control_msg(serial->dev, usb_sndctrlpipe(serial->dev, 0), \
> - (c), BELKIN_SA_SET_REQUEST_TYPE, \
> - (v), 0, NULL, 0, WDR_TIMEOUT)
> +#define BSA_USB_CMD(c, v) usb_control_msg_send(serial->dev, 0, (c), \
> + BELKIN_SA_SET_REQUEST_TYPE, \
> + (v), 0, NULL, 0, WDR_TIMEOUT, \
> + GFP_KERNEL)
Also here there's no data stage so there no point in using the new
helpers.
Please drop this one as well.
Johan
Powered by blists - more mailing lists