mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Martin Kaiser <martin@kaiser.cx>
To: Larry Finger <Larry.Finger@lwfinger.net>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: linux-staging@lists.linux.dev, kernel-janitors@vger.kernel.org,
	linux-kernel@vger.kernel.org, Martin Kaiser <martin@kaiser.cx>
Subject: [PATCH 05/11] staging: rtl8188eu: clean up usb_read8
Date: Tue,  6 Apr 2021 22:48:23 +0200	[thread overview]
Message-ID: <20210406204829.18130-5-martin@kaiser.cx> (raw)
In-Reply-To: <20210406204829.18130-1-martin@kaiser.cx>

Remove unnecessary variable, summarize declaration and assignment.

Signed-off-by: Martin Kaiser <martin@kaiser.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


  parent reply	other threads:[~2021-04-06 20:49 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-06 20:48 [PATCH 01/11] staging: rtl8188eu: remove unused efuse hal components Martin Kaiser
2021-04-06 20:48 ` [PATCH 02/11] staging: rtl8188eu: ctrl vendor req value is always 0x05 Martin Kaiser
2021-04-06 20:48 ` [PATCH 03/11] staging: rtl8188eu: ctrl vendor req index is not used Martin Kaiser
2021-04-06 20:48 ` [PATCH 04/11] staging: rtl8188eu: use actual request type as parameter Martin Kaiser
2021-04-06 20:48 ` Martin Kaiser [this message]
2021-04-06 20:48 ` [PATCH 06/11] staging: rtl8188eu: clean up usb_read16 Martin Kaiser
2021-04-06 20:48 ` [PATCH 07/11] staging: rtl8188eu: clean up usb_read32 Martin Kaiser
2021-04-06 20:48 ` [PATCH 08/11] staging: rtl8188eu: clean up usb_write8 Martin Kaiser
2021-04-06 20:48 ` [PATCH 09/11] staging: rtl8188eu: clean up usb_write16 Martin Kaiser
2021-04-06 20:48 ` [PATCH 10/11] staging: rtl8188eu: clean up usb_write32 Martin Kaiser
2021-04-06 20:48 ` [PATCH 11/11] staging: rtl8188eu: remove an obsolete comment Martin Kaiser

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=20210406204829.18130-5-martin@kaiser.cx \
    --to=martin@kaiser.cx \
    --cc=Larry.Finger@lwfinger.net \
    --cc=gregkh@linuxfoundation.org \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-staging@lists.linux.dev \
    /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®