[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20210919235356.4151-5-fmdefrancesco@gmail.com>
Date: Mon, 20 Sep 2021 01:53:41 +0200
From: "Fabio M. De Francesco" <fmdefrancesco@...il.com>
To: Larry Finger <Larry.Finger@...inger.net>,
Phillip Potter <phil@...lpotter.co.uk>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Pavel Skripkin <paskripkin@...il.com>,
linux-staging@...ts.linux.dev, linux-kernel@...r.kernel.org,
David Laight <david.Laight@...lab.com>,
Dan Carpenter <dan.carpenter@...cle.com>,
Martin Kaiser <martin@...ser.cx>
Cc: "Fabio M. De Francesco" <fmdefrancesco@...il.com>
Subject: [PATCH v8 04/19] staging: r8188eu: reorder comments in usbctrl_vendorreq()
Reorder comments in usbctrl_vendorreq() to follow the Linux style.
Co-developed-by: Pavel Skripkin <paskripkin@...il.com>
Signed-off-by: Pavel Skripkin <paskripkin@...il.com>
Signed-off-by: Fabio M. De Francesco <fmdefrancesco@...il.com>
---
drivers/staging/r8188eu/hal/usb_ops_linux.c | 15 ++++++++++-----
1 file changed, 10 insertions(+), 5 deletions(-)
diff --git a/drivers/staging/r8188eu/hal/usb_ops_linux.c b/drivers/staging/r8188eu/hal/usb_ops_linux.c
index d92bdcc3716d..9138b730490f 100644
--- a/drivers/staging/r8188eu/hal/usb_ops_linux.c
+++ b/drivers/staging/r8188eu/hal/usb_ops_linux.c
@@ -35,9 +35,11 @@ static int usbctrl_vendorreq(struct intf_hdl *intfhdl, u16 value, void *data, u1
io_buf = dvobjpriv->usb_vendor_req_buf;
if (requesttype == REALTEK_USB_VENQT_READ)
- pipe = usb_rcvctrlpipe(udev, 0);/* read_in */
+ /* read in */
+ pipe = usb_rcvctrlpipe(udev, 0);
else
- pipe = usb_sndctrlpipe(udev, 0);/* write_out */
+ /* write out */
+ pipe = usb_sndctrlpipe(udev, 0);
while (++vendorreq_times <= MAX_USBCTRL_VENDORREQ_TIMES) {
if (requesttype == REALTEK_USB_VENQT_READ)
@@ -49,11 +51,13 @@ static int usbctrl_vendorreq(struct intf_hdl *intfhdl, u16 value, void *data, u1
requesttype, value, REALTEK_USB_VENQT_CMD_IDX,
io_buf, len, RTW_USB_CONTROL_MSG_TIMEOUT);
- if (status == len) { /* Success this control transfer. */
+ if (status == len) {
+ /* success */
rtw_reset_continual_urb_error(dvobjpriv);
if (requesttype == REALTEK_USB_VENQT_READ)
memcpy(data, io_buf, len);
- } else { /* error cases */
+ } else {
+ /* error cases */
DBG_88E("reg 0x%x, usb %s %u fail, status:%d value=0x%x, vendorreq_times:%d\n",
value, (requesttype == REALTEK_USB_VENQT_READ) ? "read" : "write",
len, status, *(u32 *)data, vendorreq_times);
@@ -65,7 +69,8 @@ static int usbctrl_vendorreq(struct intf_hdl *intfhdl, u16 value, void *data, u1
struct hal_data_8188e *haldata = GET_HAL_DATA(adapt);
haldata->srestpriv.wifi_error_status = USB_VEN_REQ_CMD_FAIL;
}
- } else { /* status != len && status >= 0 */
+ } else {
+ /* status != len && status >= 0 */
if (status > 0) {
if (requesttype == REALTEK_USB_VENQT_READ) {
/* For Control read transfer, we have to copy the read data from io_buf to data. */
--
2.33.0
Powered by blists - more mailing lists