All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/4] staging:rtl8192u: Style changes r819xU_firmware.h
@ 2018-09-08  9:44 John Whitmore
  2018-09-08  9:44 ` [PATCH 1/4] staging:rtl8192u: Remove unused RTL8190_CPU_START_OFFSET - Style John Whitmore
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: John Whitmore @ 2018-09-08  9:44 UTC (permalink / raw)
  To: linux-kernel; +Cc: devel, gregkh, John Whitmore

This short series of patches just clears simple checkpatch issues
with the header file r819xU_firmware.h.

John Whitmore (4):
  staging:rtl8192u: Remove unused RTL8190_CPU_START_OFFSET - Style
  staging:rtl8192u: Refactor GET_COMMAND_PACKET_FRAG_THRESHOLD - Style
  staging:rtl8192u: Remove typedef from firmware_init_step_e - Style
  staging:rtl8192u: Remove typedef from enum opt_rst_type_e - Style

 drivers/staging/rtl8192u/r819xU_firmware.c |  4 ++--
 drivers/staging/rtl8192u/r819xU_firmware.h | 11 +++++------
 2 files changed, 7 insertions(+), 8 deletions(-)

-- 
2.18.0


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH 1/4] staging:rtl8192u: Remove unused RTL8190_CPU_START_OFFSET - Style
  2018-09-08  9:44 [PATCH 0/4] staging:rtl8192u: Style changes r819xU_firmware.h John Whitmore
@ 2018-09-08  9:44 ` John Whitmore
  2018-09-08  9:44 ` [PATCH 2/4] staging:rtl8192u: Refactor GET_COMMAND_PACKET_FRAG_THRESHOLD " John Whitmore
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: John Whitmore @ 2018-09-08  9:44 UTC (permalink / raw)
  To: linux-kernel; +Cc: devel, gregkh, John Whitmore

The defined constant RTL8190_CPU_START_OFFSET is not used in the code
so has been removed. This is a coding style change which should have
no impact on runtime code execution.

Signed-off-by: John Whitmore <johnfwhitmore@gmail.com>
---
 drivers/staging/rtl8192u/r819xU_firmware.h | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/staging/rtl8192u/r819xU_firmware.h b/drivers/staging/rtl8192u/r819xU_firmware.h
index cccd1c82ffe0..794dca7dcd95 100644
--- a/drivers/staging/rtl8192u/r819xU_firmware.h
+++ b/drivers/staging/rtl8192u/r819xU_firmware.h
@@ -2,7 +2,6 @@
 #ifndef __INC_FIRMWARE_H
 #define __INC_FIRMWARE_H
 
-#define RTL8190_CPU_START_OFFSET	0x80
 #define GET_COMMAND_PACKET_FRAG_THRESHOLD(v) \
 	(4*(v/4) - 8 - USB_HWDESC_HEADER_LEN)
 
-- 
2.18.0


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH 2/4] staging:rtl8192u: Refactor GET_COMMAND_PACKET_FRAG_THRESHOLD - Style
  2018-09-08  9:44 [PATCH 0/4] staging:rtl8192u: Style changes r819xU_firmware.h John Whitmore
  2018-09-08  9:44 ` [PATCH 1/4] staging:rtl8192u: Remove unused RTL8190_CPU_START_OFFSET - Style John Whitmore
@ 2018-09-08  9:44 ` John Whitmore
  2018-09-08  9:44 ` [PATCH 3/4] staging:rtl8192u: Remove typedef from firmware_init_step_e " John Whitmore
  2018-09-08  9:44 ` [PATCH 4/4] staging:rtl8192u: Remove typedef from enum opt_rst_type_e " John Whitmore
  3 siblings, 0 replies; 5+ messages in thread
From: John Whitmore @ 2018-09-08  9:44 UTC (permalink / raw)
  To: linux-kernel; +Cc: devel, gregkh, John Whitmore

The MACRO GET_COMMAND_PACKET_FRAG_THRESHOLD causes a number of
checkpatch issues so has been refactored to use braces around the
parameter 'v' to avoid precedence issues, and to add spaces around
operators.

These changes are coding style changes which should have no impact
on runtime code execution.

Signed-off-by: John Whitmore <johnfwhitmore@gmail.com>
---
 drivers/staging/rtl8192u/r819xU_firmware.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/rtl8192u/r819xU_firmware.h b/drivers/staging/rtl8192u/r819xU_firmware.h
index 794dca7dcd95..e78e547044b4 100644
--- a/drivers/staging/rtl8192u/r819xU_firmware.h
+++ b/drivers/staging/rtl8192u/r819xU_firmware.h
@@ -3,7 +3,7 @@
 #define __INC_FIRMWARE_H
 
 #define GET_COMMAND_PACKET_FRAG_THRESHOLD(v) \
-	(4*(v/4) - 8 - USB_HWDESC_HEADER_LEN)
+	(4 * ((v) / 4) - 8 - USB_HWDESC_HEADER_LEN)
 
 typedef enum _firmware_init_step {
 	FW_INIT_STEP0_BOOT = 0,
-- 
2.18.0


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH 3/4] staging:rtl8192u: Remove typedef from firmware_init_step_e - Style
  2018-09-08  9:44 [PATCH 0/4] staging:rtl8192u: Style changes r819xU_firmware.h John Whitmore
  2018-09-08  9:44 ` [PATCH 1/4] staging:rtl8192u: Remove unused RTL8190_CPU_START_OFFSET - Style John Whitmore
  2018-09-08  9:44 ` [PATCH 2/4] staging:rtl8192u: Refactor GET_COMMAND_PACKET_FRAG_THRESHOLD " John Whitmore
@ 2018-09-08  9:44 ` John Whitmore
  2018-09-08  9:44 ` [PATCH 4/4] staging:rtl8192u: Remove typedef from enum opt_rst_type_e " John Whitmore
  3 siblings, 0 replies; 5+ messages in thread
From: John Whitmore @ 2018-09-08  9:44 UTC (permalink / raw)
  To: linux-kernel; +Cc: devel, gregkh, John Whitmore

Remove the typedef directive from enumerated type firmware_init_step_e
this clears the checkpatch issue with adding new types to the code.

This is a coding style change which should have no impact on runtime
code execution.

Signed-off-by: John Whitmore <johnfwhitmore@gmail.com>
---
 drivers/staging/rtl8192u/r819xU_firmware.c | 2 +-
 drivers/staging/rtl8192u/r819xU_firmware.h | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/rtl8192u/r819xU_firmware.c b/drivers/staging/rtl8192u/r819xU_firmware.c
index 9c7e19aedff1..15fd026638fe 100644
--- a/drivers/staging/rtl8192u/r819xU_firmware.c
+++ b/drivers/staging/rtl8192u/r819xU_firmware.c
@@ -209,7 +209,7 @@ bool init_firmware(struct net_device *dev)
 	u8			*mapped_file = NULL;
 	u32			init_step = 0;
 	opt_rst_type_e	rst_opt = OPT_SYSTEM_RESET;
-	firmware_init_step_e	starting_state = FW_INIT_STEP0_BOOT;
+	enum firmware_init_step_e  starting_state = FW_INIT_STEP0_BOOT;
 
 	rt_firmware		*pfirmware = priv->pFirmware;
 	const struct firmware	*fw_entry;
diff --git a/drivers/staging/rtl8192u/r819xU_firmware.h b/drivers/staging/rtl8192u/r819xU_firmware.h
index e78e547044b4..870301853480 100644
--- a/drivers/staging/rtl8192u/r819xU_firmware.h
+++ b/drivers/staging/rtl8192u/r819xU_firmware.h
@@ -5,11 +5,11 @@
 #define GET_COMMAND_PACKET_FRAG_THRESHOLD(v) \
 	(4 * ((v) / 4) - 8 - USB_HWDESC_HEADER_LEN)
 
-typedef enum _firmware_init_step {
+enum firmware_init_step_e {
 	FW_INIT_STEP0_BOOT = 0,
 	FW_INIT_STEP1_MAIN = 1,
 	FW_INIT_STEP2_DATA = 2,
-} firmware_init_step_e;
+};
 
 typedef enum _opt_rst_type {
 	OPT_SYSTEM_RESET = 0,
-- 
2.18.0


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH 4/4] staging:rtl8192u: Remove typedef from enum opt_rst_type_e - Style
  2018-09-08  9:44 [PATCH 0/4] staging:rtl8192u: Style changes r819xU_firmware.h John Whitmore
                   ` (2 preceding siblings ...)
  2018-09-08  9:44 ` [PATCH 3/4] staging:rtl8192u: Remove typedef from firmware_init_step_e " John Whitmore
@ 2018-09-08  9:44 ` John Whitmore
  3 siblings, 0 replies; 5+ messages in thread
From: John Whitmore @ 2018-09-08  9:44 UTC (permalink / raw)
  To: linux-kernel; +Cc: devel, gregkh, John Whitmore

Remove the typedef directive from enumerated type opt_rst_type_e,
this change clears the checkpatch issue with defining new types in
the code.

This is a coding style change which should not impact runtime
code execution.

Signed-off-by: John Whitmore <johnfwhitmore@gmail.com>
---
 drivers/staging/rtl8192u/r819xU_firmware.c | 2 +-
 drivers/staging/rtl8192u/r819xU_firmware.h | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/rtl8192u/r819xU_firmware.c b/drivers/staging/rtl8192u/r819xU_firmware.c
index 15fd026638fe..c3ea906f3af3 100644
--- a/drivers/staging/rtl8192u/r819xU_firmware.c
+++ b/drivers/staging/rtl8192u/r819xU_firmware.c
@@ -208,7 +208,7 @@ bool init_firmware(struct net_device *dev)
 	u32			file_length = 0;
 	u8			*mapped_file = NULL;
 	u32			init_step = 0;
-	opt_rst_type_e	rst_opt = OPT_SYSTEM_RESET;
+	enum opt_rst_type_e	   rst_opt = OPT_SYSTEM_RESET;
 	enum firmware_init_step_e  starting_state = FW_INIT_STEP0_BOOT;
 
 	rt_firmware		*pfirmware = priv->pFirmware;
diff --git a/drivers/staging/rtl8192u/r819xU_firmware.h b/drivers/staging/rtl8192u/r819xU_firmware.h
index 870301853480..b84344c1e62b 100644
--- a/drivers/staging/rtl8192u/r819xU_firmware.h
+++ b/drivers/staging/rtl8192u/r819xU_firmware.h
@@ -11,9 +11,9 @@ enum firmware_init_step_e {
 	FW_INIT_STEP2_DATA = 2,
 };
 
-typedef enum _opt_rst_type {
+enum opt_rst_type_e {
 	OPT_SYSTEM_RESET = 0,
 	OPT_FIRMWARE_RESET = 1,
-} opt_rst_type_e;
+};
 
 #endif
-- 
2.18.0


^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2018-09-08  9:44 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-09-08  9:44 [PATCH 0/4] staging:rtl8192u: Style changes r819xU_firmware.h John Whitmore
2018-09-08  9:44 ` [PATCH 1/4] staging:rtl8192u: Remove unused RTL8190_CPU_START_OFFSET - Style John Whitmore
2018-09-08  9:44 ` [PATCH 2/4] staging:rtl8192u: Refactor GET_COMMAND_PACKET_FRAG_THRESHOLD " John Whitmore
2018-09-08  9:44 ` [PATCH 3/4] staging:rtl8192u: Remove typedef from firmware_init_step_e " John Whitmore
2018-09-08  9:44 ` [PATCH 4/4] staging:rtl8192u: Remove typedef from enum opt_rst_type_e " John Whitmore

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.