Skip to contentSkip to conversation

staging: rtl8712: Rename variable bw_40MHz_en

PATCH In review Lautaro Javier Fernandez Pricco 2 participants 3 messages Mar 23, 2024 – Mar 24, 2024 1 message not in the archive Staging

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 staging: rtl8712: Rename variable bw_40MHz_en

The bw_40MHz_en variable triggered an 'Avoid
CamelCase' warning from checkpatch.pl. This patch addresses said warning by renaming the variable to bw_40mhz_en.

Reported by checkpatch:
CHECK: Avoid CamelCase: <bw_40MHz_en>

---
 drivers/staging/rtl8712/hal_init.c        | 2 +-
 drivers/staging/rtl8712/rtl8712_hal.h     | 2 +-
 drivers/staging/rtl8723bs/core/rtw_mlme.c | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)
drivers/staging/rtl8712/hal_init.c +1 -1
index 1148075f0cd6..efea4f97488c 100644
@@ -98,7 +98,7 @@ static void fill_fwpriv(struct _adapter *adapter, struct fw_priv *fwpriv)
 	/* todo: check if needs endian conversion */
 	fwpriv->hci_sel =  RTL8712_HCI_TYPE_72USB;
 	fwpriv->usb_ep_num = (u8)dvobj->nr_endpoint;
-	fwpriv->bw_40MHz_en = regpriv->cbw40_enable;
+	fwpriv->bw_40mhz_en = regpriv->cbw40_enable;
 	switch (regpriv->rf_config) {
 	case RTL8712_RF_1T1R:
 		fwpriv->rf_config = RTL8712_RFC_1T1R;
drivers/staging/rtl8712/rtl8712_hal.h +1 -1
index 66cc4645e2d1..3df687fce79d 100644
@@ -85,7 +85,7 @@ struct fw_priv {   /*8-bytes alignment required*/
 	unsigned char rsvd025;
 	/*--- long word 3 ----*/
 	unsigned char qos_en;    /*1: QoS enable*/
-	unsigned char bw_40MHz_en;   /*1: 40MHz BW enable*/
+	unsigned char bw_40mhz_en;   /*1: 40MHz BW enable*/
 	unsigned char AMSDU2AMPDU_en;   /*1: 4181 convert AMSDU to AMPDU,
 					 * 0: disable
 					 */
drivers/staging/rtl8723bs/core/rtw_mlme.c +1 -1
index bfb27f902753..0e5b07ad5a8f 100644
@@ -2331,7 +2331,7 @@ unsigned int rtw_restructure_ht_ie(struct adapter *padapter, u8 *in_ie, u8 *out_
 		}
 	}
 
-	/* to disable 40M Hz support while gd_bw_40MHz_en = 0 */
+	/* to disable 40 MHz support while gd_bw_40mhz_en = 0 */
 	if (channel > 14) {
 		if ((pregistrypriv->bw_mode & 0xf0) > 0)
 			cbw40_enable = 1;
Signature · 1 line
2.34.1
#1 lore raw
Quoted 3 lines · Lautaro Javier Fernandez Pricco

The bw_40MHz_en variable triggered an 'Avoid
CamelCase' warning from checkpatch.pl. This patch addresses said warning by renaming the variable to bw_40mhz_en.

Hi Lautaro Javier,
Checkpatch is wrong with this proposal. The offical abreviations for MHz, kHz, GHz, dB and so on can remain as they are. This is easier to read.

Quoted 2 lines

Reported by checkpatch:
CHECK: Avoid CamelCase: <bw_40MHz_en>

It is not required to add the name of the tool who found this. Much more important is a good description why this change makes sense... For example:
... to shorten code.
... to improve readability.

Thanks for your support.

Bye Philipp

Quoted 46 lines
---
  drivers/staging/rtl8712/hal_init.c        | 2 +-
  drivers/staging/rtl8712/rtl8712_hal.h     | 2 +-
  drivers/staging/rtl8723bs/core/rtw_mlme.c | 2 +-
  3 files changed, 3 insertions(+), 3 deletions(-)
drivers/staging/rtl8712/hal_init.c +1 -1
index 1148075f0cd6..efea4f97488c 100644
@@ -98,7 +98,7 @@ static void fill_fwpriv(struct _adapter *adapter, struct fw_priv *fwpriv)
  	/* todo: check if needs endian conversion */
  	fwpriv->hci_sel =  RTL8712_HCI_TYPE_72USB;
  	fwpriv->usb_ep_num = (u8)dvobj->nr_endpoint;
-	fwpriv->bw_40MHz_en = regpriv->cbw40_enable;
+	fwpriv->bw_40mhz_en = regpriv->cbw40_enable;
  	switch (regpriv->rf_config) {
  	case RTL8712_RF_1T1R:
  		fwpriv->rf_config = RTL8712_RFC_1T1R;
drivers/staging/rtl8712/rtl8712_hal.h +1 -1
index 66cc4645e2d1..3df687fce79d 100644
@@ -85,7 +85,7 @@ struct fw_priv {   /*8-bytes alignment required*/
  	unsigned char rsvd025;
  	/*--- long word 3 ----*/
  	unsigned char qos_en;    /*1: QoS enable*/
-	unsigned char bw_40MHz_en;   /*1: 40MHz BW enable*/
+	unsigned char bw_40mhz_en;   /*1: 40MHz BW enable*/
  	unsigned char AMSDU2AMPDU_en;   /*1: 4181 convert AMSDU to AMPDU,
  					 * 0: disable
  					 */
drivers/staging/rtl8723bs/core/rtw_mlme.c +1 -1
index bfb27f902753..0e5b07ad5a8f 100644
@@ -2331,7 +2331,7 @@ unsigned int rtw_restructure_ht_ie(struct adapter *padapter, u8 *in_ie, u8 *out_
  		}
  	}
 
-	/* to disable 40M Hz support while gd_bw_40MHz_en = 0 */
+	/* to disable 40 MHz support while gd_bw_40mhz_en = 0 */
  	if (channel > 14) {
  		if ((pregistrypriv->bw_mode & 0xf0) > 0)
  			cbw40_enable = 1;

A message that is not in the archive (sent off-list or not yet received): [email protected]

#3 lore raw
Quoted 6 lines · Lautaro Javier Fernandez Pricco

Hi Philipp,
Thanks for your time. Your suggestions are duly noted.
I'll undo this commit and look for another task in the TODO file for rtl8712and its checklists output.

Regards,
Lautaro

Hi Lautaro,

you cannot undo it. The patch is only in the mailing list and will not be applied. So no need to do anything.

Or maybe I misunderstood you. Of course you need to reset your local git repo.

Thanks for your support.

Bye Philipp