Skip to contentSkip to conversation

staging: rtl8192e: renamed variable TxCountToDataRate, spacing, realignment

PATCH Superseded Gary Rookard 2 participants 2 messages Oct 21, 2023 Staging

v1 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 staging: rtl8192e: renamed variable TxCountToDataRate, spacing, realignment

1) Renamed from Pascal/CamelCase to Snake case the variable TxCountToDataRate, TxCountToDataRate -> tx_count_to_data_rate.

2) Made a realignment w/open parenthesis adjustment after renaming.

3) Corrected spacing.

Linux kernel coding style (cleanup),checkpatch Avoid CamelCase, checkpatch Alignment should match open parenthesis. Driver rtl8192e compiles.

---
 drivers/staging/rtl8192e/rtl819x_HTProc.c    | 2 +-
 drivers/staging/rtl8192e/rtllib.h            | 2 +-
 drivers/staging/rtl8192e/rtllib_softmac_wx.c | 4 ++--
 3 files changed, 4 insertions(+), 4 deletions(-)
drivers/staging/rtl8192e/rtl819x_HTProc.c +1 -1
index 00b21542ddc3..304f2ab0be3e 100644
@@ -114,7 +114,7 @@ static u16 HTMcsToDataRate(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};
drivers/staging/rtl8192e/rtllib.h +1 -1
index 9d141aad8cd5..5c8c7caf2c17 100644
@@ -1784,7 +1784,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);
drivers/staging/rtl8192e/rtllib_softmac_wx.c +2 -2
index f32584291704..52c9c2c873b1 100644
@@ -208,8 +208,8 @@ int rtllib_wx_get_rate(struct rtllib_device *ieee,
 {
 	u32 tmp_rate;
 
-	tmp_rate = TxCountToDataRate(ieee,
-				     ieee->softmac_stats.CurrentShowTxate);
+	tmp_rate = tx_count_to_data_rate(ieee,
+					 ieee->softmac_stats.CurrentShowTxate);
 	wrqu->bitrate.value = tmp_rate * 500000;
 
 	return 0;
Signature · 1 line
2.41.0
maintainer
#1 lore raw
Quoted 64 lines · Gary Rookard

1) Renamed from Pascal/CamelCase to Snake case the variable TxCountToDataRate, TxCountToDataRate -> tx_count_to_data_rate.

2) Made a realignment w/open parenthesis adjustment after renaming.

3) Corrected spacing.

Linux kernel coding style (cleanup),checkpatch Avoid CamelCase, checkpatch Alignment should match open parenthesis. Driver rtl8192e compiles.

---
 drivers/staging/rtl8192e/rtl819x_HTProc.c    | 2 +-
 drivers/staging/rtl8192e/rtllib.h            | 2 +-
 drivers/staging/rtl8192e/rtllib_softmac_wx.c | 4 ++--
 3 files changed, 4 insertions(+), 4 deletions(-)
drivers/staging/rtl8192e/rtl819x_HTProc.c +1 -1
index 00b21542ddc3..304f2ab0be3e 100644
@@ -114,7 +114,7 @@ static u16 HTMcsToDataRate(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};
drivers/staging/rtl8192e/rtllib.h +1 -1
index 9d141aad8cd5..5c8c7caf2c17 100644
@@ -1784,7 +1784,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);
drivers/staging/rtl8192e/rtllib_softmac_wx.c +2 -2
index f32584291704..52c9c2c873b1 100644
@@ -208,8 +208,8 @@ int rtllib_wx_get_rate(struct rtllib_device *ieee,
 {
 	u32 tmp_rate;
 
-	tmp_rate = TxCountToDataRate(ieee,
-				     ieee->softmac_stats.CurrentShowTxate);
+	tmp_rate = tx_count_to_data_rate(ieee,
+					 ieee->softmac_stats.CurrentShowTxate);
 	wrqu->bitrate.value = tmp_rate * 500000;
 
 	return 0;
Signature · 1 line
2.41.0

Hi,

This is the friendly patch-bot of Greg Kroah-Hartman. You have sent him a patch that has triggered this response. He used to manually respond to these common problems, but in order to save his sanity (he kept writing the same thing over and over, yet to different people), I was created. Hopefully you will not take offence and will fix the problem in your patch and resubmit it so that it can be accepted into the Linux kernel tree.

You are receiving this message because of the following common error(s) as indicated below:

- Your patch did many different things all at once, making it difficult to review. All Linux kernel patches need to only do one thing at a time. If you need to do multiple things (such as clean up all coding style issues in a file/driver), do it in a sequence of patches, each one doing only one thing. This will make it easier to review the patches to ensure that they are correct, and to help alleviate any merge issues that larger patches can cause.

If you wish to discuss this problem further, or you have questions about how to resolve this issue, please feel free to respond to this email and Greg will reply once he has dug out from the pending patches received from other developers.

thanks,

greg k-h's patch email bot