2023-11-23 14:44:07

by Gary Rookard

[permalink] [raw]
Subject: [PATCH v3 0/5] staging: rtl8192e: renaming 5 different variables patch series

Hi,

This patch series renames (5) different variables from Pascal/CamelCase to
Snake case.

Patch 1/5) renamed variable HTMcsToDataRate
Patch 2/5) renamed variable TxCountToDataRate
Patch 3/5) renamed variable IsHtHalfNmodeAps
Patch 4/5) renamed variable HTIOTPeerDetermine
Patch 5/5) renamed variable HTIOTActIsMgntUseCCK6M

Linux kernel coding style (cleanup), checkpatch Avoid CamelCase.
Driver/module rtl8192e compiles.

Regards,
Gary

---
v3: Corrected versioning from v1 -> v3, includes change history.
v2: v2 was skipped over..v3 corrects this.
v1: Style and compile issues, asked to redo.

Gary Rookard (5):
staging: rtl8192e; renamed variable HTMcsToDataRate
staging: rtl8192e: renamed variable TXCountToDataRate
staging: rtl8192e: renamed variable IsHTHalfNmodeAPs
staging: rtl8192e: renamed variable HTIOTPeerDetermine
staging: rtl8192e: renamed variable HTIOTActIsMgntUseCCK6M

drivers/staging/rtl8192e/rtl819x_HTProc.c | 18 +++++++++---------
drivers/staging/rtl8192e/rtllib.h | 4 ++--
drivers/staging/rtl8192e/rtllib_softmac.c | 2 +-
drivers/staging/rtl8192e/rtllib_softmac_wx.c | 2 +-
4 files changed, 13 insertions(+), 13 deletions(-)

--
2.41.0



2023-11-23 14:44:11

by Gary Rookard

[permalink] [raw]
Subject: [PATCH v3 1/5] staging: rtl8192e: renamed variable HTMcsToDataRate

Renamed variable from Pascal/CamelCase to Snake case the variable
HTMcsToDataRate.
HTMcsToDataRate -> ht_mcs_to_data_rate

Linux Kernel coding style (cleanup), checkpatch Avoid CamelCase.
Driver/module rtl8192e compiles.

Signed-off-by: Gary Rookard <[email protected]>
---
v3: Corrected versioning from v1 -> v3, includes change history.
v2: v2 was skipped over..v3 corrects this.
v1: Style and compile issues, asked to redo.

drivers/staging/rtl8192e/rtl819x_HTProc.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/rtl8192e/rtl819x_HTProc.c b/drivers/staging/rtl8192e/rtl819x_HTProc.c
index e607bccc079a..280e335cbb6d 100644
--- a/drivers/staging/rtl8192e/rtl819x_HTProc.c
+++ b/drivers/staging/rtl8192e/rtl819x_HTProc.c
@@ -103,7 +103,7 @@ void ht_update_default_setting(struct rtllib_device *ieee)
ht_info->rx_reorder_pending_time = 30;
}

-static u16 HTMcsToDataRate(struct rtllib_device *ieee, u8 nMcsRate)
+static u16 ht_mcs_to_data_rate(struct rtllib_device *ieee, u8 nMcsRate)
{
struct rt_hi_throughput *ht_info = ieee->ht_info;

@@ -422,8 +422,8 @@ u8 HTGetHighestMCSRate(struct rtllib_device *ieee, u8 *pMCSRateSet,
bitMap = availableMcsRate[i];
for (j = 0; j < 8; j++) {
if ((bitMap % 2) != 0) {
- if (HTMcsToDataRate(ieee, (8 * i + j)) >
- HTMcsToDataRate(ieee, mcsRate))
+ if (ht_mcs_to_data_rate(ieee, (8 * i + j)) >
+ ht_mcs_to_data_rate(ieee, mcsRate))
mcsRate = 8 * i + j;
}
bitMap >>= 1;
--
2.41.0

2023-11-23 14:44:27

by Gary Rookard

[permalink] [raw]
Subject: [PATCH v3 2/5] staging: rtl8192e: renamed variable TXCountToDataRate

Renamed from Pascal/CamelCase to Snake case the variable
TXCountToDataRate.
TXCountToDataRate -> tx_count_to_data_rate

Linux kernel coding style (cleanup), checkpatch Avoid CamelCase.
Driver/module rtl8192e compiles.

Signed-off-by: Gary Rookard <[email protected]>
---
v3: Corrected versioning from v1 -> v3, includes change history.
v2: v2 was skipped over..v3 corrects this.
v1 Style and compile issues, asked to redo.

drivers/staging/rtl8192e/rtl819x_HTProc.c | 2 +-
drivers/staging/rtl8192e/rtllib.h | 2 +-
drivers/staging/rtl8192e/rtllib_softmac_wx.c | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/rtl8192e/rtl819x_HTProc.c b/drivers/staging/rtl8192e/rtl819x_HTProc.c
index 280e335cbb6d..fb8294f31a60 100644
--- a/drivers/staging/rtl8192e/rtl819x_HTProc.c
+++ b/drivers/staging/rtl8192e/rtl819x_HTProc.c
@@ -114,7 +114,7 @@ static u16 ht_mcs_to_data_rate(struct rtllib_device *ieee, u8 nMcsRate)
return MCS_DATA_RATE[is40MHz][isShortGI][(nMcsRate & 0x7f)];
}

-u16 TxCountToDataRate(struct rtllib_device *ieee, u8 nDataRate)
+u16 tx_count_to_data_rate(struct rtllib_device *ieee, u8 nDataRate)
{
u16 CCKOFDMRate[12] = {0x02, 0x04, 0x0b, 0x16, 0x0c, 0x12, 0x18,
0x24, 0x30, 0x48, 0x60, 0x6c};
diff --git a/drivers/staging/rtl8192e/rtllib.h b/drivers/staging/rtl8192e/rtllib.h
index d2cf3cfaaaba..0226a69f40c3 100644
--- a/drivers/staging/rtl8192e/rtllib.h
+++ b/drivers/staging/rtl8192e/rtllib.h
@@ -1783,7 +1783,7 @@ extern u16 MCS_DATA_RATE[2][2][77];
u8 HTCCheck(struct rtllib_device *ieee, u8 *pFrame);
void HTResetIOTSetting(struct rt_hi_throughput *ht_info);
bool IsHTHalfNmodeAPs(struct rtllib_device *ieee);
-u16 TxCountToDataRate(struct rtllib_device *ieee, u8 nDataRate);
+u16 tx_count_to_data_rate(struct rtllib_device *ieee, u8 nDataRate);
int rtllib_rx_ADDBAReq(struct rtllib_device *ieee, struct sk_buff *skb);
int rtllib_rx_ADDBARsp(struct rtllib_device *ieee, struct sk_buff *skb);
int rtllib_rx_DELBA(struct rtllib_device *ieee, struct sk_buff *skb);
diff --git a/drivers/staging/rtl8192e/rtllib_softmac_wx.c b/drivers/staging/rtl8192e/rtllib_softmac_wx.c
index f32584291704..28aba1d610f7 100644
--- a/drivers/staging/rtl8192e/rtllib_softmac_wx.c
+++ b/drivers/staging/rtl8192e/rtllib_softmac_wx.c
@@ -208,7 +208,7 @@ int rtllib_wx_get_rate(struct rtllib_device *ieee,
{
u32 tmp_rate;

- tmp_rate = TxCountToDataRate(ieee,
+ tmp_rate = tx_count_to_data_rate(ieee,
ieee->softmac_stats.CurrentShowTxate);
wrqu->bitrate.value = tmp_rate * 500000;

--
2.41.0

2023-11-23 14:44:33

by Gary Rookard

[permalink] [raw]
Subject: [PATCH v3 3/5] staging: rtl8192e: renamed variable IsHTHalfNmodeAPs

Renamed from Pascal/CamelCase to Snake case the variable
IsHTHalfNmodeAPs.
ISHTHalfNmodeAPs -> is_ht_half_nmode_aps

Linux kernel coding style (cleanup), checkpatch Avoid CamelCase.
Driver/module rtl8192e compiles.

Signed-off-by: Gary Rookard <[email protected]>
---
v3: Corrected versioning from v1 -> v3, includes change history.
v2: v2 was skipped over..v3 corrects this.
v1: Style and compile issues, asked to redo.

drivers/staging/rtl8192e/rtl819x_HTProc.c | 2 +-
drivers/staging/rtl8192e/rtllib.h | 2 +-
drivers/staging/rtl8192e/rtllib_softmac.c | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/rtl8192e/rtl819x_HTProc.c b/drivers/staging/rtl8192e/rtl819x_HTProc.c
index fb8294f31a60..0993263c13d3 100644
--- a/drivers/staging/rtl8192e/rtl819x_HTProc.c
+++ b/drivers/staging/rtl8192e/rtl819x_HTProc.c
@@ -139,7 +139,7 @@ u16 tx_count_to_data_rate(struct rtllib_device *ieee, u8 nDataRate)
return MCS_DATA_RATE[is40MHz][isShortGI][nDataRate & 0xf];
}

-bool IsHTHalfNmodeAPs(struct rtllib_device *ieee)
+bool is_ht_half_nmode_aps(struct rtllib_device *ieee)
{
bool retValue = false;
struct rtllib_network *net = &ieee->current_network;
diff --git a/drivers/staging/rtl8192e/rtllib.h b/drivers/staging/rtl8192e/rtllib.h
index 0226a69f40c3..6b549629087b 100644
--- a/drivers/staging/rtl8192e/rtllib.h
+++ b/drivers/staging/rtl8192e/rtllib.h
@@ -1782,7 +1782,7 @@ extern u8 MCS_FILTER_ALL[];
extern u16 MCS_DATA_RATE[2][2][77];
u8 HTCCheck(struct rtllib_device *ieee, u8 *pFrame);
void HTResetIOTSetting(struct rt_hi_throughput *ht_info);
-bool IsHTHalfNmodeAPs(struct rtllib_device *ieee);
+bool is_ht_half_nmode_aps(struct rtllib_device *ieee);
u16 tx_count_to_data_rate(struct rtllib_device *ieee, u8 nDataRate);
int rtllib_rx_ADDBAReq(struct rtllib_device *ieee, struct sk_buff *skb);
int rtllib_rx_ADDBARsp(struct rtllib_device *ieee, struct sk_buff *skb);
diff --git a/drivers/staging/rtl8192e/rtllib_softmac.c b/drivers/staging/rtl8192e/rtllib_softmac.c
index 42d652fe8601..89bc38774fa7 100644
--- a/drivers/staging/rtl8192e/rtllib_softmac.c
+++ b/drivers/staging/rtl8192e/rtllib_softmac.c
@@ -1872,7 +1872,7 @@ static void rtllib_rx_auth_resp(struct rtllib_device *ieee, struct sk_buff *skb)
ieee->softmac_stats.rx_auth_rs_ok++;
if (!(ieee->ht_info->iot_action & HT_IOT_ACT_PURE_N_MODE)) {
if (!ieee->GetNmodeSupportBySecCfg(ieee->dev)) {
- if (IsHTHalfNmodeAPs(ieee)) {
+ if (is_ht_half_nmode_aps(ieee)) {
bSupportNmode = true;
bHalfSupportNmode = true;
} else {
--
2.41.0

2023-11-23 14:44:37

by Gary Rookard

[permalink] [raw]
Subject: [PATCH v3 4/5] staging: rtl8192e: renamed variable HTIOTPeerDetermine

Renamed from Pascal/CamelCase to Snake case the variable
HTIOTPeerDetermine.
HTIOTPeerDetermine -> ht_iot_peer_determine

Linux kernel coding style (cleanup), checkpatch Avoid CamelCase.
Driver/module rtl8192e compiles.

Signed-off-by: Gary Rookard <[email protected]>
---
v3: Corrected versioning from v1 -> v3, includes change history.
v2: v2 was skipped over..v3 corrects this.
v1: Style and compile issues, asked to redo.

drivers/staging/rtl8192e/rtl819x_HTProc.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/rtl8192e/rtl819x_HTProc.c b/drivers/staging/rtl8192e/rtl819x_HTProc.c
index 0993263c13d3..0873c19ca051 100644
--- a/drivers/staging/rtl8192e/rtl819x_HTProc.c
+++ b/drivers/staging/rtl8192e/rtl819x_HTProc.c
@@ -164,7 +164,7 @@ bool is_ht_half_nmode_aps(struct rtllib_device *ieee)
return retValue;
}

-static void HTIOTPeerDetermine(struct rtllib_device *ieee)
+static void ht_iot_peer_determine(struct rtllib_device *ieee)
{
struct rt_hi_throughput *ht_info = ieee->ht_info;
struct rtllib_network *net = &ieee->current_network;
@@ -672,7 +672,7 @@ void HTResetSelfAndSavePeerSetting(struct rtllib_device *ieee,
ht_info->RT2RT_HT_Mode = (enum rt_ht_capability)0;
}

- HTIOTPeerDetermine(ieee);
+ ht_iot_peer_determine(ieee);

ht_info->iot_action = 0;
bIOTAction = HTIOTActIsMgntUseCCK6M(ieee, pNetwork);
--
2.41.0

2023-11-23 14:45:31

by Gary Rookard

[permalink] [raw]
Subject: [PATCH v3 5/5] staging: rtl8192e: renamed variable HTIOTActIsMgntUseCCK6M

Renamed from Pascal/CamelCase to Snake case the variable
HTIOTActIsMgntUseCCK6M.
HTIOTActIsMgntUseCCK6M -> ht_iot_act_is_mgnt_use_cck_6m

Linux kernel coding style (cleanup), checkpatch Avoid CamelCase.
Driver/module rtl8192e compiles.

Signed-off-by: Gary Rookard <[email protected]>
---
v3: Corrected versioning fron v1 -> v3, includes change history.
v2: v2 was Skipped over..v3 corrects this.
v1: Style and compile issues, asked to redo.

drivers/staging/rtl8192e/rtl819x_HTProc.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/rtl8192e/rtl819x_HTProc.c b/drivers/staging/rtl8192e/rtl819x_HTProc.c
index 0873c19ca051..f43249fd78d7 100644
--- a/drivers/staging/rtl8192e/rtl819x_HTProc.c
+++ b/drivers/staging/rtl8192e/rtl819x_HTProc.c
@@ -207,7 +207,7 @@ static void ht_iot_peer_determine(struct rtllib_device *ieee)
netdev_dbg(ieee->dev, "IOTPEER: %x\n", ht_info->IOTPeer);
}

-static u8 HTIOTActIsMgntUseCCK6M(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;
@@ -675,7 +675,7 @@ void HTResetSelfAndSavePeerSetting(struct rtllib_device *ieee,
ht_iot_peer_determine(ieee);

ht_info->iot_action = 0;
- bIOTAction = HTIOTActIsMgntUseCCK6M(ieee, pNetwork);
+ bIOTAction = ht_iot_act_is_mgnt_use_cck_6m(ieee, pNetwork);
if (bIOTAction)
ht_info->iot_action |= HT_IOT_ACT_MGNT_USE_CCK_6M;
bIOTAction = HTIOTActIsCCDFsync(ieee);
--
2.41.0

2023-11-23 20:56:35

by Philipp Hortmann

[permalink] [raw]
Subject: Re: [PATCH v3 2/5] staging: rtl8192e: renamed variable TXCountToDataRate

On 11/23/23 15:43, Gary Rookard wrote:
> Renamed from Pascal/CamelCase to Snake case the variable
> TXCountToDataRate.
> TXCountToDataRate -> tx_count_to_data_rate
>
> Linux kernel coding style (cleanup), checkpatch Avoid CamelCase.
> Driver/module rtl8192e compiles.
>
> Signed-off-by: Gary Rookard <[email protected]>
> ---
> v3: Corrected versioning from v1 -> v3, includes change history.
> v2: v2 was skipped over..v3 corrects this.
> v1 Style and compile issues, asked to redo.
>
> drivers/staging/rtl8192e/rtl819x_HTProc.c | 2 +-
> drivers/staging/rtl8192e/rtllib.h | 2 +-
> drivers/staging/rtl8192e/rtllib_softmac_wx.c | 2 +-
> 3 files changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/staging/rtl8192e/rtl819x_HTProc.c b/drivers/staging/rtl8192e/rtl819x_HTProc.c
> index 280e335cbb6d..fb8294f31a60 100644
> --- a/drivers/staging/rtl8192e/rtl819x_HTProc.c
> +++ b/drivers/staging/rtl8192e/rtl819x_HTProc.c
> @@ -114,7 +114,7 @@ static u16 ht_mcs_to_data_rate(struct rtllib_device *ieee, u8 nMcsRate)
> return MCS_DATA_RATE[is40MHz][isShortGI][(nMcsRate & 0x7f)];
> }
>
> -u16 TxCountToDataRate(struct rtllib_device *ieee, u8 nDataRate)
> +u16 tx_count_to_data_rate(struct rtllib_device *ieee, u8 nDataRate)
> {
> u16 CCKOFDMRate[12] = {0x02, 0x04, 0x0b, 0x16, 0x0c, 0x12, 0x18,
> 0x24, 0x30, 0x48, 0x60, 0x6c};
> diff --git a/drivers/staging/rtl8192e/rtllib.h b/drivers/staging/rtl8192e/rtllib.h
> index d2cf3cfaaaba..0226a69f40c3 100644
> --- a/drivers/staging/rtl8192e/rtllib.h
> +++ b/drivers/staging/rtl8192e/rtllib.h
> @@ -1783,7 +1783,7 @@ extern u16 MCS_DATA_RATE[2][2][77];
> u8 HTCCheck(struct rtllib_device *ieee, u8 *pFrame);
> void HTResetIOTSetting(struct rt_hi_throughput *ht_info);
> bool IsHTHalfNmodeAPs(struct rtllib_device *ieee);
> -u16 TxCountToDataRate(struct rtllib_device *ieee, u8 nDataRate);
> +u16 tx_count_to_data_rate(struct rtllib_device *ieee, u8 nDataRate);
> int rtllib_rx_ADDBAReq(struct rtllib_device *ieee, struct sk_buff *skb);
> int rtllib_rx_ADDBARsp(struct rtllib_device *ieee, struct sk_buff *skb);
> int rtllib_rx_DELBA(struct rtllib_device *ieee, struct sk_buff *skb);
> diff --git a/drivers/staging/rtl8192e/rtllib_softmac_wx.c b/drivers/staging/rtl8192e/rtllib_softmac_wx.c
> index f32584291704..28aba1d610f7 100644
> --- a/drivers/staging/rtl8192e/rtllib_softmac_wx.c
> +++ b/drivers/staging/rtl8192e/rtllib_softmac_wx.c
> @@ -208,7 +208,7 @@ int rtllib_wx_get_rate(struct rtllib_device *ieee,
> {
> u32 tmp_rate;
>
> - tmp_rate = TxCountToDataRate(ieee,
> + tmp_rate = tx_count_to_data_rate(ieee,
> ieee->softmac_stats.CurrentShowTxate);
> wrqu->bitrate.value = tmp_rate * 500000;
>

CHECK: Alignment should match open parenthesis
#61: FILE: drivers/staging/rtl8192e/rtllib_softmac_wx.c:212:
+ tmp_rate = tx_count_to_data_rate(ieee,
ieee->softmac_stats.CurrentShowTxate);

2023-11-23 21:05:54

by Philipp Hortmann

[permalink] [raw]
Subject: Re: [PATCH v3 5/5] staging: rtl8192e: renamed variable HTIOTActIsMgntUseCCK6M

On 11/23/23 15:43, Gary Rookard wrote:
> Renamed from Pascal/CamelCase to Snake case the variable
> HTIOTActIsMgntUseCCK6M.
> HTIOTActIsMgntUseCCK6M -> ht_iot_act_is_mgnt_use_cck_6m
>
> Linux kernel coding style (cleanup), checkpatch Avoid CamelCase.
> Driver/module rtl8192e compiles.
>
> Signed-off-by: Gary Rookard <[email protected]>
> ---
> v3: Corrected versioning fron v1 -> v3, includes change history.
> v2: v2 was Skipped over..v3 corrects this.
> v1: Style and compile issues, asked to redo.
>
> drivers/staging/rtl8192e/rtl819x_HTProc.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/staging/rtl8192e/rtl819x_HTProc.c b/drivers/staging/rtl8192e/rtl819x_HTProc.c
> index 0873c19ca051..f43249fd78d7 100644
> --- a/drivers/staging/rtl8192e/rtl819x_HTProc.c
> +++ b/drivers/staging/rtl8192e/rtl819x_HTProc.c
> @@ -207,7 +207,7 @@ static void ht_iot_peer_determine(struct rtllib_device *ieee)
> netdev_dbg(ieee->dev, "IOTPEER: %x\n", ht_info->IOTPeer);
> }
>
> -static u8 HTIOTActIsMgntUseCCK6M(struct rtllib_device *ieee,
> +static u8 ht_iot_act_is_mgnt_use_cck_6m(struct rtllib_device *ieee,
> struct rtllib_network *network)

CHECK: Alignment should match open parenthesis
#33: FILE: drivers/staging/rtl8192e/rtl819x_HTProc.c:211:
+static u8 ht_iot_act_is_mgnt_use_cck_6m(struct rtllib_device *ieee,
struct rtllib_network *network)

Please use checkpatch on your patches. Alignment issues can be fixed up
by you. CamelCase oft not when the variable did not change within your
patch.

> {
> u8 retValue = 0;
> @@ -675,7 +675,7 @@ void HTResetSelfAndSavePeerSetting(struct rtllib_device *ieee,
> ht_iot_peer_determine(ieee);
>
> ht_info->iot_action = 0;
> - bIOTAction = HTIOTActIsMgntUseCCK6M(ieee, pNetwork);
> + bIOTAction = ht_iot_act_is_mgnt_use_cck_6m(ieee, pNetwork);
> if (bIOTAction)
> ht_info->iot_action |= HT_IOT_ACT_MGNT_USE_CCK_6M;
> bIOTAction = HTIOTActIsCCDFsync(ieee);

2023-11-23 21:12:09

by Philipp Hortmann

[permalink] [raw]
Subject: Re: [PATCH v3 0/5] staging: rtl8192e: renaming 5 different variables patch series

On 11/23/23 15:43, Gary Rookard wrote:
> Hi,
>
> This patch series renames (5) different variables from Pascal/CamelCase to
> Snake case.
>
> Patch 1/5) renamed variable HTMcsToDataRate
> Patch 2/5) renamed variable TxCountToDataRate
> Patch 3/5) renamed variable IsHtHalfNmodeAps
> Patch 4/5) renamed variable HTIOTPeerDetermine
> Patch 5/5) renamed variable HTIOTActIsMgntUseCCK6M
>
> Linux kernel coding style (cleanup), checkpatch Avoid CamelCase.
> Driver/module rtl8192e compiles.
>
> Regards,
> Gary
>
> ---
> v3: Corrected versioning from v1 -> v3, includes change history.
> v2: v2 was skipped over..v3 corrects this.
> v1: Style and compile issues, asked to redo.
>
> Gary Rookard (5):
> staging: rtl8192e; renamed variable HTMcsToDataRate
> staging: rtl8192e: renamed variable TXCountToDataRate
> staging: rtl8192e: renamed variable IsHTHalfNmodeAPs
> staging: rtl8192e: renamed variable HTIOTPeerDetermine
> staging: rtl8192e: renamed variable HTIOTActIsMgntUseCCK6M
>
> drivers/staging/rtl8192e/rtl819x_HTProc.c | 18 +++++++++---------
> drivers/staging/rtl8192e/rtllib.h | 4 ++--
> drivers/staging/rtl8192e/rtllib_softmac.c | 2 +-
> drivers/staging/rtl8192e/rtllib_softmac_wx.c | 2 +-
> 4 files changed, 13 insertions(+), 13 deletions(-)
>

So beside the two
CHECK: Alignment should match open parenthesis issues everything else is OK.

Tested-by: Philipp Hortmann <[email protected]>

2023-11-23 23:34:48

by Gary Rookard

[permalink] [raw]
Subject: Re: [PATCH v3 2/5] staging: rtl8192e: renamed variable TXCountToDataRate


Philipp Hortmann <[email protected]> writes:

> On 11/23/23 15:43, Gary Rookard wrote:
>> Renamed from Pascal/CamelCase to Snake case the variable
>> TXCountToDataRate.
>> TXCountToDataRate -> tx_count_to_data_rate
>> Linux kernel coding style (cleanup), checkpatch Avoid CamelCase.
>> Driver/module rtl8192e compiles.
>> Signed-off-by: Gary Rookard <[email protected]>
>> ---
>> v3: Corrected versioning from v1 -> v3, includes change history.
>> v2: v2 was skipped over..v3 corrects this.
>> v1 Style and compile issues, asked to redo.
>> drivers/staging/rtl8192e/rtl819x_HTProc.c | 2 +-
>> drivers/staging/rtl8192e/rtllib.h | 2 +-
>> drivers/staging/rtl8192e/rtllib_softmac_wx.c | 2 +-
>> 3 files changed, 3 insertions(+), 3 deletions(-)
>> diff --git a/drivers/staging/rtl8192e/rtl819x_HTProc.c
>> b/drivers/staging/rtl8192e/rtl819x_HTProc.c
>> index 280e335cbb6d..fb8294f31a60 100644
>> --- a/drivers/staging/rtl8192e/rtl819x_HTProc.c
>> +++ b/drivers/staging/rtl8192e/rtl819x_HTProc.c
>> @@ -114,7 +114,7 @@ static u16 ht_mcs_to_data_rate(struct rtllib_device *ieee, u8 nMcsRate)
>> return MCS_DATA_RATE[is40MHz][isShortGI][(nMcsRate & 0x7f)];
>> }
>> -u16 TxCountToDataRate(struct rtllib_device *ieee, u8 nDataRate)
>> +u16 tx_count_to_data_rate(struct rtllib_device *ieee, u8 nDataRate)
>> {
>> u16 CCKOFDMRate[12] = {0x02, 0x04, 0x0b, 0x16, 0x0c, 0x12, 0x18,
>> 0x24, 0x30, 0x48, 0x60, 0x6c};
>> diff --git a/drivers/staging/rtl8192e/rtllib.h b/drivers/staging/rtl8192e/rtllib.h
>> index d2cf3cfaaaba..0226a69f40c3 100644
>> --- a/drivers/staging/rtl8192e/rtllib.h
>> +++ b/drivers/staging/rtl8192e/rtllib.h
>> @@ -1783,7 +1783,7 @@ extern u16 MCS_DATA_RATE[2][2][77];
>> u8 HTCCheck(struct rtllib_device *ieee, u8 *pFrame);
>> void HTResetIOTSetting(struct rt_hi_throughput *ht_info);
>> bool IsHTHalfNmodeAPs(struct rtllib_device *ieee);
>> -u16 TxCountToDataRate(struct rtllib_device *ieee, u8 nDataRate);
>> +u16 tx_count_to_data_rate(struct rtllib_device *ieee, u8 nDataRate);
>> int rtllib_rx_ADDBAReq(struct rtllib_device *ieee, struct sk_buff *skb);
>> int rtllib_rx_ADDBARsp(struct rtllib_device *ieee, struct sk_buff *skb);
>> int rtllib_rx_DELBA(struct rtllib_device *ieee, struct sk_buff *skb);
>> diff --git a/drivers/staging/rtl8192e/rtllib_softmac_wx.c b/drivers/staging/rtl8192e/rtllib_softmac_wx.c
>> index f32584291704..28aba1d610f7 100644
>> --- a/drivers/staging/rtl8192e/rtllib_softmac_wx.c
>> +++ b/drivers/staging/rtl8192e/rtllib_softmac_wx.c
>> @@ -208,7 +208,7 @@ int rtllib_wx_get_rate(struct rtllib_device *ieee,
>> {
>> u32 tmp_rate;
>> - tmp_rate = TxCountToDataRate(ieee,
>> + tmp_rate = tx_count_to_data_rate(ieee,
>> ieee->softmac_stats.CurrentShowTxate);
>> wrqu->bitrate.value = tmp_rate * 500000;
>>
>
> CHECK: Alignment should match open parenthesis
> #61: FILE: drivers/staging/rtl8192e/rtllib_softmac_wx.c:212:
> + tmp_rate = tx_count_to_data_rate(ieee,
> ieee->softmac_stats.CurrentShowTxate)
Yes, I'm guilty of ignoring the addional CHECKS in my patch
diff. Cleanup only allows one type of correction per patch. They are
going to be included in a follow up patch series that I'm working on.
If this is unacceptable thinking on my part then I will stand corrected.

P.S.
Sorry, but they have been gone over with checkpatch and codespell.

Regards,
Gary


2023-11-24 11:31:26

by Greg KH

[permalink] [raw]
Subject: Re: [PATCH v3 2/5] staging: rtl8192e: renamed variable TXCountToDataRate

On Thu, Nov 23, 2023 at 09:56:04PM +0100, Philipp Hortmann wrote:
> On 11/23/23 15:43, Gary Rookard wrote:
> > Renamed from Pascal/CamelCase to Snake case the variable
> > TXCountToDataRate.
> > TXCountToDataRate -> tx_count_to_data_rate
> >
> > Linux kernel coding style (cleanup), checkpatch Avoid CamelCase.
> > Driver/module rtl8192e compiles.
> >
> > Signed-off-by: Gary Rookard <[email protected]>
> > ---
> > v3: Corrected versioning from v1 -> v3, includes change history.
> > v2: v2 was skipped over..v3 corrects this.
> > v1 Style and compile issues, asked to redo.
> >
> > drivers/staging/rtl8192e/rtl819x_HTProc.c | 2 +-
> > drivers/staging/rtl8192e/rtllib.h | 2 +-
> > drivers/staging/rtl8192e/rtllib_softmac_wx.c | 2 +-
> > 3 files changed, 3 insertions(+), 3 deletions(-)
> >
> > diff --git a/drivers/staging/rtl8192e/rtl819x_HTProc.c b/drivers/staging/rtl8192e/rtl819x_HTProc.c
> > index 280e335cbb6d..fb8294f31a60 100644
> > --- a/drivers/staging/rtl8192e/rtl819x_HTProc.c
> > +++ b/drivers/staging/rtl8192e/rtl819x_HTProc.c
> > @@ -114,7 +114,7 @@ static u16 ht_mcs_to_data_rate(struct rtllib_device *ieee, u8 nMcsRate)
> > return MCS_DATA_RATE[is40MHz][isShortGI][(nMcsRate & 0x7f)];
> > }
> > -u16 TxCountToDataRate(struct rtllib_device *ieee, u8 nDataRate)
> > +u16 tx_count_to_data_rate(struct rtllib_device *ieee, u8 nDataRate)
> > {
> > u16 CCKOFDMRate[12] = {0x02, 0x04, 0x0b, 0x16, 0x0c, 0x12, 0x18,
> > 0x24, 0x30, 0x48, 0x60, 0x6c};
> > diff --git a/drivers/staging/rtl8192e/rtllib.h b/drivers/staging/rtl8192e/rtllib.h
> > index d2cf3cfaaaba..0226a69f40c3 100644
> > --- a/drivers/staging/rtl8192e/rtllib.h
> > +++ b/drivers/staging/rtl8192e/rtllib.h
> > @@ -1783,7 +1783,7 @@ extern u16 MCS_DATA_RATE[2][2][77];
> > u8 HTCCheck(struct rtllib_device *ieee, u8 *pFrame);
> > void HTResetIOTSetting(struct rt_hi_throughput *ht_info);
> > bool IsHTHalfNmodeAPs(struct rtllib_device *ieee);
> > -u16 TxCountToDataRate(struct rtllib_device *ieee, u8 nDataRate);
> > +u16 tx_count_to_data_rate(struct rtllib_device *ieee, u8 nDataRate);
> > int rtllib_rx_ADDBAReq(struct rtllib_device *ieee, struct sk_buff *skb);
> > int rtllib_rx_ADDBARsp(struct rtllib_device *ieee, struct sk_buff *skb);
> > int rtllib_rx_DELBA(struct rtllib_device *ieee, struct sk_buff *skb);
> > diff --git a/drivers/staging/rtl8192e/rtllib_softmac_wx.c b/drivers/staging/rtl8192e/rtllib_softmac_wx.c
> > index f32584291704..28aba1d610f7 100644
> > --- a/drivers/staging/rtl8192e/rtllib_softmac_wx.c
> > +++ b/drivers/staging/rtl8192e/rtllib_softmac_wx.c
> > @@ -208,7 +208,7 @@ int rtllib_wx_get_rate(struct rtllib_device *ieee,
> > {
> > u32 tmp_rate;
> > - tmp_rate = TxCountToDataRate(ieee,
> > + tmp_rate = tx_count_to_data_rate(ieee,
> > ieee->softmac_stats.CurrentShowTxate);
> > wrqu->bitrate.value = tmp_rate * 500000;
>
> CHECK: Alignment should match open parenthesis
> #61: FILE: drivers/staging/rtl8192e/rtllib_softmac_wx.c:212:
> + tmp_rate = tx_count_to_data_rate(ieee,
> ieee->softmac_stats.CurrentShowTxate);

That's fine, it can be cleaned up in a later patch.

thanks,

greg k-h