[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20210406204829.18130-5-martin@kaiser.cx>
Date: Tue, 6 Apr 2021 22:48:23 +0200
From: Martin Kaiser <martin@...ser.cx>
To: Larry Finger <Larry.Finger@...inger.net>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Cc: linux-staging@...ts.linux.dev, kernel-janitors@...r.kernel.org,
linux-kernel@...r.kernel.org, Martin Kaiser <martin@...ser.cx>
Subject: [PATCH 05/11] staging: rtl8188eu: clean up usb_read8
Remove unnecessary variable, summarize declaration and assignment.
Signed-off-by: Martin Kaiser <martin@...ser.cx>
---
drivers/staging/rtl8188eu/os_dep/usb_ops_linux.c | 10 +++-------
1 file changed, 3 insertions(+), 7 deletions(-)
diff --git a/drivers/staging/rtl8188eu/os_dep/usb_ops_linux.c b/drivers/staging/rtl8188eu/os_dep/usb_ops_linux.c
index 205a15dd67a5..0172405c815e 100644
--- a/drivers/staging/rtl8188eu/os_dep/usb_ops_linux.c
+++ b/drivers/staging/rtl8188eu/os_dep/usb_ops_linux.c
@@ -296,14 +296,10 @@ usbctrl_vendorreq(struct adapter *adapt, u16 value, void *pdata, u16 len, u8 req
u8 usb_read8(struct adapter *adapter, u32 addr)
{
- u16 wvalue;
- u16 len;
- u8 data = 0;
-
- wvalue = (u16)(addr & 0x0000ffff);
- len = 1;
+ u16 wvalue = (u16)(addr & 0xffff);
+ u8 data;
- usbctrl_vendorreq(adapter, wvalue, &data, len, REALTEK_USB_VENQT_READ);
+ usbctrl_vendorreq(adapter, wvalue, &data, 1, REALTEK_USB_VENQT_READ);
return data;
}
--
2.20.1
Powered by blists - more mailing lists