[PATCH 09/24] Staging: rtl8192e: Rename variable bforced_tx20Mhz

Tree Davies posted 24 patches 1 year, 8 months ago
There is a newer version of this series
[PATCH 09/24] Staging: rtl8192e: Rename variable bforced_tx20Mhz
Posted by Tree Davies 1 year, 8 months ago
Rename variable bforced_tx20Mhz to forced_tx_20mhz
to fix checkpatch warning Avoid CamelCase.

Signed-off-by: Tree Davies <tdavies@darkphysics.net>
---
 drivers/staging/rtl8192e/rtl8192e/rtl_dm.c | 8 ++++----
 drivers/staging/rtl8192e/rtllib.h          | 2 +-
 drivers/staging/rtl8192e/rtllib_tx.c       | 2 +-
 3 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_dm.c b/drivers/staging/rtl8192e/rtl8192e/rtl_dm.c
index 5392d2daf870..7d5046b58cd1 100644
--- a/drivers/staging/rtl8192e/rtl8192e/rtl_dm.c
+++ b/drivers/staging/rtl8192e/rtl8192e/rtl_dm.c
@@ -377,7 +377,7 @@ static void _rtl92e_dm_init_bandwidth_autoswitch(struct net_device *dev)
 
 	priv->rtllib->bandwidth_auto_switch.threshold_20Mhzto40Mhz = BW_AUTO_SWITCH_LOW_HIGH;
 	priv->rtllib->bandwidth_auto_switch.threshold_40Mhzto20Mhz = BW_AUTO_SWITCH_HIGH_LOW;
-	priv->rtllib->bandwidth_auto_switch.bforced_tx20Mhz = false;
+	priv->rtllib->bandwidth_auto_switch.forced_tx_20mhz = false;
 	priv->rtllib->bandwidth_auto_switch.bautoswitch_enable = false;
 }
 
@@ -388,14 +388,14 @@ static void _rtl92e_dm_bandwidth_autoswitch(struct net_device *dev)
 	if (priv->current_chnl_bw == HT_CHANNEL_WIDTH_20 ||
 	    !priv->rtllib->bandwidth_auto_switch.bautoswitch_enable)
 		return;
-	if (!priv->rtllib->bandwidth_auto_switch.bforced_tx20Mhz) {
+	if (!priv->rtllib->bandwidth_auto_switch.forced_tx_20mhz) {
 		if (priv->undecorated_smoothed_pwdb <=
 		    priv->rtllib->bandwidth_auto_switch.threshold_40Mhzto20Mhz)
-			priv->rtllib->bandwidth_auto_switch.bforced_tx20Mhz = true;
+			priv->rtllib->bandwidth_auto_switch.forced_tx_20mhz = true;
 	} else {
 		if (priv->undecorated_smoothed_pwdb >=
 		    priv->rtllib->bandwidth_auto_switch.threshold_20Mhzto40Mhz)
-			priv->rtllib->bandwidth_auto_switch.bforced_tx20Mhz = false;
+			priv->rtllib->bandwidth_auto_switch.forced_tx_20mhz = false;
 	}
 }
 
diff --git a/drivers/staging/rtl8192e/rtllib.h b/drivers/staging/rtl8192e/rtllib.h
index bd18d866ce22..d0da16a86633 100644
--- a/drivers/staging/rtl8192e/rtllib.h
+++ b/drivers/staging/rtl8192e/rtllib.h
@@ -1018,7 +1018,7 @@ struct tx_pending {
 struct bandwidth_autoswitch {
 	long threshold_20Mhzto40Mhz;
 	long	threshold_40Mhzto20Mhz;
-	bool bforced_tx20Mhz;
+	bool forced_tx_20mhz;
 	bool bautoswitch_enable;
 };
 
diff --git a/drivers/staging/rtl8192e/rtllib_tx.c b/drivers/staging/rtl8192e/rtllib_tx.c
index d376c35a5ad7..d9749d2c1668 100644
--- a/drivers/staging/rtl8192e/rtllib_tx.c
+++ b/drivers/staging/rtl8192e/rtllib_tx.c
@@ -362,7 +362,7 @@ static void rtllib_query_BandwidthMode(struct rtllib_device *ieee,
 	if ((tcb_desc->data_rate & 0x80) == 0)
 		return;
 	if (ht_info->cur_bw_40mhz && ht_info->cur_tx_bw40mhz &&
-	    !ieee->bandwidth_auto_switch.bforced_tx20Mhz)
+	    !ieee->bandwidth_auto_switch.forced_tx_20mhz)
 		tcb_desc->bPacketBW = true;
 }
 
-- 
2.30.2
Re: [PATCH 09/24] Staging: rtl8192e: Rename variable bforced_tx20Mhz
Posted by Dan Carpenter 1 year, 8 months ago
On Sun, Jun 09, 2024 at 10:44:34PM -0700, Tree Davies wrote:
> Rename variable bforced_tx20Mhz to forced_tx_20mhz
> to fix checkpatch warning Avoid CamelCase.

The correct capitalization for megahertz is MHz.  So the original is
wrong but the new name is not correct either.

regards,
dan carpenter
Re: [PATCH 09/24] Staging: rtl8192e: Rename variable bforced_tx20Mhz
Posted by <Tree Davies 1 year, 8 months ago
On Mon, Jun 10, 2024 at 09:08:03AM +0300, Dan Carpenter wrote:
> On Sun, Jun 09, 2024 at 10:44:34PM -0700, Tree Davies wrote:
> > Rename variable bforced_tx20Mhz to forced_tx_20mhz
> > to fix checkpatch warning Avoid CamelCase.
> 
> The correct capitalization for megahertz is MHz.  So the original is
> wrong but the new name is not correct either.
> 
> regards,
> dan carpenter
> 

Thanks Dan,
So... I guess just spell it out as 'forced_tx_20_megahertz' ?
Tree
Re: [PATCH 09/24] Staging: rtl8192e: Rename variable bforced_tx20Mhz
Posted by Dan Carpenter 1 year, 8 months ago
On Mon, Jun 10, 2024 at 07:15:51PM -0700, <Tree Davies wrote:
> On Mon, Jun 10, 2024 at 09:08:03AM +0300, Dan Carpenter wrote:
> > On Sun, Jun 09, 2024 at 10:44:34PM -0700, Tree Davies wrote:
> > > Rename variable bforced_tx20Mhz to forced_tx_20mhz
> > > to fix checkpatch warning Avoid CamelCase.
> > 
> > The correct capitalization for megahertz is MHz.  So the original is
> > wrong but the new name is not correct either.
> > 
> > regards,
> > dan carpenter
> > 
> 
> Thanks Dan,
> So... I guess just spell it out as 'forced_tx_20_megahertz' ?

No, just write it as "forced_tx_20MHz".  Don't bow down to checkpatch.

regards,
dan carpenter