[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20220417175441.13830-7-straube.linux@gmail.com>
Date: Sun, 17 Apr 2022 19:54:39 +0200
From: Michael Straube <straube.linux@...il.com>
To: gregkh@...uxfoundation.org
Cc: Larry.Finger@...inger.net, phil@...lpotter.co.uk,
linux-staging@...ts.linux.dev, linux-kernel@...r.kernel.org,
Michael Straube <straube.linux@...il.com>
Subject: [PATCH v4 6/8] staging: r8188eu: remove variables from rtl8188e_firmware_download()
The local variables fw_version, fw_subversion, fw_signature in
rtl8188e_firmware_download() are only used in one place. Use the
assigned values directly and remove the variables to make the code
shorter and cleaner.
Signed-off-by: Michael Straube <straube.linux@...il.com>
---
v4:
- no changes
v3:
- no changes
v2:
- no changes
drivers/staging/r8188eu/core/rtw_fw.c | 8 ++------
1 file changed, 2 insertions(+), 6 deletions(-)
diff --git a/drivers/staging/r8188eu/core/rtw_fw.c b/drivers/staging/r8188eu/core/rtw_fw.c
index 42b36505cf8b..7fa985cc787a 100644
--- a/drivers/staging/r8188eu/core/rtw_fw.c
+++ b/drivers/staging/r8188eu/core/rtw_fw.c
@@ -244,7 +244,6 @@ int rtl8188e_firmware_download(struct adapter *padapter)
struct dvobj_priv *dvobj = adapter_to_dvobj(padapter);
struct device *device = dvobj_to_dev(dvobj);
struct rt_firmware_hdr *fwhdr = NULL;
- u16 fw_version, fw_subversion, fw_signature;
u8 *fw_data;
u32 fw_size;
static int log_version;
@@ -261,13 +260,10 @@ int rtl8188e_firmware_download(struct adapter *padapter)
/* To Check Fw header. Added by tynli. 2009.12.04. */
fwhdr = (struct rt_firmware_hdr *)dvobj->firmware.data;
- fw_version = le16_to_cpu(fwhdr->version);
- fw_subversion = fwhdr->subversion;
- fw_signature = le16_to_cpu(fwhdr->signature);
-
if (!log_version++)
pr_info("%sFirmware Version %d, SubVersion %d, Signature 0x%x\n",
- DRIVER_PREFIX, fw_version, fw_subversion, fw_signature);
+ DRIVER_PREFIX, le16_to_cpu(fwhdr->version), fwhdr->subversion,
+ le16_to_cpu(fwhdr->signature));
if (IS_FW_HEADER_EXIST(fwhdr)) {
fw_data = fw_data + sizeof(struct rt_firmware_hdr);
--
2.35.1
Powered by blists - more mailing lists