[PATCH 5/6] staging: rtl8192e: rename local variables to avoid camelcase - style

Himadri Pandya himadri18.07 at gmail.com
Mon Feb 4 12:25:47 UTC 2019


Fix checkpatch warning: Avoid CameCase by renaming following local
variables of function dot11d_update_country_ie
	NumTriples -> num_triples
	MaxChnlNum -> max_chnl_num
	pTriple -> p_triple

Signed-off-by: Himadri Pandya <himadri18.07 at gmail.com>
---
 drivers/staging/rtl8192e/dot11d.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/drivers/staging/rtl8192e/dot11d.c b/drivers/staging/rtl8192e/dot11d.c
index 12dd866af63c..c2040f23dbd4 100644
--- a/drivers/staging/rtl8192e/dot11d.c
+++ b/drivers/staging/rtl8192e/dot11d.c
@@ -118,37 +118,37 @@ void dot11d_update_country_ie(struct rtllib_device *dev, u8 *p_taddr,
 			    u16 coutry_ie_len, u8 *p_coutry_ie)
 {
 	struct rt_dot11d_info *pDot11dInfo = GET_DOT11D_INFO(dev);
-	u8 i, j, NumTriples, MaxChnlNum;
-	struct chnl_txpow_triple *pTriple;
+	u8 i, j, num_triples, max_chnl_num;
+	struct chnl_txpow_triple *p_triple;
 
 	memset(pDot11dInfo->channel_map, 0, MAX_CHANNEL_NUMBER + 1);
 	memset(pDot11dInfo->max_tx_pwr_dbm_list, 0xFF, MAX_CHANNEL_NUMBER + 1);
-	MaxChnlNum = 0;
-	NumTriples = (coutry_ie_len - 3) / 3;
-	pTriple = (struct chnl_txpow_triple *)(p_coutry_ie + 3);
-	for (i = 0; i < NumTriples; i++) {
-		if (MaxChnlNum >= pTriple->first_chnl) {
+	max_chnl_num = 0;
+	num_triples = (coutry_ie_len - 3) / 3;
+	p_triple = (struct chnl_txpow_triple *)(p_coutry_ie + 3);
+	for (i = 0; i < num_triples; i++) {
+		if (max_chnl_num >= p_triple->first_chnl) {
 			netdev_info(dev->dev,
 				    "%s: Invalid country IE, skip it......1\n",
 				    __func__);
 			return;
 		}
-		if (MAX_CHANNEL_NUMBER < (pTriple->first_chnl +
-		    pTriple->num_chnls)) {
+		if (MAX_CHANNEL_NUMBER < (p_triple->first_chnl +
+		    p_triple->num_chnls)) {
 			netdev_info(dev->dev,
 				    "%s: Invalid country IE, skip it......2\n",
 				    __func__);
 			return;
 		}
 
-		for (j = 0; j < pTriple->num_chnls; j++) {
-			pDot11dInfo->channel_map[pTriple->first_chnl + j] = 1;
-			pDot11dInfo->max_tx_pwr_dbm_list[pTriple->first_chnl + j] =
-						 pTriple->max_tx_power_in_dbm;
-			MaxChnlNum = pTriple->first_chnl + j;
+		for (j = 0; j < p_triple->num_chnls; j++) {
+			pDot11dInfo->channel_map[p_triple->first_chnl + j] = 1;
+			pDot11dInfo->max_tx_pwr_dbm_list[p_triple->first_chnl + j] =
+						 p_triple->max_tx_power_in_dbm;
+			max_chnl_num = p_triple->first_chnl + j;
 		}
 
-		pTriple = (struct chnl_txpow_triple *)((u8 *)pTriple + 3);
+		p_triple = (struct chnl_txpow_triple *)((u8 *)p_triple + 3);
 	}
 
 	UPDATE_CIE_SRC(dev, p_taddr);
-- 
2.17.1



More information about the devel mailing list