Skip to contentSkip to conversation

staging: rtl8192e: Fix camel case

PATCH In review Gustavo Montenari Pechta 3 participants 3 messages Aug 22, 2024 Staging

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 staging: rtl8192e: Fix camel case

Fix camel case on variable name to match style convention

---
 .../staging/rtl8192e/rtl8192e/r8192E_dev.c    | 32 +++++++++----------
 1 file changed, 16 insertions(+), 16 deletions(-)
drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c +16 -16
index 6ef38f4ca17c..14e50acb40b5 100644
@@ -240,7 +240,7 @@ static void _rtl92e_read_eeprom_info(struct net_device *dev)
 	const u8 bMac_Tmp_Addr[ETH_ALEN] = {0x00, 0xe0, 0x4c, 0x00, 0x00, 0x01};
 	u8 tempval;
 	u8 ICVer8192, ICVer8256;
-	u16 i, usValue, IC_Version;
+	u16 i, us_value, IC_Version;
 	u16 EEPROMId;
 
 	EEPROMId = rtl92e_eeprom_read(dev, 0);
@@ -256,12 +256,12 @@ static void _rtl92e_read_eeprom_info(struct net_device *dev)
 		priv->eeprom_vid = rtl92e_eeprom_read(dev, EEPROM_VID >> 1);
 		priv->eeprom_did = rtl92e_eeprom_read(dev, EEPROM_DID >> 1);
 
-		usValue = rtl92e_eeprom_read(dev,
+		us_value = rtl92e_eeprom_read(dev,
 					     (EEPROM_Customer_ID >> 1)) >> 8;
-		priv->eeprom_customer_id = usValue & 0xff;
-		usValue = rtl92e_eeprom_read(dev,
+		priv->eeprom_customer_id = us_value & 0xff;
+		us_value = rtl92e_eeprom_read(dev,
 					     EEPROM_ICVersion_ChannelPlan >> 1);
-		IC_Version = (usValue & 0xff00) >> 8;
+		IC_Version = (us_value & 0xff00) >> 8;
 
 		ICVer8192 = IC_Version & 0xf;
 		ICVer8256 = (IC_Version & 0xf0) >> 4;
@@ -288,9 +288,9 @@ static void _rtl92e_read_eeprom_info(struct net_device *dev)
 		u8 addr[ETH_ALEN];
 
 		for (i = 0; i < 6; i += 2) {
-			usValue = rtl92e_eeprom_read(dev,
+			us_value = rtl92e_eeprom_read(dev,
 				 (EEPROM_NODE_ADDRESS_BYTE_0 + i) >> 1);
-			*(u16 *)(&addr[i]) = usValue;
+			*(u16 *)(&addr[i]) = us_value;
 		}
 		eth_hw_addr_set(dev, addr);
 	} else {
@@ -321,10 +321,10 @@ static void _rtl92e_read_eeprom_info(struct net_device *dev)
 
 		if (priv->epromtype == EEPROM_93C46) {
 			if (!priv->autoload_fail_flag) {
-				usValue = rtl92e_eeprom_read(dev,
+				us_value = rtl92e_eeprom_read(dev,
 					  EEPROM_TxPwDiff_CrystalCap >> 1);
-				priv->eeprom_ant_pwr_diff = usValue & 0x0fff;
-				priv->eeprom_crystal_cap = (usValue & 0xf000)
+				priv->eeprom_ant_pwr_diff = us_value & 0x0fff;
+				priv->eeprom_crystal_cap = (us_value & 0xf000)
 							 >> 12;
 			} else {
 				priv->eeprom_ant_pwr_diff =
@@ -335,20 +335,20 @@ static void _rtl92e_read_eeprom_info(struct net_device *dev)
 
 			for (i = 0; i < 14; i += 2) {
 				if (!priv->autoload_fail_flag)
-					usValue = rtl92e_eeprom_read(dev,
+					us_value = rtl92e_eeprom_read(dev,
 						  (EEPROM_TxPwIndex_CCK + i) >> 1);
 				else
-					usValue = EEPROM_Default_TxPower;
+					us_value = EEPROM_Default_TxPower;
 				*((u16 *)(&priv->eeprom_tx_pwr_level_cck[i])) =
-								 usValue;
+								 us_value;
 			}
 			for (i = 0; i < 14; i += 2) {
 				if (!priv->autoload_fail_flag)
-					usValue = rtl92e_eeprom_read(dev,
+					us_value = rtl92e_eeprom_read(dev,
 						(EEPROM_TxPwIndex_OFDM_24G + i) >> 1);
 				else
-					usValue = EEPROM_Default_TxPower;
-				*((u16 *)(&priv->eeprom_tx_pwr_level_ofdm24g[i])) = usValue;
+					us_value = EEPROM_Default_TxPower;
+				*((u16 *)(&priv->eeprom_tx_pwr_level_ofdm24g[i])) = us_value;
 			}
 		}
 		if (priv->epromtype == EEPROM_93C46) {
Signature · 1 line
2.46.0
#1 lore raw
Quoted 6 lines · Gustavo Montenari Pechta

Fix camel case on variable name to match style convention

---
 .../staging/rtl8192e/rtl8192e/r8192E_dev.c    | 32 +++++++++----------
 1 file changed, 16 insertions(+), 16 deletions(-)

This doesn't apply due to it conflicting with another change that someone else in this "group" just submitted for this file and function that came in before yours. Please rebase your tree on the latest staging-next branch and resend it.

thanks,

greg k-h

#2 lore raw
In reply to Gustavo Montenari Pechta
Quoted 12 lines · Gustavo Montenari Pechta

Fix camel case on variable name to match style convention

---
 .../staging/rtl8192e/rtl8192e/r8192E_dev.c    | 32 +++++++++----------
 1 file changed, 16 insertions(+), 16 deletions(-)
drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c +0 -0
index 6ef38f4ca17c..14e50acb40b5 100644

drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c static void _rtl92e_read_eeprom_info(struct net_device *dev) · line 243

Quoted 5 lines
drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c +1 -1
@@ -240,7 +240,7 @@ static void _rtl92e_read_eeprom_info(struct net_device *dev)
 	const u8 bMac_Tmp_Addr[ETH_ALEN] = {0x00, 0xe0, 0x4c, 0x00, 0x00, 0x01};
 	u8 tempval;
 	u8 ICVer8192, ICVer8256;
-	u16 i, usValue, IC_Version;
+	u16 i, us_value, IC_Version;

The "us" stands for unsigned short. We don't really want that kind of variable naming scheme in the kernel. Just call it "value" or think of a better name.

regards,
dan carpenter