aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFabio M. De Francesco <fmdefrancesco@gmail.com>2021-09-24 14:26:53 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2021-09-27 17:37:11 +0200
commitdb752ce50b53be2ab73a5d65941e8c43034ce8d2 (patch)
tree7822a84123bbe5b2a0face21fc5885f2177214f7
parentstaging: r8188eu: remove test in usbctrl_vendorreq() (diff)
staging: r8188eu: reorder comments in usbctrl_vendorreq()
Reorder comments in usbctrl_vendorreq() to follow Linux coding style. Delete two of them because they are "obvious". Co-developed-by: Pavel Skripkin <paskripkin@gmail.com> Signed-off-by: Pavel Skripkin <paskripkin@gmail.com> Signed-off-by: Fabio M. De Francesco <fmdefrancesco@gmail.com> Link: https://lore.kernel.org/r/20210924122705.3781-5-fmdefrancesco@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--drivers/staging/r8188eu/hal/usb_ops_linux.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/drivers/staging/r8188eu/hal/usb_ops_linux.c b/drivers/staging/r8188eu/hal/usb_ops_linux.c
index 61a016e3608f..35d268c5cd7f 100644
--- a/drivers/staging/r8188eu/hal/usb_ops_linux.c
+++ b/drivers/staging/r8188eu/hal/usb_ops_linux.c
@@ -35,9 +35,9 @@ static int usbctrl_vendorreq(struct intf_hdl *intf, u16 value, void *data, u16 l
io_buf = dvobjpriv->usb_vendor_req_buf;
if (requesttype == REALTEK_USB_VENQT_READ)
- pipe = usb_rcvctrlpipe(udev, 0);/* read_in */
+ pipe = usb_rcvctrlpipe(udev, 0);
else
- pipe = usb_sndctrlpipe(udev, 0);/* write_out */
+ pipe = usb_sndctrlpipe(udev, 0);
while (++vendorreq_times <= MAX_USBCTRL_VENDORREQ_TIMES) {
if (requesttype == REALTEK_USB_VENQT_READ)
@@ -49,11 +49,13 @@ static int usbctrl_vendorreq(struct intf_hdl *intf, u16 value, void *data, u16 l
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 +67,8 @@ static int usbctrl_vendorreq(struct intf_hdl *intf, u16 value, void *data, u16 l
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. */