staging: rtl8192e: renamed variable is40MHz and 4 other
cover staging: rtl8192e: renamed variable is40MHz and 4 other
Hi,
This patch series renames (5) different variables with the checkpatch coding style issue, Avoid CamelCase.
Patch 1/5) rename variable is40MHz
Patch 2/5) rename variable isShortGI
Patch 3/5) rename variable retValue
Patch 4/5) rename variable EWC11NHTCap
Patch 5/5) rename variable AdvCoding
Gary Rookard (5):
staging: rtl8192e: rename variable is40MHz
staging: rtl8192e: rename variable isShortGI
staging: rtl8192e: rename variable retValue
staging: rtl8192e: rename variable EWC11NHTCap
staging: rtl8192e: rename variable AdvCoding
drivers/staging/rtl8192e/rtl819x_HT.h | 2 +- drivers/staging/rtl8192e/rtl819x_HTProc.c | 58 +++++++++++------------ 2 files changed, 30 insertions(+), 30 deletions(-)
Signature · 1 line
2.43.0
PATCH 1/5 staging: rtl8192e: rename variable is40MHz
Coding style issue, checkpatch avoid CamelCase,
rename it. is40MHz -> is_40mhz
--- drivers/staging/rtl8192e/rtl819x_HTProc.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-)
drivers/staging/rtl8192e/rtl819x_HTProc.c +8 -8
@@ -87,36 +87,36 @@ static u16 ht_mcs_to_data_rate(struct rtllib_device *ieee, u8 mcs_rate) {struct rt_hi_throughput *ht_info = ieee->ht_info; -u8 is40MHz = (ht_info->cur_bw_40mhz) ?1 :0 ; +u8 is_40mhz = (ht_info->cur_bw_40mhz) ?1 :0 ;u8 isShortGI = (ht_info->cur_bw_40mhz) ? ((ht_info->cur_short_gi_40mhz) ?1 :0 ) : ((ht_info->cur_short_gi_20mhz) ?1 :0 ); -return MCS_DATA_RATE [is40MHz][isShortGI][(mcs_rate &0x7f )]; +return MCS_DATA_RATE [is_40mhz][isShortGI][(mcs_rate &0x7f )]; }u16 tx_count_to_data_rate (struct rtllib_device *ieee,u8 data_rate) {u16 cck_of_dm_rate[12 ] = {0x02 ,0x04 ,0x0b ,0x16 ,0x0c ,0x12 ,0x18 ,0x24 ,0x30 ,0x48 ,0x60 ,0x6c }; -u8 is40MHz =0 ; +u8 is_40mhz =0 ;u8 isShortGI =0 ;if (data_rate <12 )return cck_of_dm_rate[data_rate];if (data_rate >=0x10 && data_rate <=0x1f ) { - is40MHz =0 ; + is_40mhz =0 ; isShortGI =0 ; }else if (data_rate >=0x20 && data_rate <=0x2f ) { - is40MHz =1 ; + is_40mhz =1 ; isShortGI =0 ; }else if (data_rate >=0x30 && data_rate <=0x3f ) { - is40MHz =0 ; + is_40mhz =0 ; isShortGI =1 ; }else if (data_rate >=0x40 && data_rate <=0x4f ) { - is40MHz =1 ; + is_40mhz =1 ; isShortGI =1 ; } -return MCS_DATA_RATE [is40MHz][isShortGI][data_rate &0xf ]; +return MCS_DATA_RATE [is_40mhz][isShortGI][data_rate &0xf ]; }bool is_ht_half_nmode_aps (struct rtllib_device *ieee)
Signature · 1 line
2.43.0
Re: [PATCH 1/5] staging: rtl8192e: rename variable is40MHz
Quoted 13 lines · Gary Rookard
Coding style issue, checkpatch avoid CamelCase,
rename it. is40MHz ->is_40mhzSigned-off-by Gary Rookard <[email protected]>--- drivers/staging/rtl8192e/rtl819x_HTProc.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-)drivers/staging/rtl8192e/rtl819x_HTProc.c +0
-0
drivers/staging/rtl8192e/rtl819x_HTProc.c static u16 ht_mcs_to_data_rate(struct rtllib_device *ieee, u8 mcs_rate) · line 90
Quoted 5 lines
drivers/staging/rtl8192e/rtl819x_HTProc.c +1
-1@@ -87,36 +87,36 @@ static u16 ht_mcs_to_data_rate(struct rtllib_device *ieee, u8 mcs_rate) {struct rt_hi_throughput *ht_info = ieee->ht_info; -u8 is40MHz = (ht_info->cur_bw_40mhz) ?1 :0 ; +u8 is_40mhz = (ht_info->cur_bw_40mhz) ?1 :0 ;
This should be is_40MHz. It's metric. M means Mega. m means milli.
regards,
dan carpenter
Re: [PATCH 1/5] staging: rtl8192e: rename variable is40MHz
Quoted 17 lines · Dan Carpenter
Quoted 16 lines · Gary Rookard
Coding style issue, checkpatch avoid CamelCase,
rename it. is40MHz ->is_40mhzSigned-off-by Gary Rookard <[email protected]>--- drivers/staging/rtl8192e/rtl819x_HTProc.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-)drivers/staging/rtl8192e/rtl819x_HTProc.c +0
-0@@ -87,36 +87,36 @@ static u16 ht_mcs_to_data_rate(struct rtllib_device *ieee, u8 mcs_rate) {struct rt_hi_throughput *ht_info = ieee->ht_info;
Quoted 7 lines
drivers/staging/rtl8192e/rtl819x_HTProc.c static u16 ht_mcs_to_data_rate(struct rtllib_device *ieee, u8 mcs_rate) · line 90
Quoted 2 lines
drivers/staging/rtl8192e/rtl819x_HTProc.c +1
-1-u8 is40MHz = (ht_info->cur_bw_40mhz) ?1 :0 ; +u8 is_40mhz = (ht_info->cur_bw_40mhz) ?1 :0 ;This should be
is_40MHz. It's metric. M means Mega. m means milli.regards,
dan carpenter
--
Okay, stupid me didin't give it to much thought that way, ...wow there's more that way then just mine
Good catch!
Regards,
Gary
Signature · 1 line
Sent with my mu4e on Void GNU/Linux.
A message that is not in the archive (sent off-list or not yet received): 62836460ae502097ca8307bcee85a5ae3634e1acc74af843ffc466c28d1a0b95@mu.id
Re: [PATCH 1/5] staging: rtl8192e: rename variable is40MHz
Quoted 28 lines · Gary Rookard
Quoted 26 lines · Gary Rookard
[[PGP Signed Part:Undecided]]
Quoted 22 lines · Dan Carpenter
Quoted 13 lines · Gary Rookard
Coding style issue, checkpatch avoid CamelCase,
rename it. is40MHz ->is_40mhzSigned-off-by Gary Rookard <[email protected]>--- drivers/staging/rtl8192e/rtl819x_HTProc.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-)drivers/staging/rtl8192e/rtl819x_HTProc.c +0
-0drivers/staging/rtl8192e/rtl819x_HTProc.c static u16 ht_mcs_to_data_rate(struct rtllib_device *ieee, u8 mcs_rate) · line 90
Quoted 5 lines
drivers/staging/rtl8192e/rtl819x_HTProc.c +1
-1@@ -87,36 +87,36 @@ static u16 ht_mcs_to_data_rate(struct rtllib_device *ieee, u8 mcs_rate) {struct rt_hi_throughput *ht_info = ieee->ht_info; -u8 is40MHz = (ht_info->cur_bw_40mhz) ?1 :0 ; +u8 is_40mhz = (ht_info->cur_bw_40mhz) ?1 :0 ;This should be
is_40MHz. It's metric. M means Mega. m means milli.
Quoted 8 lines
Quoted 8 lines
Quoted 2 lines
regards,
dan carpenter--
Okay, stupid me didin't give it to much thought that way, ...wow there's more that way then just mine
Good catch!
Regards,
Gary
--
There's only mine that I can find, I'll fix them up and resubmit them.
Thanks for your insight.
Regards,
Gary
Signature · 1 line
Sent with my mu4e on Void GNU/Linux.
Re: [PATCH 1/5] staging: rtl8192e: rename variable is40MHz
Quoted 10 lines · Gary Rookard
Quoted 10 lines
Quoted 10 lines
Quoted 4 lines
This should be
is_40MHz. It's metric. M means Mega. m means milli.regards,
dan carpenter--
Okay, stupid me didin't give it to much thought that way, ...wow there's more that way then just mine
Good catch!
Regards,
Gary
Quoted 4 lines
--
There's only mine that I can find, I'll fix them up and resubmit them.
Thanks for this and for looking at the surrounding code as well.
regards,
dan carpenter
PATCH 2/5 staging: rtl8192e: rename variable isShortGI
In reply to Gary RookardCoding style issue, checkpatch Avoid CamelCase,
rename it. isShortGI -> is_short_gi
--- drivers/staging/rtl8192e/rtl819x_HTProc.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-)
drivers/staging/rtl8192e/rtl819x_HTProc.c +8 -8
@@ -88,10 +88,10 @@ static u16 ht_mcs_to_data_rate(struct rtllib_device *ieee, u8 mcs_rate)struct rt_hi_throughput *ht_info = ieee->ht_info;u8 is_40mhz = (ht_info->cur_bw_40mhz) ?1 :0 ; -u8 isShortGI = (ht_info->cur_bw_40mhz) ? +u8 is_short_gi = (ht_info->cur_bw_40mhz) ? ((ht_info->cur_short_gi_40mhz) ?1 :0 ) : ((ht_info->cur_short_gi_20mhz) ?1 :0 ); -return MCS_DATA_RATE [is_40mhz][isShortGI][(mcs_rate &0x7f )]; +return MCS_DATA_RATE [is_40mhz][is_short_gi][(mcs_rate &0x7f )]; }u16 tx_count_to_data_rate (struct rtllib_device *ieee,u8 data_rate)
@@ -99,24 +99,24 @@ u16 tx_count_to_data_rate(struct rtllib_device *ieee, u8 data_rate)u16 cck_of_dm_rate[12 ] = {0x02 ,0x04 ,0x0b ,0x16 ,0x0c ,0x12 ,0x18 ,0x24 ,0x30 ,0x48 ,0x60 ,0x6c };u8 is_40mhz =0 ; -u8 isShortGI =0 ; +u8 is_short_gi =0 ;if (data_rate <12 )return cck_of_dm_rate[data_rate];if (data_rate >=0x10 && data_rate <=0x1f ) { is_40mhz =0 ; - isShortGI =0 ; + is_short_gi =0 ; }else if (data_rate >=0x20 && data_rate <=0x2f ) { is_40mhz =1 ; - isShortGI =0 ; + is_short_gi =0 ; }else if (data_rate >=0x30 && data_rate <=0x3f ) { is_40mhz =0 ; - isShortGI =1 ; + is_short_gi =1 ; }else if (data_rate >=0x40 && data_rate <=0x4f ) { is_40mhz =1 ; - isShortGI =1 ; + is_short_gi =1 ; } -return MCS_DATA_RATE [is_40mhz][isShortGI][data_rate &0xf ]; +return MCS_DATA_RATE [is_40mhz][is_short_gi][data_rate &0xf ]; }bool is_ht_half_nmode_aps (struct rtllib_device *ieee)
Signature · 1 line
2.43.0
PATCH 3/5 staging: rtl8192e: rename variable retValue
In reply to Gary RookardCoding style issue, checkpatch Avoid CamelCase,
rename it. retValue -> ret_value
--- drivers/staging/rtl8192e/rtl819x_HTProc.c | 24 +++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-)
drivers/staging/rtl8192e/rtl819x_HTProc.c +12 -12
@@ -121,7 +121,7 @@ u16 tx_count_to_data_rate(struct rtllib_device *ieee, u8 data_rate)bool is_ht_half_nmode_aps (struct rtllib_device *ieee) { -bool retValue = false; +bool ret_value = false;struct rtllib_network *net = &ieee->current_network; if ((memcmp(net->bssid, BELKINF5D8233V1_RALINK, 3) == 0) ||
@@ -130,18 +130,18 @@ bool is_ht_half_nmode_aps(struct rtllib_device *ieee) (memcmp(net->bssid, EDIMAX_RALINK, 3) == 0) || (memcmp(net->bssid, AIRLINK_RALINK, 3) == 0) || (net->ralink_cap_exist)) - retValue = true; + ret_value = true; else if (!memcmp(net->bssid, UNKNOWN_BORADCOM, 3) || !memcmp(net->bssid, LINKSYSWRT330_LINKSYSWRT300_BROADCOM, 3) || !memcmp(net->bssid, LINKSYSWRT350_LINKSYSWRT150_BROADCOM, 3) || (net->broadcom_cap_exist)) - retValue = true; + ret_value = true; else if (net->bssht.bd_rt2rt_aggregation) - retValue = true; + ret_value = true; else - retValue = false; + ret_value = false; -return retValue; +return ret_value; }static void ht_iot_peer_determine (struct rtllib_device *ieee)
@@ -190,21 +190,21 @@ static void ht_iot_peer_determine(struct rtllib_device *ieee)static u8 ht_iot_act_is_mgnt_use_cck_6m (struct rtllib_device *ieee,struct rtllib_network *network) { -u8 retValue =0 ; +u8 ret_value =0 ;if (ieee->ht_info->iot_peer ==HT_IOT_PEER_BROADCOM ) - retValue =1 ; + ret_value =1 ; -return retValue; +return ret_value; }static u8 ht_iot_act_is_ccd_fsync (struct rtllib_device *ieee) { -u8 retValue =0 ; +u8 ret_value =0 ;if (ieee->ht_info->iot_peer ==HT_IOT_PEER_BROADCOM ) - retValue =1 ; -return retValue; + ret_value =1 ; +return ret_value; }static void ht_iot_act_determine_ra_func (struct rtllib_device *ieee,bool bPeerRx2ss)
Signature · 1 line
2.43.0
PATCH 4/5 staging: rtl8192e: rename variable EWC11NHTCap
In reply to Gary RookardCoding style issue, checkpatch Avoid CamelCase,
rename it. EWC11NHTCap -> ewc_11n_ht_cap
--- drivers/staging/rtl8192e/rtl819x_HTProc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/staging/rtl8192e/rtl819x_HTProc.c +2 -2
@@ -241,9 +241,9 @@ void ht_construct_capability_element(struct rtllib_device *ieee, u8 *pos_ht_cap,memset (pos_ht_cap,0 , *len);if ((assoc) && (ht->peer_ht_spec_ver ==HT_SPEC_VER_EWC )) { -static const u8 EWC11NHTCap[] = {0x00 ,0x90 ,0x4c ,0x33 }; +static const u8 ewc_11n_ht_cap[] = {0x00 ,0x90 ,0x4c ,0x33 }; -memcpy (pos_ht_cap, EWC11NHTCap,sizeof (EWC11NHTCap)); +memcpy (pos_ht_cap, ewc_11n_ht_cap,sizeof (ewc_11n_ht_cap)); cap_ele = (struct ht_capab_ele *)&pos_ht_cap[4 ]; *len =30 +2 ; }else {
Signature · 1 line
2.43.0
PATCH 5/5 staging: rtl8192e: rename variable AdvCoding
In reply to Gary RookardCoding style issue, checkpatch Avoid CamelCase,
rename it. AdvCoding -> adv_coding
--- drivers/staging/rtl8192e/rtl819x_HT.h | 2 +- drivers/staging/rtl8192e/rtl819x_HTProc.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
drivers/staging/rtl8192e/rtl819x_HT.h +1 -1
@@ -24,7 +24,7 @@ enum ht_extchnl_offset { };struct ht_capab_ele { -u8 AdvCoding:1 ; +u8 adv_coding:1 ;u8 ChlWidth:1 ;u8 MimoPwrSave:2 ;u8 GreenField:1 ;
drivers/staging/rtl8192e/rtl819x_HTProc.c +1 -1
@@ -251,7 +251,7 @@ void ht_construct_capability_element(struct rtllib_device *ieee, u8 *pos_ht_cap, *len =26 +2 ; } - cap_ele->AdvCoding =0 ; + cap_ele->adv_coding =0 ;if (ieee->GetHalfNmodeSupportByAPsHandler (ieee->dev)) cap_ele->ChlWidth =0 ;else
Signature · 1 line
2.43.0
Quoted 20 lines · Gary Rookard
Hi,
This patch series renames (5) different variables with the checkpatch coding style issue, Avoid CamelCase.
Patch 1/5) rename variable is40MHz
Patch 2/5) rename variable isShortGI
Patch 3/5) rename variable retValue
Patch 4/5) rename variable EWC11NHTCap
Patch 5/5) rename variable AdvCodingSigned-off-by Gary Rookard <[email protected]>Gary Rookard (5):
staging: rtl8192e: rename variable is40MHz
staging: rtl8192e: rename variable isShortGI
staging: rtl8192e: rename variable retValue
staging: rtl8192e: rename variable EWC11NHTCap
staging: rtl8192e: rename variable AdvCoding
Quoted 4 lines
drivers/staging/rtl8192e/rtl819x_HT.h | 2 +- drivers/staging/rtl8192e/rtl819x_HTProc.c | 58 +++++++++++------------ 2 files changed, 30 insertions(+), 30 deletions(-)
Can be applied on top of other patches send in.
Is working fine on hardware.
Bye Philipp