Staging: rtl8192e: Style guide variable renames
cover Staging: rtl8192e: Style guide variable renames
This series renames variables to correct style guilde violations.
~Tree
Tree Davies (6):
Staging: rtl8192e: Rename variable CmdID_End
Staging: rtl8192e: Rename variable CmdID_SetTxPowerLevel
Staging: rtl8192e: Rename variable CmdID_BBRegWrite10
Staging: rtl8192e: Rename variable CmdID_WritePortUlong
Staging: rtl8192e: Rename variable CmdID_WritePortUshort
Staging: rtl8192e: Rename variable CmdID_WritePortUchar
drivers/staging/rtl8192e/rtl8192e/r8192E_phy.c | 18 +++++++++--------- drivers/staging/rtl8192e/rtllib.h | 12 ++++++------ 2 files changed, 15 insertions(+), 15 deletions(-)
Signature · 1 line
2.30.2
PATCH 1/6 Staging: rtl8192e: Rename variable CmdID_End
Rename variable CmdID_End to cmd_id_end
to fix checkpatch warning Avoid CamelCase.
--- drivers/staging/rtl8192e/rtl8192e/r8192E_phy.c | 8 ++++---- drivers/staging/rtl8192e/rtllib.h | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-)
drivers/staging/rtl8192e/rtl8192e/r8192E_phy.c +4 -4
@@ -556,14 +556,14 @@ static u8 _rtl92e_phy_switch_channel_step(struct net_device *dev, u8 channel, 0, 0, 0);_rtl92e_phy_set_sw_chnl_cmd_array (dev, ieee->PreCommonCmd, PreCommonCmdCnt++, -MAX_PRECMD_CNT , CmdID_End, +MAX_PRECMD_CNT , cmd_id_end,0 ,0 ,0 ); PostCommonCmdCnt =0 ;_rtl92e_phy_set_sw_chnl_cmd_array (dev, ieee->PostCommonCmd, PostCommonCmdCnt++, -MAX_POSTCMD_CNT , CmdID_End, +MAX_POSTCMD_CNT , cmd_id_end,0 ,0 ,0 ); RfDependCmdCnt =0 ;
@@ -585,7 +585,7 @@ static u8 _rtl92e_phy_switch_channel_step(struct net_device *dev, u8 channel, ieee->RfDependCmd, RfDependCmdCnt++,MAX_RFDEPENDCMD_CNT , - CmdID_End, 0, 0, 0); + cmd_id_end, 0, 0, 0); do { switch (*stage) {
@@ -600,7 +600,7 @@ static u8 _rtl92e_phy_switch_channel_step(struct net_device *dev, u8 channel,break ; } -if (CurrentCmd && CurrentCmd->CmdID == CmdID_End) { +if (CurrentCmd && CurrentCmd->CmdID == cmd_id_end) {if ((*stage) ==2 )return true; (*stage)++;
drivers/staging/rtl8192e/rtllib.h +1 -1
@@ -153,7 +153,7 @@ struct cb_desc { };enum sw_chnl_cmd_id { - CmdID_End, + cmd_id_end, CmdID_SetTxPowerLevel, CmdID_BBRegWrite10, CmdID_WritePortUlong,
Signature · 1 line
2.30.2
PATCH 2/6 Staging: rtl8192e: Rename variable CmdID_SetTxPowerLevel
In reply to Tree DaviesRename variable CmdID_SetTxPowerLevel to cmd_id_set_tx_power_level to fix checkpatch warning Avoid CamelCase.
--- drivers/staging/rtl8192e/rtl8192e/r8192E_phy.c | 4 ++-- drivers/staging/rtl8192e/rtllib.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-)
drivers/staging/rtl8192e/rtl8192e/r8192E_phy.c +2 -2
@@ -552,7 +552,7 @@ static u8 _rtl92e_phy_switch_channel_step(struct net_device *dev, u8 channel,_rtl92e_phy_set_sw_chnl_cmd_array (dev, ieee->PreCommonCmd, PreCommonCmdCnt++,MAX_PRECMD_CNT , - CmdID_SetTxPowerLevel, + cmd_id_set_tx_power_level,0 ,0 ,0 ); _rtl92e_phy_set_sw_chnl_cmd_array(dev, ieee->PreCommonCmd, PreCommonCmdCnt++,
@@ -611,7 +611,7 @@ static u8 _rtl92e_phy_switch_channel_step(struct net_device *dev, u8 channel,if (!CurrentCmd)continue ;switch (CurrentCmd->CmdID) { -case CmdID_SetTxPowerLevel: +case cmd_id_set_tx_power_level:if (priv->ic_cut >VERSION_8190_BD )_rtl92e_set_tx_power_level (dev, channel);
drivers/staging/rtl8192e/rtllib.h +1 -1
@@ -154,7 +154,7 @@ struct cb_desc {enum sw_chnl_cmd_id { cmd_id_end, - CmdID_SetTxPowerLevel, + cmd_id_set_tx_power_level, CmdID_BBRegWrite10, CmdID_WritePortUlong, CmdID_WritePortUshort,
Signature · 1 line
2.30.2
PATCH 3/6 Staging: rtl8192e: Rename variable CmdID_BBRegWrite10
In reply to Tree DaviesRename variable CmdID_BBRegWrite10 to cmd_id_bbreg_write10 to fix checkpatch warning Avoid CamelCase.
--- drivers/staging/rtl8192e/rtllib.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/rtl8192e/rtllib.h +1 -1
@@ -155,7 +155,7 @@ struct cb_desc {enum sw_chnl_cmd_id { cmd_id_end, cmd_id_set_tx_power_level, - CmdID_BBRegWrite10, + cmd_id_bbreg_write10, CmdID_WritePortUlong, CmdID_WritePortUshort, CmdID_WritePortUchar,
Signature · 1 line
2.30.2
PATCH 4/6 Staging: rtl8192e: Rename variable CmdID_WritePortUlong
In reply to Tree DaviesRename variable CmdID_WritePortUlong to cmd_id_write_port_ulong to fix checkpatch warning Avoid CamelCase.
--- drivers/staging/rtl8192e/rtl8192e/r8192E_phy.c | 2 +- drivers/staging/rtl8192e/rtllib.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
drivers/staging/rtl8192e/rtl8192e/r8192E_phy.c +1 -1
@@ -616,7 +616,7 @@ static u8 _rtl92e_phy_switch_channel_step(struct net_device *dev, u8 channel,_rtl92e_set_tx_power_level (dev, channel);break ; -case CmdID_WritePortUlong: +case cmd_id_write_port_ulong:rtl92e_writel (dev, CurrentCmd->Para1, CurrentCmd->Para2);break ;
drivers/staging/rtl8192e/rtllib.h +1 -1
@@ -156,7 +156,7 @@ enum sw_chnl_cmd_id { cmd_id_end, cmd_id_set_tx_power_level, cmd_id_bbreg_write10, - CmdID_WritePortUlong, + cmd_id_write_port_ulong, CmdID_WritePortUshort, CmdID_WritePortUchar, CmdID_RF_WriteReg,
Signature · 1 line
2.30.2
Re: [PATCH 4/6] Staging: rtl8192e: Rename variable CmdID_WritePortUlong
Quoted 14 lines · Tree Davies
Rename variable
CmdID_WritePortUlongtocmd_id_write_port_ulongto fix checkpatch warning Avoid CamelCase.Signed-off-by Tree Davies <[email protected]>--- drivers/staging/rtl8192e/rtl8192e/r8192E_phy.c | 2 +- drivers/staging/rtl8192e/rtllib.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)drivers/staging/rtl8192e/rtl8192e/r8192E_phy.c +0
-0
drivers/staging/rtl8192e/rtl8192e/r8192E_phy.c static u8 _rtl92e_phy_switch_channel_step(struct net_device *dev, u8 channel, · line 621
Quoted 7 lines
drivers/staging/rtl8192e/rtl8192e/r8192E_phy.c +1
-1@@ -616,7 +616,7 @@ static u8 _rtl92e_phy_switch_channel_step(struct net_device *dev, u8 channel,_rtl92e_set_tx_power_level (dev, channel);break ; -case CmdID_WritePortUlong: +case cmd_id_write_port_ulong:rtl92e_writel (dev, CurrentCmd->Para1, CurrentCmd->Para2);
I'm not a historian. I know that writel() writes a u32 value for historical reasons. But I feel like it's unexpected to create a write ulong which writes a u32.
regards,
dan carpenter
PATCH 5/6 Staging: rtl8192e: Rename variable CmdID_WritePortUshort
In reply to Tree DaviesRename variable CmdID_WritePortUshort to cmd_id_write_port_ushort to fix checkpatch warning Avoid CamelCase.
--- drivers/staging/rtl8192e/rtl8192e/r8192E_phy.c | 2 +- drivers/staging/rtl8192e/rtllib.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
drivers/staging/rtl8192e/rtl8192e/r8192E_phy.c +1 -1
@@ -620,7 +620,7 @@ static u8 _rtl92e_phy_switch_channel_step(struct net_device *dev, u8 channel,rtl92e_writel (dev, CurrentCmd->Para1, CurrentCmd->Para2);break ; -case CmdID_WritePortUshort: +case cmd_id_write_port_ushort:rtl92e_writew (dev, CurrentCmd->Para1, CurrentCmd->Para2);break ;
drivers/staging/rtl8192e/rtllib.h +1 -1
@@ -157,7 +157,7 @@ enum sw_chnl_cmd_id { cmd_id_set_tx_power_level, cmd_id_bbreg_write10, cmd_id_write_port_ulong, - CmdID_WritePortUshort, + cmd_id_write_port_ushort, CmdID_WritePortUchar, CmdID_RF_WriteReg, };
Signature · 1 line
2.30.2
PATCH 6/6 Staging: rtl8192e: Rename variable CmdID_WritePortUchar
In reply to Tree DaviesRename variable CmdID_WritePortUchar to cmd_id_write_port_uchar to fix checkpatch warning Avoid CamelCase.
--- drivers/staging/rtl8192e/rtl8192e/r8192E_phy.c | 2 +- drivers/staging/rtl8192e/rtllib.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
drivers/staging/rtl8192e/rtl8192e/r8192E_phy.c +1 -1
@@ -624,7 +624,7 @@ static u8 _rtl92e_phy_switch_channel_step(struct net_device *dev, u8 channel,rtl92e_writew (dev, CurrentCmd->Para1, CurrentCmd->Para2);break ; -case CmdID_WritePortUchar: +case cmd_id_write_port_uchar:rtl92e_writeb (dev, CurrentCmd->Para1, CurrentCmd->Para2);break ;
drivers/staging/rtl8192e/rtllib.h +1 -1
@@ -158,7 +158,7 @@ enum sw_chnl_cmd_id { cmd_id_bbreg_write10, cmd_id_write_port_ulong, cmd_id_write_port_ushort, - CmdID_WritePortUchar, + cmd_id_write_port_uchar, CmdID_RF_WriteReg, };
Signature · 1 line
2.30.2