* [PATCH 0/3] staging: rtl8188eu: checkpatch cleanups in hal/fw.c
@ 2020-04-13 17:59 Michael Straube
2020-04-13 17:59 ` [PATCH 1/3] staging: rtl8188eu: rename define to upper case Michael Straube
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Michael Straube @ 2020-04-13 17:59 UTC (permalink / raw)
To: gregkh; +Cc: Larry.Finger, devel, linux-kernel, Michael Straube
This series clears the last remaining checkpatch issues in the file
hal/fw.c.
Michael Straube (3):
staging: rtl8188eu: rename define to upper case
staging: rtl8188eu: cleanup long line in fw.c
staging: rtl8188eu: make const char array static
drivers/staging/rtl8188eu/hal/fw.c | 7 ++++---
drivers/staging/rtl8188eu/include/rtl8188e_spec.h | 2 +-
2 files changed, 5 insertions(+), 4 deletions(-)
--
2.26.0
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH 1/3] staging: rtl8188eu: rename define to upper case
2020-04-13 17:59 [PATCH 0/3] staging: rtl8188eu: checkpatch cleanups in hal/fw.c Michael Straube
@ 2020-04-13 17:59 ` Michael Straube
2020-04-13 17:59 ` [PATCH 2/3] staging: rtl8188eu: cleanup long line in fw.c Michael Straube
2020-04-13 17:59 ` [PATCH 3/3] staging: rtl8188eu: make const char array static Michael Straube
2 siblings, 0 replies; 4+ messages in thread
From: Michael Straube @ 2020-04-13 17:59 UTC (permalink / raw)
To: gregkh; +Cc: Larry.Finger, devel, linux-kernel, Michael Straube
Rename 'FWDL_ChkSum_rpt' to 'FWDL_CHKSUM_RPT' as defines are normaly
named all upper case. Also clears a camel case checkpatch warning.
Signed-off-by: Michael Straube <straube.linux@gmail.com>
---
drivers/staging/rtl8188eu/hal/fw.c | 4 ++--
drivers/staging/rtl8188eu/include/rtl8188e_spec.h | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/staging/rtl8188eu/hal/fw.c b/drivers/staging/rtl8188eu/hal/fw.c
index 486ee4bd4744..dbf7883f9ed7 100644
--- a/drivers/staging/rtl8188eu/hal/fw.c
+++ b/drivers/staging/rtl8188eu/hal/fw.c
@@ -111,7 +111,7 @@ static int _rtl88e_fw_free_to_go(struct adapter *adapt)
do {
value32 = usb_read32(adapt, REG_MCUFWDL);
- if (value32 & FWDL_ChkSum_rpt)
+ if (value32 & FWDL_CHKSUM_RPT)
break;
} while (counter++ < POLLING_READY_TIMEOUT_COUNT);
@@ -192,7 +192,7 @@ int rtl88eu_download_fw(struct adapter *adapt)
rtl88e_firmware_selfreset(adapt);
}
_rtl88e_enable_fw_download(adapt, true);
- usb_write8(adapt, REG_MCUFWDL, usb_read8(adapt, REG_MCUFWDL) | FWDL_ChkSum_rpt);
+ usb_write8(adapt, REG_MCUFWDL, usb_read8(adapt, REG_MCUFWDL) | FWDL_CHKSUM_RPT);
_rtl88e_write_fw(adapt, download_data, download_size);
_rtl88e_enable_fw_download(adapt, false);
diff --git a/drivers/staging/rtl8188eu/include/rtl8188e_spec.h b/drivers/staging/rtl8188eu/include/rtl8188e_spec.h
index dd943c831d91..be30c9434a29 100644
--- a/drivers/staging/rtl8188eu/include/rtl8188e_spec.h
+++ b/drivers/staging/rtl8188eu/include/rtl8188e_spec.h
@@ -817,7 +817,7 @@ So the following defines for 92C is not entire!!!!!!
/* 2 MCUFWDL */
#define MCUFWDL_EN BIT(0)
#define MCUFWDL_RDY BIT(1)
-#define FWDL_ChkSum_rpt BIT(2)
+#define FWDL_CHKSUM_RPT BIT(2)
#define MACINI_RDY BIT(3)
#define BBINI_RDY BIT(4)
#define RFINI_RDY BIT(5)
--
2.26.0
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH 2/3] staging: rtl8188eu: cleanup long line in fw.c
2020-04-13 17:59 [PATCH 0/3] staging: rtl8188eu: checkpatch cleanups in hal/fw.c Michael Straube
2020-04-13 17:59 ` [PATCH 1/3] staging: rtl8188eu: rename define to upper case Michael Straube
@ 2020-04-13 17:59 ` Michael Straube
2020-04-13 17:59 ` [PATCH 3/3] staging: rtl8188eu: make const char array static Michael Straube
2 siblings, 0 replies; 4+ messages in thread
From: Michael Straube @ 2020-04-13 17:59 UTC (permalink / raw)
To: gregkh; +Cc: Larry.Finger, devel, linux-kernel, Michael Straube
Add line break to avoid line length over 80 characters.
Signed-off-by: Michael Straube <straube.linux@gmail.com>
---
drivers/staging/rtl8188eu/hal/fw.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/staging/rtl8188eu/hal/fw.c b/drivers/staging/rtl8188eu/hal/fw.c
index dbf7883f9ed7..432e6bea5ea1 100644
--- a/drivers/staging/rtl8188eu/hal/fw.c
+++ b/drivers/staging/rtl8188eu/hal/fw.c
@@ -192,7 +192,8 @@ int rtl88eu_download_fw(struct adapter *adapt)
rtl88e_firmware_selfreset(adapt);
}
_rtl88e_enable_fw_download(adapt, true);
- usb_write8(adapt, REG_MCUFWDL, usb_read8(adapt, REG_MCUFWDL) | FWDL_CHKSUM_RPT);
+ usb_write8(adapt, REG_MCUFWDL,
+ usb_read8(adapt, REG_MCUFWDL) | FWDL_CHKSUM_RPT);
_rtl88e_write_fw(adapt, download_data, download_size);
_rtl88e_enable_fw_download(adapt, false);
--
2.26.0
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH 3/3] staging: rtl8188eu: make const char array static
2020-04-13 17:59 [PATCH 0/3] staging: rtl8188eu: checkpatch cleanups in hal/fw.c Michael Straube
2020-04-13 17:59 ` [PATCH 1/3] staging: rtl8188eu: rename define to upper case Michael Straube
2020-04-13 17:59 ` [PATCH 2/3] staging: rtl8188eu: cleanup long line in fw.c Michael Straube
@ 2020-04-13 17:59 ` Michael Straube
2 siblings, 0 replies; 4+ messages in thread
From: Michael Straube @ 2020-04-13 17:59 UTC (permalink / raw)
To: gregkh; +Cc: Larry.Finger, devel, linux-kernel, Michael Straube
Make const char array 'fw_name' static. Clears a checkpatch warning
and reduces object file size by 17 bytes (gcc 9.3.1 x86_64).
WARNING: const array should probably be static const
Signed-off-by: Michael Straube <straube.linux@gmail.com>
---
drivers/staging/rtl8188eu/hal/fw.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/staging/rtl8188eu/hal/fw.c b/drivers/staging/rtl8188eu/hal/fw.c
index 432e6bea5ea1..3d1d29e9f8e0 100644
--- a/drivers/staging/rtl8188eu/hal/fw.c
+++ b/drivers/staging/rtl8188eu/hal/fw.c
@@ -146,7 +146,7 @@ int rtl88eu_download_fw(struct adapter *adapt)
struct dvobj_priv *dvobj = adapter_to_dvobj(adapt);
struct device *device = dvobj_to_dev(dvobj);
const struct firmware *fw;
- const char fw_name[] = "rtlwifi/rtl8188eufw.bin";
+ static const char fw_name[] = "rtlwifi/rtl8188eufw.bin";
struct rtl92c_firmware_header *pfwheader = NULL;
u8 *download_data, *fw_data;
size_t download_size;
--
2.26.0
^ permalink raw reply related [flat|nested] 4+ messages in thread
end of thread, other threads:[~2020-04-13 18:01 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-04-13 17:59 [PATCH 0/3] staging: rtl8188eu: checkpatch cleanups in hal/fw.c Michael Straube
2020-04-13 17:59 ` [PATCH 1/3] staging: rtl8188eu: rename define to upper case Michael Straube
2020-04-13 17:59 ` [PATCH 2/3] staging: rtl8188eu: cleanup long line in fw.c Michael Straube
2020-04-13 17:59 ` [PATCH 3/3] staging: rtl8188eu: make const char array static Michael Straube
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.