staging:rtl8192u: Style changes r819xU_firmware.h
cover staging:rtl8192u: Style changes r819xU_firmware.h
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(-)
Signature · 1 line
2.18.0
PATCH 1/4 staging:rtl8192u: Remove unused RTL8190_CPU_START_OFFSET - Style
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.
--- drivers/staging/rtl8192u/r819xU_firmware.h | 1 - 1 file changed, 1 deletion(-)
drivers/staging/rtl8192u/r819xU_firmware.h +0 -1
@@ -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)
Signature · 1 line
2.18.0
PATCH 2/4 staging:rtl8192u: Refactor GET_COMMAND_PACKET_FRAG_THRESHOLD - Style
In reply to John WhitmoreThe 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.
--- drivers/staging/rtl8192u/r819xU_firmware.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/rtl8192u/r819xU_firmware.h +1 -1
@@ -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,
Signature · 1 line
2.18.0
PATCH 3/4 staging:rtl8192u: Remove typedef from firmware_init_step_e - Style
In reply to John WhitmoreRemove 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.
--- drivers/staging/rtl8192u/r819xU_firmware.c | 2 +- drivers/staging/rtl8192u/r819xU_firmware.h | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-)
drivers/staging/rtl8192u/r819xU_firmware.c +1 -1
@@ -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;
drivers/staging/rtl8192u/r819xU_firmware.h +2 -2
@@ -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,
Signature · 1 line
2.18.0
PATCH 4/4 staging:rtl8192u: Remove typedef from enum opt_rst_type_e - Style
In reply to John WhitmoreRemove 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.
--- drivers/staging/rtl8192u/r819xU_firmware.c | 2 +- drivers/staging/rtl8192u/r819xU_firmware.h | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-)
drivers/staging/rtl8192u/r819xU_firmware.c +1 -1
@@ -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;
drivers/staging/rtl8192u/r819xU_firmware.h +2 -2
@@ -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
Signature · 1 line
2.18.0