staging:rtl8192u: Coding style changes
v2 cover staging:rtl8192u: Coding style changes
Second attempt correcting my initial attempt where I left '_t' and '_e' trailing the structures defined. These have now been corrected.
John Whitmore (15):
staging:rtl8192u: Remove typedef of struct cmpk_txfb_t - Style staging:rtl8192u: Remove unused CMPK_TX_SET_CONFIG_SIZE - Style staging:rtl8192u: Removed unused CMPK_RX_DBG_MSG_SIZE - Style staging:rtl8192u: Correct spelling in comments - style staging:rtl8192u: Remove typedef of cmpk_intr_sta_t - Style staging:rtl8192u: Remove typedef of cmpk_set_cfg_t - Style staging:rtl8192u: Refactor use of enum dm_dig_sta_e - Style staging:rtl8192u: Refactor enum dm_ratr_sta_e usage - Style staging:rtl8192u: Remove enum dm_dig_op_e - Style staging:rtl8192u: Refactor enum dm_dig_alg_e - Style staging:rtl8192u: Remove unused enum dm_dig_dbg_e - Style staging:rtl8192u: Refactor dm_dig_connect_e - Style staging:rtl8192u: Refactor enum dm_dig_pd_th_e - Style staging:rtl8192u: Refactor enum dm_dig_cs_ratio_e - Style staging:rtl8192u: Refactor enum DM_CCK_Rx_Path_Method - Style
drivers/staging/rtl8192u/r8192U.h | 10 +- drivers/staging/rtl8192u/r8192U_dm.c | 91 ----------------- drivers/staging/rtl8192u/r8192U_dm.h | 122 ++++++++--------------- drivers/staging/rtl8192u/r819xU_cmdpkt.c | 16 +-- drivers/staging/rtl8192u/r819xU_cmdpkt.h | 24 ++--- 5 files changed, 70 insertions(+), 193 deletions(-)
Signature · 1 line
2.18.0
PATCH v2 1/8 staging:rtl8192u: Add spaces around operators - Style
Add the required spaces around '+' and '*' operators. This is a coding style change to clear the checkpatch issue. There should be no impact on runtime code execution.
--- drivers/staging/rtl8192u/ieee80211/rtl819x_Qos.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/rtl8192u/ieee80211/rtl819x_Qos.h +1 -1
@@ -7,7 +7,7 @@#define AC_PARAM_SIZE 4#define WMM_PARAM_ELE_BODY_LEN 18 -#define WMM_PARAM_ELEMENT_SIZE (8+(4*AC_PARAM_SIZE)) +#define WMM_PARAM_ELEMENT_SIZE (8 + (4 * AC_PARAM_SIZE))// // ACI/AIFSN Field.
Signature · 1 line
2.18.0
PATCH v2 1/15 staging:rtl8192u: Remove typedef of struct cmpk_txfb_t - Style
In reply to John WhitmoreRemove the typedef of the structure cmpk_txfb_t. This clears the checkpatch issue with defining new types.
Additionally the type is renamed from cmpk_txfb_t to cmd_pkt_tx_feedback removing the '_t' as the typedef has been removed.
These changes are purely coding style in nature and should have no impact on runtime code execution.
--- drivers/staging/rtl8192u/r819xU_cmdpkt.c | 8 ++++---- drivers/staging/rtl8192u/r819xU_cmdpkt.h | 6 +++--- 2 files changed, 7 insertions(+), 7 deletions(-)
drivers/staging/rtl8192u/r819xU_cmdpkt.c +4 -4
@@ -66,7 +66,7 @@ rt_status SendTxCommandPacket(struct net_device *dev, void *pData, u32 DataLen)* Overview: * * Input: PADAPTER pAdapter -* CMPK_TXFB_T *psTx_FB +* STRUCT CMD_PKT_TX_FEEDBACK *psTx_FB * * Output: NONE *
@@ -78,7 +78,7 @@ rt_status SendTxCommandPacket(struct net_device *dev, void *pData, u32 DataLen)* *--------------------------------------------------------------------------- */ -static void cmpk_count_txstatistic (struct net_device *dev,cmpk_txfb_t *pstx_fb) +static void cmpk_count_txstatistic (struct net_device *dev,struct cmd_pkt_tx_feedback *pstx_fb) {struct r8192_priv *priv =ieee80211_priv (dev);#ifdef ENABLE_PS
@@ -163,7 +163,7 @@ static void cmpk_count_txstatistic(struct net_device *dev, cmpk_txfb_t *pstx_fb)static void cmpk_handle_tx_feedback (struct net_device *dev,u8 *pmsg) {struct r8192_priv *priv =ieee80211_priv (dev); -cmpk_txfb_t rx_tx_fb; +struct cmd_pkt_tx_feedback rx_tx_fb; priv->stats.txfeedback++;
@@ -173,7 +173,7 @@ static void cmpk_handle_tx_feedback(struct net_device *dev, u8 *pmsg)* endian type before copy the message copy. */ /* Use pointer to transfer structure memory. */ -memcpy ((u8 *)&rx_tx_fb, pmsg,sizeof (cmpk_txfb_t)); +memcpy ((u8 *)&rx_tx_fb, pmsg,sizeof (struct cmd_pkt_tx_feedback ));/* 2. Use tx feedback info to count TX statistics. */ cmpk_count_txstatistic (dev, &rx_tx_fb);/* Comment previous method for TX statistic function. */
drivers/staging/rtl8192u/r819xU_cmdpkt.h +3 -3
@@ -2,7 +2,7 @@#ifndef R819XUSB_CMDPKT_H #define R819XUSB_CMDPKT_H /* Different command packet have dedicated message length and definition. */ -#define CMPK_RX_TX_FB_SIZE sizeof(cmpk_txfb_t)/* 20 */ +#define CMPK_RX_TX_FB_SIZE sizeof(struct cmd_pkt_tx_feedback)/* 20 */ #define CMPK_TX_SET_CONFIG_SIZE sizeof(cmpk_set_cfg_t)/* 16 */ #define CMPK_BOTH_QUERY_CONFIG_SIZE sizeof(cmpk_set_cfg_t)/* 16 */ #define CMPK_RX_TX_STS_SIZE sizeof(cmpk_tx_status_t)
@@ -19,7 +19,7 @@/*------------------------------Define structure----------------------------*/ /* Define different command packet structure. */ /* 1. RX side: TX feedback packet. */ -typedef struct tag_cmd_pkt_tx_feedback { +struct cmd_pkt_tx_feedback {/* DWORD 0 */ u8 element_id;/* Command packet type. */ u8 length;/* Command packet length. */
@@ -52,7 +52,7 @@ typedef struct tag_cmd_pkt_tx_feedback {/* DWORD 5 */ u16 reserve3;u16 duration; -} cmpk_txfb_t; +};/* 2. RX side: Interrupt status packet. It includes Beacon State, * Beacon Timer Interrupt and other useful informations in MAC ISR Reg.
Signature · 1 line
2.18.0
PATCH v2 2/15 staging:rtl8192u: Remove unused CMPK_TX_SET_CONFIG_SIZE - Style
In reply to John WhitmoreRemove the unused macro CMPK_TX_SET_CONFIG_SIZE. This is a coding style change which should not impact runtime code execution.
--- drivers/staging/rtl8192u/r819xU_cmdpkt.h | 1 - 1 file changed, 1 deletion(-)
drivers/staging/rtl8192u/r819xU_cmdpkt.h +0 -1
@@ -3,7 +3,6 @@#define R819XUSB_CMDPKT_H /* Different command packet have dedicated message length and definition. */ #define CMPK_RX_TX_FB_SIZE sizeof(struct cmd_pkt_tx_feedback)/* 20 */ -#define CMPK_TX_SET_CONFIG_SIZE sizeof(cmpk_set_cfg_t)/* 16 */ #define CMPK_BOTH_QUERY_CONFIG_SIZE sizeof(cmpk_set_cfg_t)/* 16 */ #define CMPK_RX_TX_STS_SIZE sizeof(cmpk_tx_status_t)#define CMPK_RX_DBG_MSG_SIZE sizeof(cmpk_rx_dbginfo_t)
Signature · 1 line
2.18.0
PATCH v2 2/8 staging:rtl8192u: Rename ACI_AIFSN - Style
In reply to John WhitmoreRename the union ACI_AIFSN to aci_aifsn and remove the typedef directive.
The removal of the typedef clears the checkpatch issue with defining new types. The renaming is to adhere to the coding style where types are name in lower case.
These changes are coding style changes which should have no impact on runtime execution.
--- drivers/staging/rtl8192u/ieee80211/rtl819x_Qos.h | 6 +++--- drivers/staging/rtl8192u/r8192U_dm.c | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-)
drivers/staging/rtl8192u/ieee80211/rtl819x_Qos.h +3 -3
@@ -13,7 +13,7 @@// ACI/AIFSN Field. // Ref: WMM spec 2.2.2: WME Parameter Element, p.12. // -typedef union _ACI_AIFSN { +union aci_aifsn {u8 charData;struct {
@@ -22,7 +22,7 @@ typedef union _ACI_AIFSN { u8 ACI:2; u8 Reserved:1; } f;// Field -}ACI_AIFSN , *PACI_AIFSN ; +};// // ECWmin/ECWmax field.
@@ -45,7 +45,7 @@ typedef union _AC_PARAM {u8 charData[4 ];struct { -ACI_AIFSN AciAifsn; +union aci_aifsn AciAifsn;ECW Ecw;u16 TXOPLimit; } f;// Field
drivers/staging/rtl8192u/r8192U_dm.c +1 -1
@@ -2333,7 +2333,7 @@ static void dm_check_edca_turbo( {/* TODO: Modified this part and try to set acm control in only 1 IO processing!! */ -PACI_AIFSN pAciAifsn = (PACI_AIFSN )&(qos_parameters->aifs[0 ]); +union aci_aifsn *pAciAifsn = (union aci_aifsn *)&(qos_parameters->aifs[0 ]);u8 AcmCtrl;read_nic_byte (dev, AcmHwCtrl, &AcmCtrl);
Signature · 1 line
2.18.0
Re: [PATCH v2 02/08] staging:rtl8192u: Rename ACI_AIFSN - Style
Quoted 6 lines · John Whitmore
Rename the union
ACI_AIFSNtoaci_aifsnand remove the typedef directive.The removal of the typedef clears the checkpatch issue with defining new types. The renaming is to adhere to the coding style where types are name in lower case.
Quoted 9 lines
These changes are coding style changes which should have no impact on runtime execution.
Signed-off-by John Whitmore <[email protected]>--- drivers/staging/rtl8192u/ieee80211/rtl819x_Qos.h | 6 +++--- drivers/staging/rtl8192u/r8192U_dm.c | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-)
Again :(
Ignore - Sorry sent by mistake, forgot to clean out previous patches.
PATCH v2 3/15 staging:rtl8192u: Removed unused CMPK_RX_DBG_MSG_SIZE - Style
In reply to John WhitmoreRemove the unused macro definition CMPK_RX_DBG_MSG_SIZE. This is a coding style change which should have no impact on runtime code execution.
--- drivers/staging/rtl8192u/r819xU_cmdpkt.h | 1 - 1 file changed, 1 deletion(-)
drivers/staging/rtl8192u/r819xU_cmdpkt.h +0 -1
@@ -5,7 +5,6 @@#define CMPK_RX_TX_FB_SIZE sizeof(struct cmd_pkt_tx_feedback)/* 20 */ #define CMPK_BOTH_QUERY_CONFIG_SIZE sizeof(cmpk_set_cfg_t)/* 16 */ #define CMPK_RX_TX_STS_SIZE sizeof(cmpk_tx_status_t) -#define CMPK_RX_DBG_MSG_SIZE sizeof(cmpk_rx_dbginfo_t)#define CMPK_TX_RAHIS_SIZE sizeof(cmpk_tx_rahis_t)/* 2008/05/08 amy For USB constant. */
Signature · 1 line
2.18.0
PATCH v2 3/8 staging:rtl8192u: Rename member variables - Style
In reply to John WhitmoreRename the member variables of union aci_aifsn, which should be named in lowercase. The only member variable, of this union, which is actually used is 'acm'.
This are coding style changes which should have no impact on runtime code execution.
--- drivers/staging/rtl8192u/ieee80211/rtl819x_Qos.h | 10 +++++----- drivers/staging/rtl8192u/r8192U_dm.c | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-)
drivers/staging/rtl8192u/ieee80211/rtl819x_Qos.h +5 -5
@@ -14,13 +14,13 @@// Ref: WMM spec 2.2.2: WME Parameter Element, p.12. // union aci_aifsn { -u8 charData; +u8 char_data;struct { -u8 AIFSN:4 ; -u8 ACM:1 ; -u8 ACI:2 ; -u8 Reserved:1 ; +u8 aifsn:4 ; +u8 acm:1 ; +u8 aci:2 ; +u8 reserved:1 ; } f;// Field };
drivers/staging/rtl8192u/r8192U_dm.c +1 -1
@@ -2338,7 +2338,7 @@ static void dm_check_edca_turbo(read_nic_byte (dev, AcmHwCtrl, &AcmCtrl); -if (pAciAifsn->f.ACM) {/* ACM bit is 1. */ +if (pAciAifsn->f.acm) {/* acm bit is 1. */ AcmCtrl |= AcmHw_BeqEn; }else {/* ACM bit is 0. */ AcmCtrl &= (~AcmHw_BeqEn);
Signature · 1 line
2.18.0
Re: [PATCH v2 03/08] staging:rtl8192u: Rename member variables - Style
Quoted 10 lines · John Whitmore
Rename the member variables of union
aci_aifsn, which should be named in lowercase. The only member variable, of this union, which is actually used is 'acm'.This are coding style changes which should have no impact on runtime code execution.
Signed-off-by John Whitmore <[email protected]>--- drivers/staging/rtl8192u/ieee80211/rtl819x_Qos.h | 10 +++++-----
Ignore - Sorry sent by mistake, forgot to clean out previous patches.
PATCH v2 4/15 staging:rtl8192u: Correct spelling in comments - style
In reply to John WhitmoreCorrect the spelling of a number of comments, which cause a checkpatch issue. This is purely a coding style change which should have no impact on runtime code execution.
--- drivers/staging/rtl8192u/r819xU_cmdpkt.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/staging/rtl8192u/r819xU_cmdpkt.h +2 -2
@@ -53,7 +53,7 @@ struct cmd_pkt_tx_feedback { };/* 2. RX side: Interrupt status packet. It includes Beacon State, -* Beacon Timer Interrupt and other useful informations in MAC ISR Reg. +* Beacon Timer Interrupt and other useful information in MAC ISR Reg. */ typedef struct tag_cmd_pkt_interrupt_status { u8 element_id; /* Command packet type. */
@@ -80,7 +80,7 @@ typedef struct tag_cmd_pkt_set_configuration {u32 mask; } cmpk_set_cfg_t; -/* 4. Both side : TX/RX query configuraton packet. The query structure is the +/* 4. Both side : TX/RX query configuration packet. The query structure is the * same as set configuration. */ #define cmpk_query_cfg_t cmpk_set_cfg_t
Signature · 1 line
2.18.0
Quoted 21 lines · John Whitmore
Second attempt correcting my initial attempt where I left '_t' and '_e' trailing the structures defined. These have now been corrected.
John Whitmore (15):
staging:rtl8192u: Remove typedef of structcmpk_txfb_t- Style staging:rtl8192u: Remove unusedCMPK_TX_SET_CONFIG_SIZE- Style staging:rtl8192u: Removed unusedCMPK_RX_DBG_MSG_SIZE- Style staging:rtl8192u: Correct spelling in comments - style staging:rtl8192u: Remove typedef ofcmpk_intr_sta_t- Style staging:rtl8192u: Remove typedef ofcmpk_set_cfg_t- Style staging:rtl8192u: Refactor use of enumdm_dig_sta_e- Style staging:rtl8192u: Refactor enumdm_ratr_sta_eusage - Style staging:rtl8192u: Remove enumdm_dig_op_e- Style staging:rtl8192u: Refactor enumdm_dig_alg_e- Style staging:rtl8192u: Remove unused enumdm_dig_dbg_e- Style staging:rtl8192u: Refactordm_dig_connect_e- Style staging:rtl8192u: Refactor enumdm_dig_pd_th_e- Style staging:rtl8192u: Refactor enumdm_dig_cs_ratio_e- Style staging:rtl8192u: Refactor enumDM_CCK_Rx_Path_Method- Style
Quoted 10 lines
drivers/staging/rtl8192u/r8192U.h | 10 +- drivers/staging/rtl8192u/r8192U_dm.c | 91 ----------------- drivers/staging/rtl8192u/r8192U_dm.h | 122 ++++++++--------------- drivers/staging/rtl8192u/r819xU_cmdpkt.c | 16 +-- drivers/staging/rtl8192u/r819xU_cmdpkt.h | 24 ++--- 5 files changed, 70 insertions(+), 193 deletions(-)Signature · 1 line
2.18.0
I made a mistake and sent patches when I had old patches still left from a previous :( That meant a few patch xx/08 were sent.
I then resent the proper patch set xx/15 but in hindsight I should have bumped the version to 3?
Scissors :(