All of lore.kernel.org
 help / color / mirror / Atom feed
* [Outreachy kernel] [PATCH 0/9] staging: rtl8723bs: os_dep: ioctl_linux.c: Fix formatting issues
@ 2019-03-31  7:15 Payal Kshirsagar
  2019-03-31  7:15 ` [Outreachy kernel] [PATCH 1/9] staging: rtl8723bs: os_dep: ioctl_linux.c: Fix indentation issue Payal Kshirsagar
                   ` (8 more replies)
  0 siblings, 9 replies; 15+ messages in thread
From: Payal Kshirsagar @ 2019-03-31  7:15 UTC (permalink / raw)
  To: outreachy-kernel; +Cc: Payal Kshirsagar

This patchset:
	-Removes spaces and adds right number of tabs.
	-Removes spaces before square brackets.
	-Avoids camelcase variable names.
	-Removes space before semicolon.
	-Aligns to open parenthesis.

Payal Kshirsagar (9):
  staging: rtl8723bs: os_dep: ioctl_linux.c: Fix indentation issue.
  staging: rtl8723bs: os_dep: ioctl_linux.c: space prohibited before
    square brackets
  staging: rtl8723bs: os_dep: ioctl_linux.c: "foo*  bar" should be "foo
    *bar"
  staging: rtl8723bs: os_dep: ioctl_linux.c: "(foo*)" should be "(foo
    *)"
  staging: rtl8723bs: os_dep: ioctl_linux.c: Avoid CamelCase
    "blInserted"
  staging: rtl8723bs: os_dep: ioctl_linux.c: Avoid CamelCase "intReturn"
  staging: rtl8723bs: os_dep: ioctl_linux.c: space prohibited before
    semicolon
  staging: rtl8723bs: os_dep: ioctl_linux.c: Avoid CamelCase "pPMK"
  staging: rtl8723bs: os_dep: ioctl_linux.c: Alignment should match open
    parenthesis

 drivers/staging/rtl8723bs/os_dep/ioctl_linux.c | 103 ++++++++++++-------------
 1 file changed, 50 insertions(+), 53 deletions(-)

-- 
2.7.4



^ permalink raw reply	[flat|nested] 15+ messages in thread

* [Outreachy kernel] [PATCH 1/9] staging: rtl8723bs: os_dep: ioctl_linux.c: Fix indentation issue.
  2019-03-31  7:15 [Outreachy kernel] [PATCH 0/9] staging: rtl8723bs: os_dep: ioctl_linux.c: Fix formatting issues Payal Kshirsagar
@ 2019-03-31  7:15 ` Payal Kshirsagar
  2019-03-31  7:15 ` [Outreachy kernel] [PATCH 2/9] staging: rtl8723bs: os_dep: ioctl_linux.c: space prohibited before square brackets Payal Kshirsagar
                   ` (7 subsequent siblings)
  8 siblings, 0 replies; 15+ messages in thread
From: Payal Kshirsagar @ 2019-03-31  7:15 UTC (permalink / raw)
  To: outreachy-kernel; +Cc: Payal Kshirsagar

To fix the indentation issue remove spaces and add tabs.

Signed-off-by: Payal Kshirsagar <payal.s.kshirsagar.98@gmail.com>
---
 drivers/staging/rtl8723bs/os_dep/ioctl_linux.c | 85 +++++++++++++-------------
 1 file changed, 41 insertions(+), 44 deletions(-)

diff --git a/drivers/staging/rtl8723bs/os_dep/ioctl_linux.c b/drivers/staging/rtl8723bs/os_dep/ioctl_linux.c
index ec336a5..e6f24b8 100644
--- a/drivers/staging/rtl8723bs/os_dep/ioctl_linux.c
+++ b/drivers/staging/rtl8723bs/os_dep/ioctl_linux.c
@@ -939,30 +939,30 @@ static int rtw_wx_get_mode(struct net_device *dev, struct iw_request_info *a,
 
 
 static int rtw_wx_set_pmkid(struct net_device *dev,
-	                     struct iw_request_info *a,
-			     union iwreq_data *wrqu, char *extra)
+			    struct iw_request_info *a,
+			    union iwreq_data *wrqu, char *extra)
 {
 	struct adapter *padapter = (struct adapter *)rtw_netdev_priv(dev);
-	u8          j, blInserted = false;
-	int         intReturn = false;
+	u8 j, blInserted = false;
+	int intReturn = false;
 	struct security_priv *psecuritypriv = &padapter->securitypriv;
-        struct iw_pmksa*  pPMK = (struct iw_pmksa*)extra;
-        u8     strZeroMacAddress[ ETH_ALEN ] = { 0x00 };
-        u8     strIssueBssid[ ETH_ALEN ] = { 0x00 };
+	struct iw_pmksa*  pPMK = (struct iw_pmksa*)extra;
+	u8 strZeroMacAddress[ ETH_ALEN ] = { 0x00 };
+	u8 strIssueBssid[ ETH_ALEN ] = { 0x00 };
 
 	/*
-        There are the BSSID information in the bssid.sa_data array.
-        If cmd is IW_PMKSA_FLUSH, it means the wpa_suppplicant wants to clear all the PMKID information.
-        If cmd is IW_PMKSA_ADD, it means the wpa_supplicant wants to add a PMKID/BSSID to driver.
-        If cmd is IW_PMKSA_REMOVE, it means the wpa_supplicant wants to remove a PMKID/BSSID from driver.
-        */
+	There are the BSSID information in the bssid.sa_data array.
+	If cmd is IW_PMKSA_FLUSH, it means the wpa_suppplicant wants to clear all the PMKID information.
+	If cmd is IW_PMKSA_ADD, it means the wpa_supplicant wants to add a PMKID/BSSID to driver.
+	If cmd is IW_PMKSA_REMOVE, it means the wpa_supplicant wants to remove a PMKID/BSSID from driver.
+	*/
 
 	memcpy(strIssueBssid, pPMK->bssid.sa_data, ETH_ALEN);
-        if (pPMK->cmd == IW_PMKSA_ADD) {
-                DBG_871X("[rtw_wx_set_pmkid] IW_PMKSA_ADD!\n");
-                if (!memcmp(strIssueBssid, strZeroMacAddress, ETH_ALEN))
+	if (pPMK->cmd == IW_PMKSA_ADD) {
+		DBG_871X("[rtw_wx_set_pmkid] IW_PMKSA_ADD!\n");
+		if (!memcmp(strIssueBssid, strZeroMacAddress, ETH_ALEN))
 			return intReturn;
-                else
+		else
 			intReturn = true;
 
 		blInserted = false;
@@ -971,46 +971,43 @@ static int rtw_wx_set_pmkid(struct net_device *dev,
 		for (j = 0 ; j<NUM_PMKID_CACHE; j++) {
 			if (!memcmp(psecuritypriv->PMKIDList[j].Bssid, strIssueBssid, ETH_ALEN)) {
 				/*  BSSID is matched, the same AP => rewrite with new PMKID. */
-                                DBG_871X("[rtw_wx_set_pmkid] BSSID exists in the PMKList.\n");
-
+				DBG_871X("[rtw_wx_set_pmkid] BSSID exists in the PMKList.\n");
 				memcpy(psecuritypriv->PMKIDList[j].PMKID, pPMK->pmkid, IW_PMKID_LEN);
-                                psecuritypriv->PMKIDList[ j ].bUsed = true;
+				psecuritypriv->PMKIDList[ j ].bUsed = true;
 				psecuritypriv->PMKIDIndex = j+1;
 				blInserted = true;
 				break;
 			}
-	        }
-
-	        if (!blInserted) {
-		    /*  Find a new entry */
-                    DBG_871X("[rtw_wx_set_pmkid] Use the new entry index = %d for this PMKID.\n",
-                            psecuritypriv->PMKIDIndex);
-
-	            memcpy(psecuritypriv->PMKIDList[psecuritypriv->PMKIDIndex].Bssid, strIssueBssid, ETH_ALEN);
-		    memcpy(psecuritypriv->PMKIDList[psecuritypriv->PMKIDIndex].PMKID, pPMK->pmkid, IW_PMKID_LEN);
+		}
 
-                    psecuritypriv->PMKIDList[ psecuritypriv->PMKIDIndex ].bUsed = true;
-		    psecuritypriv->PMKIDIndex++ ;
-		    if (psecuritypriv->PMKIDIndex == 16)
-		        psecuritypriv->PMKIDIndex = 0;
+		if (!blInserted) {
+			/*  Find a new entry */
+			DBG_871X("[rtw_wx_set_pmkid] Use the new entry index = %d for this PMKID.\n",
+				  psecuritypriv->PMKIDIndex);
+			memcpy(psecuritypriv->PMKIDList[psecuritypriv->PMKIDIndex].Bssid, strIssueBssid, ETH_ALEN);
+			memcpy(psecuritypriv->PMKIDList[psecuritypriv->PMKIDIndex].PMKID, pPMK->pmkid, IW_PMKID_LEN);
+			psecuritypriv->PMKIDList[ psecuritypriv->PMKIDIndex ].bUsed = true;
+			psecuritypriv->PMKIDIndex++ ;
+			if (psecuritypriv->PMKIDIndex == 16)
+				psecuritypriv->PMKIDIndex = 0;
 		}
-        } else if (pPMK->cmd == IW_PMKSA_REMOVE) {
-                DBG_871X("[rtw_wx_set_pmkid] IW_PMKSA_REMOVE!\n");
-                intReturn = true;
+	} else if (pPMK->cmd == IW_PMKSA_REMOVE) {
+		DBG_871X("[rtw_wx_set_pmkid] IW_PMKSA_REMOVE!\n");
+		intReturn = true;
 		for (j = 0 ; j<NUM_PMKID_CACHE; j++) {
 			if (!memcmp(psecuritypriv->PMKIDList[j].Bssid, strIssueBssid, ETH_ALEN)) {
 				/*  BSSID is matched, the same AP => Remove this PMKID information and reset it. */
-                                eth_zero_addr(psecuritypriv->PMKIDList[j].Bssid);
-                                psecuritypriv->PMKIDList[ j ].bUsed = false;
+				eth_zero_addr(psecuritypriv->PMKIDList[j].Bssid);
+				psecuritypriv->PMKIDList[ j ].bUsed = false;
 				break;
 			}
-	        }
-        } else if (pPMK->cmd == IW_PMKSA_FLUSH) {
-            DBG_871X("[rtw_wx_set_pmkid] IW_PMKSA_FLUSH!\n");
-            memset(&psecuritypriv->PMKIDList[ 0 ], 0x00, sizeof(RT_PMKID_LIST) * NUM_PMKID_CACHE);
-            psecuritypriv->PMKIDIndex = 0;
-            intReturn = true;
-        }
+		}
+	} else if (pPMK->cmd == IW_PMKSA_FLUSH) {
+		DBG_871X("[rtw_wx_set_pmkid] IW_PMKSA_FLUSH!\n");
+		memset(&psecuritypriv->PMKIDList[ 0 ], 0x00, sizeof(RT_PMKID_LIST) * NUM_PMKID_CACHE);
+		psecuritypriv->PMKIDIndex = 0;
+		intReturn = true;
+	}
 	return intReturn;
 }
 
-- 
2.7.4



^ permalink raw reply related	[flat|nested] 15+ messages in thread

* [Outreachy kernel] [PATCH 2/9] staging: rtl8723bs: os_dep: ioctl_linux.c: space prohibited before square brackets
  2019-03-31  7:15 [Outreachy kernel] [PATCH 0/9] staging: rtl8723bs: os_dep: ioctl_linux.c: Fix formatting issues Payal Kshirsagar
  2019-03-31  7:15 ` [Outreachy kernel] [PATCH 1/9] staging: rtl8723bs: os_dep: ioctl_linux.c: Fix indentation issue Payal Kshirsagar
@ 2019-03-31  7:15 ` Payal Kshirsagar
  2019-03-31  7:15 ` [Outreachy kernel] [PATCH 3/9] staging: rtl8723bs: os_dep: ioctl_linux.c: "foo* bar" should be "foo *bar" Payal Kshirsagar
                   ` (6 subsequent siblings)
  8 siblings, 0 replies; 15+ messages in thread
From: Payal Kshirsagar @ 2019-03-31  7:15 UTC (permalink / raw)
  To: outreachy-kernel; +Cc: Payal Kshirsagar

Remove space before square open and close bracket to fix issue - space
prohibited before square brackets.

Signed-off-by: Payal Kshirsagar <payal.s.kshirsagar.98@gmail.com>
---
 drivers/staging/rtl8723bs/os_dep/ioctl_linux.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/drivers/staging/rtl8723bs/os_dep/ioctl_linux.c b/drivers/staging/rtl8723bs/os_dep/ioctl_linux.c
index e6f24b8..46fbaac 100644
--- a/drivers/staging/rtl8723bs/os_dep/ioctl_linux.c
+++ b/drivers/staging/rtl8723bs/os_dep/ioctl_linux.c
@@ -947,8 +947,8 @@ static int rtw_wx_set_pmkid(struct net_device *dev,
 	int intReturn = false;
 	struct security_priv *psecuritypriv = &padapter->securitypriv;
 	struct iw_pmksa*  pPMK = (struct iw_pmksa*)extra;
-	u8 strZeroMacAddress[ ETH_ALEN ] = { 0x00 };
-	u8 strIssueBssid[ ETH_ALEN ] = { 0x00 };
+	u8 strZeroMacAddress[ETH_ALEN] = { 0x00 };
+	u8 strIssueBssid[ETH_ALEN] = { 0x00 };
 
 	/*
 	There are the BSSID information in the bssid.sa_data array.
@@ -973,7 +973,7 @@ static int rtw_wx_set_pmkid(struct net_device *dev,
 				/*  BSSID is matched, the same AP => rewrite with new PMKID. */
 				DBG_871X("[rtw_wx_set_pmkid] BSSID exists in the PMKList.\n");
 				memcpy(psecuritypriv->PMKIDList[j].PMKID, pPMK->pmkid, IW_PMKID_LEN);
-				psecuritypriv->PMKIDList[ j ].bUsed = true;
+				psecuritypriv->PMKIDList[j].bUsed = true;
 				psecuritypriv->PMKIDIndex = j+1;
 				blInserted = true;
 				break;
@@ -986,7 +986,7 @@ static int rtw_wx_set_pmkid(struct net_device *dev,
 				  psecuritypriv->PMKIDIndex);
 			memcpy(psecuritypriv->PMKIDList[psecuritypriv->PMKIDIndex].Bssid, strIssueBssid, ETH_ALEN);
 			memcpy(psecuritypriv->PMKIDList[psecuritypriv->PMKIDIndex].PMKID, pPMK->pmkid, IW_PMKID_LEN);
-			psecuritypriv->PMKIDList[ psecuritypriv->PMKIDIndex ].bUsed = true;
+			psecuritypriv->PMKIDList[psecuritypriv->PMKIDIndex].bUsed = true;
 			psecuritypriv->PMKIDIndex++ ;
 			if (psecuritypriv->PMKIDIndex == 16)
 				psecuritypriv->PMKIDIndex = 0;
@@ -998,13 +998,13 @@ static int rtw_wx_set_pmkid(struct net_device *dev,
 			if (!memcmp(psecuritypriv->PMKIDList[j].Bssid, strIssueBssid, ETH_ALEN)) {
 				/*  BSSID is matched, the same AP => Remove this PMKID information and reset it. */
 				eth_zero_addr(psecuritypriv->PMKIDList[j].Bssid);
-				psecuritypriv->PMKIDList[ j ].bUsed = false;
+				psecuritypriv->PMKIDList[j].bUsed = false;
 				break;
 			}
 		}
 	} else if (pPMK->cmd == IW_PMKSA_FLUSH) {
 		DBG_871X("[rtw_wx_set_pmkid] IW_PMKSA_FLUSH!\n");
-		memset(&psecuritypriv->PMKIDList[ 0 ], 0x00, sizeof(RT_PMKID_LIST) * NUM_PMKID_CACHE);
+		memset(&psecuritypriv->PMKIDList[0], 0x00, sizeof(RT_PMKID_LIST) * NUM_PMKID_CACHE);
 		psecuritypriv->PMKIDIndex = 0;
 		intReturn = true;
 	}
-- 
2.7.4



^ permalink raw reply related	[flat|nested] 15+ messages in thread

* [Outreachy kernel] [PATCH 3/9] staging: rtl8723bs: os_dep: ioctl_linux.c: "foo*  bar" should be "foo *bar"
  2019-03-31  7:15 [Outreachy kernel] [PATCH 0/9] staging: rtl8723bs: os_dep: ioctl_linux.c: Fix formatting issues Payal Kshirsagar
  2019-03-31  7:15 ` [Outreachy kernel] [PATCH 1/9] staging: rtl8723bs: os_dep: ioctl_linux.c: Fix indentation issue Payal Kshirsagar
  2019-03-31  7:15 ` [Outreachy kernel] [PATCH 2/9] staging: rtl8723bs: os_dep: ioctl_linux.c: space prohibited before square brackets Payal Kshirsagar
@ 2019-03-31  7:15 ` Payal Kshirsagar
  2019-03-31  7:15 ` [Outreachy kernel] [PATCH 4/9] staging: rtl8723bs: os_dep: ioctl_linux.c: "(foo*)" should be "(foo *)" Payal Kshirsagar
                   ` (5 subsequent siblings)
  8 siblings, 0 replies; 15+ messages in thread
From: Payal Kshirsagar @ 2019-03-31  7:15 UTC (permalink / raw)
  To: outreachy-kernel; +Cc: Payal Kshirsagar

Fix issue - "foo*  bar" should be "foo *bar".

Signed-off-by: Payal Kshirsagar <payal.s.kshirsagar.98@gmail.com>
---
 drivers/staging/rtl8723bs/os_dep/ioctl_linux.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/rtl8723bs/os_dep/ioctl_linux.c b/drivers/staging/rtl8723bs/os_dep/ioctl_linux.c
index 46fbaac..d68d9c8 100644
--- a/drivers/staging/rtl8723bs/os_dep/ioctl_linux.c
+++ b/drivers/staging/rtl8723bs/os_dep/ioctl_linux.c
@@ -946,7 +946,7 @@ static int rtw_wx_set_pmkid(struct net_device *dev,
 	u8 j, blInserted = false;
 	int intReturn = false;
 	struct security_priv *psecuritypriv = &padapter->securitypriv;
-	struct iw_pmksa*  pPMK = (struct iw_pmksa*)extra;
+	struct iw_pmksa *pPMK = (struct iw_pmksa*)extra;
 	u8 strZeroMacAddress[ETH_ALEN] = { 0x00 };
 	u8 strIssueBssid[ETH_ALEN] = { 0x00 };
 
-- 
2.7.4



^ permalink raw reply related	[flat|nested] 15+ messages in thread

* [Outreachy kernel] [PATCH 4/9] staging: rtl8723bs: os_dep: ioctl_linux.c: "(foo*)" should be "(foo *)"
  2019-03-31  7:15 [Outreachy kernel] [PATCH 0/9] staging: rtl8723bs: os_dep: ioctl_linux.c: Fix formatting issues Payal Kshirsagar
                   ` (2 preceding siblings ...)
  2019-03-31  7:15 ` [Outreachy kernel] [PATCH 3/9] staging: rtl8723bs: os_dep: ioctl_linux.c: "foo* bar" should be "foo *bar" Payal Kshirsagar
@ 2019-03-31  7:15 ` Payal Kshirsagar
  2019-03-31  7:15 ` [Outreachy kernel] [PATCH 5/9] staging: rtl8723bs: os_dep: ioctl_linux.c: Avoid CamelCase "blInserted" Payal Kshirsagar
                   ` (4 subsequent siblings)
  8 siblings, 0 replies; 15+ messages in thread
From: Payal Kshirsagar @ 2019-03-31  7:15 UTC (permalink / raw)
  To: outreachy-kernel; +Cc: Payal Kshirsagar

Fix issue - "(foo*)" should be "(foo *)".

Signed-off-by: Payal Kshirsagar <payal.s.kshirsagar.98@gmail.com>
---
 drivers/staging/rtl8723bs/os_dep/ioctl_linux.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/rtl8723bs/os_dep/ioctl_linux.c b/drivers/staging/rtl8723bs/os_dep/ioctl_linux.c
index d68d9c8..86c7c9d 100644
--- a/drivers/staging/rtl8723bs/os_dep/ioctl_linux.c
+++ b/drivers/staging/rtl8723bs/os_dep/ioctl_linux.c
@@ -946,7 +946,7 @@ static int rtw_wx_set_pmkid(struct net_device *dev,
 	u8 j, blInserted = false;
 	int intReturn = false;
 	struct security_priv *psecuritypriv = &padapter->securitypriv;
-	struct iw_pmksa *pPMK = (struct iw_pmksa*)extra;
+	struct iw_pmksa *pPMK = (struct iw_pmksa *)extra;
 	u8 strZeroMacAddress[ETH_ALEN] = { 0x00 };
 	u8 strIssueBssid[ETH_ALEN] = { 0x00 };
 
-- 
2.7.4



^ permalink raw reply related	[flat|nested] 15+ messages in thread

* [Outreachy kernel] [PATCH 5/9] staging: rtl8723bs: os_dep: ioctl_linux.c: Avoid CamelCase "blInserted"
  2019-03-31  7:15 [Outreachy kernel] [PATCH 0/9] staging: rtl8723bs: os_dep: ioctl_linux.c: Fix formatting issues Payal Kshirsagar
                   ` (3 preceding siblings ...)
  2019-03-31  7:15 ` [Outreachy kernel] [PATCH 4/9] staging: rtl8723bs: os_dep: ioctl_linux.c: "(foo*)" should be "(foo *)" Payal Kshirsagar
@ 2019-03-31  7:15 ` Payal Kshirsagar
  2019-03-31  9:05   ` Julia Lawall
  2019-03-31  7:15 ` [Outreachy kernel] [PATCH 6/9] staging: rtl8723bs: os_dep: ioctl_linux.c: Avoid CamelCase "intReturn" Payal Kshirsagar
                   ` (3 subsequent siblings)
  8 siblings, 1 reply; 15+ messages in thread
From: Payal Kshirsagar @ 2019-03-31  7:15 UTC (permalink / raw)
  To: outreachy-kernel; +Cc: Payal Kshirsagar

Change variable name "blInserted" to "bl_insetred"
to avoid camelcase style issue.

Signed-off-by: Payal Kshirsagar <payal.s.kshirsagar.98@gmail.com>
---
 drivers/staging/rtl8723bs/os_dep/ioctl_linux.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/staging/rtl8723bs/os_dep/ioctl_linux.c b/drivers/staging/rtl8723bs/os_dep/ioctl_linux.c
index 86c7c9d..99e02c4 100644
--- a/drivers/staging/rtl8723bs/os_dep/ioctl_linux.c
+++ b/drivers/staging/rtl8723bs/os_dep/ioctl_linux.c
@@ -943,7 +943,7 @@ static int rtw_wx_set_pmkid(struct net_device *dev,
 			    union iwreq_data *wrqu, char *extra)
 {
 	struct adapter *padapter = (struct adapter *)rtw_netdev_priv(dev);
-	u8 j, blInserted = false;
+	u8 j, bl_inserted = false;
 	int intReturn = false;
 	struct security_priv *psecuritypriv = &padapter->securitypriv;
 	struct iw_pmksa *pPMK = (struct iw_pmksa *)extra;
@@ -965,7 +965,7 @@ static int rtw_wx_set_pmkid(struct net_device *dev,
 		else
 			intReturn = true;
 
-		blInserted = false;
+		bl_inserted = false;
 
 		/* overwrite PMKID */
 		for (j = 0 ; j<NUM_PMKID_CACHE; j++) {
@@ -975,12 +975,12 @@ static int rtw_wx_set_pmkid(struct net_device *dev,
 				memcpy(psecuritypriv->PMKIDList[j].PMKID, pPMK->pmkid, IW_PMKID_LEN);
 				psecuritypriv->PMKIDList[j].bUsed = true;
 				psecuritypriv->PMKIDIndex = j+1;
-				blInserted = true;
+				bl_inserted = true;
 				break;
 			}
 		}
 
-		if (!blInserted) {
+		if (!bl_inserted) {
 			/*  Find a new entry */
 			DBG_871X("[rtw_wx_set_pmkid] Use the new entry index = %d for this PMKID.\n",
 				  psecuritypriv->PMKIDIndex);
-- 
2.7.4



^ permalink raw reply related	[flat|nested] 15+ messages in thread

* [Outreachy kernel] [PATCH 6/9] staging: rtl8723bs: os_dep: ioctl_linux.c: Avoid CamelCase "intReturn"
  2019-03-31  7:15 [Outreachy kernel] [PATCH 0/9] staging: rtl8723bs: os_dep: ioctl_linux.c: Fix formatting issues Payal Kshirsagar
                   ` (4 preceding siblings ...)
  2019-03-31  7:15 ` [Outreachy kernel] [PATCH 5/9] staging: rtl8723bs: os_dep: ioctl_linux.c: Avoid CamelCase "blInserted" Payal Kshirsagar
@ 2019-03-31  7:15 ` Payal Kshirsagar
  2019-03-31  9:04   ` Julia Lawall
  2019-03-31  7:15 ` [Outreachy kernel] [PATCH 7/9] staging: rtl8723bs: os_dep: ioctl_linux.c: space prohibited before semicolon Payal Kshirsagar
                   ` (2 subsequent siblings)
  8 siblings, 1 reply; 15+ messages in thread
From: Payal Kshirsagar @ 2019-03-31  7:15 UTC (permalink / raw)
  To: outreachy-kernel; +Cc: Payal Kshirsagar

Change variable name "intReturn" to "ret" to avoid camelcase style
issue.

Signed-off-by: Payal Kshirsagar <payal.s.kshirsagar.98@gmail.com>
---
 drivers/staging/rtl8723bs/os_dep/ioctl_linux.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/drivers/staging/rtl8723bs/os_dep/ioctl_linux.c b/drivers/staging/rtl8723bs/os_dep/ioctl_linux.c
index 99e02c4..98a91ce 100644
--- a/drivers/staging/rtl8723bs/os_dep/ioctl_linux.c
+++ b/drivers/staging/rtl8723bs/os_dep/ioctl_linux.c
@@ -944,7 +944,7 @@ static int rtw_wx_set_pmkid(struct net_device *dev,
 {
 	struct adapter *padapter = (struct adapter *)rtw_netdev_priv(dev);
 	u8 j, bl_inserted = false;
-	int intReturn = false;
+	int ret = false;
 	struct security_priv *psecuritypriv = &padapter->securitypriv;
 	struct iw_pmksa *pPMK = (struct iw_pmksa *)extra;
 	u8 strZeroMacAddress[ETH_ALEN] = { 0x00 };
@@ -961,9 +961,9 @@ static int rtw_wx_set_pmkid(struct net_device *dev,
 	if (pPMK->cmd == IW_PMKSA_ADD) {
 		DBG_871X("[rtw_wx_set_pmkid] IW_PMKSA_ADD!\n");
 		if (!memcmp(strIssueBssid, strZeroMacAddress, ETH_ALEN))
-			return intReturn;
+			return ret;
 		else
-			intReturn = true;
+			ret = true;
 
 		bl_inserted = false;
 
@@ -993,7 +993,7 @@ static int rtw_wx_set_pmkid(struct net_device *dev,
 		}
 	} else if (pPMK->cmd == IW_PMKSA_REMOVE) {
 		DBG_871X("[rtw_wx_set_pmkid] IW_PMKSA_REMOVE!\n");
-		intReturn = true;
+		ret = true;
 		for (j = 0 ; j<NUM_PMKID_CACHE; j++) {
 			if (!memcmp(psecuritypriv->PMKIDList[j].Bssid, strIssueBssid, ETH_ALEN)) {
 				/*  BSSID is matched, the same AP => Remove this PMKID information and reset it. */
@@ -1006,9 +1006,9 @@ static int rtw_wx_set_pmkid(struct net_device *dev,
 		DBG_871X("[rtw_wx_set_pmkid] IW_PMKSA_FLUSH!\n");
 		memset(&psecuritypriv->PMKIDList[0], 0x00, sizeof(RT_PMKID_LIST) * NUM_PMKID_CACHE);
 		psecuritypriv->PMKIDIndex = 0;
-		intReturn = true;
+		ret = true;
 	}
-	return intReturn;
+	return ret;
 }
 
 static int rtw_wx_get_sens(struct net_device *dev,
-- 
2.7.4



^ permalink raw reply related	[flat|nested] 15+ messages in thread

* [Outreachy kernel] [PATCH 7/9] staging: rtl8723bs: os_dep: ioctl_linux.c: space prohibited before semicolon
  2019-03-31  7:15 [Outreachy kernel] [PATCH 0/9] staging: rtl8723bs: os_dep: ioctl_linux.c: Fix formatting issues Payal Kshirsagar
                   ` (5 preceding siblings ...)
  2019-03-31  7:15 ` [Outreachy kernel] [PATCH 6/9] staging: rtl8723bs: os_dep: ioctl_linux.c: Avoid CamelCase "intReturn" Payal Kshirsagar
@ 2019-03-31  7:15 ` Payal Kshirsagar
  2019-03-31  7:15 ` [Outreachy kernel] [PATCH 8/9] staging: rtl8723bs: os_dep: ioctl_linux.c: Avoid CamelCase "pPMK" Payal Kshirsagar
  2019-03-31  7:15 ` [Outreachy kernel] [PATCH 9/9] staging: rtl8723bs: os_dep: ioctl_linux.c: Alignment should match open parenthesis Payal Kshirsagar
  8 siblings, 0 replies; 15+ messages in thread
From: Payal Kshirsagar @ 2019-03-31  7:15 UTC (permalink / raw)
  To: outreachy-kernel; +Cc: Payal Kshirsagar

Remove space before semicolon.

Signed-off-by: Payal Kshirsagar <payal.s.kshirsagar.98@gmail.com>
---
 drivers/staging/rtl8723bs/os_dep/ioctl_linux.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/rtl8723bs/os_dep/ioctl_linux.c b/drivers/staging/rtl8723bs/os_dep/ioctl_linux.c
index 98a91ce..9f085a3 100644
--- a/drivers/staging/rtl8723bs/os_dep/ioctl_linux.c
+++ b/drivers/staging/rtl8723bs/os_dep/ioctl_linux.c
@@ -987,7 +987,7 @@ static int rtw_wx_set_pmkid(struct net_device *dev,
 			memcpy(psecuritypriv->PMKIDList[psecuritypriv->PMKIDIndex].Bssid, strIssueBssid, ETH_ALEN);
 			memcpy(psecuritypriv->PMKIDList[psecuritypriv->PMKIDIndex].PMKID, pPMK->pmkid, IW_PMKID_LEN);
 			psecuritypriv->PMKIDList[psecuritypriv->PMKIDIndex].bUsed = true;
-			psecuritypriv->PMKIDIndex++ ;
+			psecuritypriv->PMKIDIndex++;
 			if (psecuritypriv->PMKIDIndex == 16)
 				psecuritypriv->PMKIDIndex = 0;
 		}
-- 
2.7.4



^ permalink raw reply related	[flat|nested] 15+ messages in thread

* [Outreachy kernel] [PATCH 8/9] staging: rtl8723bs: os_dep: ioctl_linux.c: Avoid CamelCase "pPMK"
  2019-03-31  7:15 [Outreachy kernel] [PATCH 0/9] staging: rtl8723bs: os_dep: ioctl_linux.c: Fix formatting issues Payal Kshirsagar
                   ` (6 preceding siblings ...)
  2019-03-31  7:15 ` [Outreachy kernel] [PATCH 7/9] staging: rtl8723bs: os_dep: ioctl_linux.c: space prohibited before semicolon Payal Kshirsagar
@ 2019-03-31  7:15 ` Payal Kshirsagar
  2019-03-31  9:03   ` Julia Lawall
  2019-03-31  7:15 ` [Outreachy kernel] [PATCH 9/9] staging: rtl8723bs: os_dep: ioctl_linux.c: Alignment should match open parenthesis Payal Kshirsagar
  8 siblings, 1 reply; 15+ messages in thread
From: Payal Kshirsagar @ 2019-03-31  7:15 UTC (permalink / raw)
  To: outreachy-kernel; +Cc: Payal Kshirsagar

Change variable name "pPMK" to "PMK"
to avoid camelcase style issue.

Signed-off-by: Payal Kshirsagar <payal.s.kshirsagar.98@gmail.com>
---
 drivers/staging/rtl8723bs/os_dep/ioctl_linux.c | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/drivers/staging/rtl8723bs/os_dep/ioctl_linux.c b/drivers/staging/rtl8723bs/os_dep/ioctl_linux.c
index 9f085a3..fbde2eb 100644
--- a/drivers/staging/rtl8723bs/os_dep/ioctl_linux.c
+++ b/drivers/staging/rtl8723bs/os_dep/ioctl_linux.c
@@ -946,7 +946,7 @@ static int rtw_wx_set_pmkid(struct net_device *dev,
 	u8 j, bl_inserted = false;
 	int ret = false;
 	struct security_priv *psecuritypriv = &padapter->securitypriv;
-	struct iw_pmksa *pPMK = (struct iw_pmksa *)extra;
+	struct iw_pmksa *PMK = (struct iw_pmksa *)extra;
 	u8 strZeroMacAddress[ETH_ALEN] = { 0x00 };
 	u8 strIssueBssid[ETH_ALEN] = { 0x00 };
 
@@ -957,8 +957,8 @@ static int rtw_wx_set_pmkid(struct net_device *dev,
 	If cmd is IW_PMKSA_REMOVE, it means the wpa_supplicant wants to remove a PMKID/BSSID from driver.
 	*/
 
-	memcpy(strIssueBssid, pPMK->bssid.sa_data, ETH_ALEN);
-	if (pPMK->cmd == IW_PMKSA_ADD) {
+	memcpy(strIssueBssid, PMK->bssid.sa_data, ETH_ALEN);
+	if (PMK->cmd == IW_PMKSA_ADD) {
 		DBG_871X("[rtw_wx_set_pmkid] IW_PMKSA_ADD!\n");
 		if (!memcmp(strIssueBssid, strZeroMacAddress, ETH_ALEN))
 			return ret;
@@ -972,7 +972,7 @@ static int rtw_wx_set_pmkid(struct net_device *dev,
 			if (!memcmp(psecuritypriv->PMKIDList[j].Bssid, strIssueBssid, ETH_ALEN)) {
 				/*  BSSID is matched, the same AP => rewrite with new PMKID. */
 				DBG_871X("[rtw_wx_set_pmkid] BSSID exists in the PMKList.\n");
-				memcpy(psecuritypriv->PMKIDList[j].PMKID, pPMK->pmkid, IW_PMKID_LEN);
+				memcpy(psecuritypriv->PMKIDList[j].PMKID, PMK->pmkid, IW_PMKID_LEN);
 				psecuritypriv->PMKIDList[j].bUsed = true;
 				psecuritypriv->PMKIDIndex = j+1;
 				bl_inserted = true;
@@ -985,13 +985,13 @@ static int rtw_wx_set_pmkid(struct net_device *dev,
 			DBG_871X("[rtw_wx_set_pmkid] Use the new entry index = %d for this PMKID.\n",
 				  psecuritypriv->PMKIDIndex);
 			memcpy(psecuritypriv->PMKIDList[psecuritypriv->PMKIDIndex].Bssid, strIssueBssid, ETH_ALEN);
-			memcpy(psecuritypriv->PMKIDList[psecuritypriv->PMKIDIndex].PMKID, pPMK->pmkid, IW_PMKID_LEN);
+			memcpy(psecuritypriv->PMKIDList[psecuritypriv->PMKIDIndex].PMKID, PMK->pmkid, IW_PMKID_LEN);
 			psecuritypriv->PMKIDList[psecuritypriv->PMKIDIndex].bUsed = true;
 			psecuritypriv->PMKIDIndex++;
 			if (psecuritypriv->PMKIDIndex == 16)
 				psecuritypriv->PMKIDIndex = 0;
 		}
-	} else if (pPMK->cmd == IW_PMKSA_REMOVE) {
+	} else if (PMK->cmd == IW_PMKSA_REMOVE) {
 		DBG_871X("[rtw_wx_set_pmkid] IW_PMKSA_REMOVE!\n");
 		ret = true;
 		for (j = 0 ; j<NUM_PMKID_CACHE; j++) {
@@ -1002,7 +1002,7 @@ static int rtw_wx_set_pmkid(struct net_device *dev,
 				break;
 			}
 		}
-	} else if (pPMK->cmd == IW_PMKSA_FLUSH) {
+	} else if (PMK->cmd == IW_PMKSA_FLUSH) {
 		DBG_871X("[rtw_wx_set_pmkid] IW_PMKSA_FLUSH!\n");
 		memset(&psecuritypriv->PMKIDList[0], 0x00, sizeof(RT_PMKID_LIST) * NUM_PMKID_CACHE);
 		psecuritypriv->PMKIDIndex = 0;
-- 
2.7.4



^ permalink raw reply related	[flat|nested] 15+ messages in thread

* [Outreachy kernel] [PATCH 9/9] staging: rtl8723bs: os_dep: ioctl_linux.c: Alignment should match open parenthesis
  2019-03-31  7:15 [Outreachy kernel] [PATCH 0/9] staging: rtl8723bs: os_dep: ioctl_linux.c: Fix formatting issues Payal Kshirsagar
                   ` (7 preceding siblings ...)
  2019-03-31  7:15 ` [Outreachy kernel] [PATCH 8/9] staging: rtl8723bs: os_dep: ioctl_linux.c: Avoid CamelCase "pPMK" Payal Kshirsagar
@ 2019-03-31  7:15 ` Payal Kshirsagar
  8 siblings, 0 replies; 15+ messages in thread
From: Payal Kshirsagar @ 2019-03-31  7:15 UTC (permalink / raw)
  To: outreachy-kernel; +Cc: Payal Kshirsagar

Align code to open parenthesis.

Signed-off-by: Payal Kshirsagar <payal.s.kshirsagar.98@gmail.com>
---
 drivers/staging/rtl8723bs/os_dep/ioctl_linux.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/rtl8723bs/os_dep/ioctl_linux.c b/drivers/staging/rtl8723bs/os_dep/ioctl_linux.c
index fbde2eb..b51175e 100644
--- a/drivers/staging/rtl8723bs/os_dep/ioctl_linux.c
+++ b/drivers/staging/rtl8723bs/os_dep/ioctl_linux.c
@@ -983,7 +983,7 @@ static int rtw_wx_set_pmkid(struct net_device *dev,
 		if (!bl_inserted) {
 			/*  Find a new entry */
 			DBG_871X("[rtw_wx_set_pmkid] Use the new entry index = %d for this PMKID.\n",
-				  psecuritypriv->PMKIDIndex);
+				 psecuritypriv->PMKIDIndex);
 			memcpy(psecuritypriv->PMKIDList[psecuritypriv->PMKIDIndex].Bssid, strIssueBssid, ETH_ALEN);
 			memcpy(psecuritypriv->PMKIDList[psecuritypriv->PMKIDIndex].PMKID, PMK->pmkid, IW_PMKID_LEN);
 			psecuritypriv->PMKIDList[psecuritypriv->PMKIDIndex].bUsed = true;
-- 
2.7.4



^ permalink raw reply related	[flat|nested] 15+ messages in thread

* Re: [Outreachy kernel] [PATCH 8/9] staging: rtl8723bs: os_dep: ioctl_linux.c: Avoid CamelCase "pPMK"
  2019-03-31  7:15 ` [Outreachy kernel] [PATCH 8/9] staging: rtl8723bs: os_dep: ioctl_linux.c: Avoid CamelCase "pPMK" Payal Kshirsagar
@ 2019-03-31  9:03   ` Julia Lawall
  2019-03-31  9:15     ` Payal Kshirsagar
  0 siblings, 1 reply; 15+ messages in thread
From: Julia Lawall @ 2019-03-31  9:03 UTC (permalink / raw)
  To: Payal Kshirsagar; +Cc: outreachy-kernel



On Sun, 31 Mar 2019, Payal Kshirsagar wrote:

> Change variable name "pPMK" to "PMK"
> to avoid camelcase style issue.

The p is actually hungarian notation.

It would be good to lowercase the variable as well (pmk).  Normally only
macros are in all upper case.

julia

>
> Signed-off-by: Payal Kshirsagar <payal.s.kshirsagar.98@gmail.com>
> ---
>  drivers/staging/rtl8723bs/os_dep/ioctl_linux.c | 14 +++++++-------
>  1 file changed, 7 insertions(+), 7 deletions(-)
>
> diff --git a/drivers/staging/rtl8723bs/os_dep/ioctl_linux.c b/drivers/staging/rtl8723bs/os_dep/ioctl_linux.c
> index 9f085a3..fbde2eb 100644
> --- a/drivers/staging/rtl8723bs/os_dep/ioctl_linux.c
> +++ b/drivers/staging/rtl8723bs/os_dep/ioctl_linux.c
> @@ -946,7 +946,7 @@ static int rtw_wx_set_pmkid(struct net_device *dev,
>  	u8 j, bl_inserted = false;
>  	int ret = false;
>  	struct security_priv *psecuritypriv = &padapter->securitypriv;
> -	struct iw_pmksa *pPMK = (struct iw_pmksa *)extra;
> +	struct iw_pmksa *PMK = (struct iw_pmksa *)extra;
>  	u8 strZeroMacAddress[ETH_ALEN] = { 0x00 };
>  	u8 strIssueBssid[ETH_ALEN] = { 0x00 };
>
> @@ -957,8 +957,8 @@ static int rtw_wx_set_pmkid(struct net_device *dev,
>  	If cmd is IW_PMKSA_REMOVE, it means the wpa_supplicant wants to remove a PMKID/BSSID from driver.
>  	*/
>
> -	memcpy(strIssueBssid, pPMK->bssid.sa_data, ETH_ALEN);
> -	if (pPMK->cmd == IW_PMKSA_ADD) {
> +	memcpy(strIssueBssid, PMK->bssid.sa_data, ETH_ALEN);
> +	if (PMK->cmd == IW_PMKSA_ADD) {
>  		DBG_871X("[rtw_wx_set_pmkid] IW_PMKSA_ADD!\n");
>  		if (!memcmp(strIssueBssid, strZeroMacAddress, ETH_ALEN))
>  			return ret;
> @@ -972,7 +972,7 @@ static int rtw_wx_set_pmkid(struct net_device *dev,
>  			if (!memcmp(psecuritypriv->PMKIDList[j].Bssid, strIssueBssid, ETH_ALEN)) {
>  				/*  BSSID is matched, the same AP => rewrite with new PMKID. */
>  				DBG_871X("[rtw_wx_set_pmkid] BSSID exists in the PMKList.\n");
> -				memcpy(psecuritypriv->PMKIDList[j].PMKID, pPMK->pmkid, IW_PMKID_LEN);
> +				memcpy(psecuritypriv->PMKIDList[j].PMKID, PMK->pmkid, IW_PMKID_LEN);
>  				psecuritypriv->PMKIDList[j].bUsed = true;
>  				psecuritypriv->PMKIDIndex = j+1;
>  				bl_inserted = true;
> @@ -985,13 +985,13 @@ static int rtw_wx_set_pmkid(struct net_device *dev,
>  			DBG_871X("[rtw_wx_set_pmkid] Use the new entry index = %d for this PMKID.\n",
>  				  psecuritypriv->PMKIDIndex);
>  			memcpy(psecuritypriv->PMKIDList[psecuritypriv->PMKIDIndex].Bssid, strIssueBssid, ETH_ALEN);
> -			memcpy(psecuritypriv->PMKIDList[psecuritypriv->PMKIDIndex].PMKID, pPMK->pmkid, IW_PMKID_LEN);
> +			memcpy(psecuritypriv->PMKIDList[psecuritypriv->PMKIDIndex].PMKID, PMK->pmkid, IW_PMKID_LEN);
>  			psecuritypriv->PMKIDList[psecuritypriv->PMKIDIndex].bUsed = true;
>  			psecuritypriv->PMKIDIndex++;
>  			if (psecuritypriv->PMKIDIndex == 16)
>  				psecuritypriv->PMKIDIndex = 0;
>  		}
> -	} else if (pPMK->cmd == IW_PMKSA_REMOVE) {
> +	} else if (PMK->cmd == IW_PMKSA_REMOVE) {
>  		DBG_871X("[rtw_wx_set_pmkid] IW_PMKSA_REMOVE!\n");
>  		ret = true;
>  		for (j = 0 ; j<NUM_PMKID_CACHE; j++) {
> @@ -1002,7 +1002,7 @@ static int rtw_wx_set_pmkid(struct net_device *dev,
>  				break;
>  			}
>  		}
> -	} else if (pPMK->cmd == IW_PMKSA_FLUSH) {
> +	} else if (PMK->cmd == IW_PMKSA_FLUSH) {
>  		DBG_871X("[rtw_wx_set_pmkid] IW_PMKSA_FLUSH!\n");
>  		memset(&psecuritypriv->PMKIDList[0], 0x00, sizeof(RT_PMKID_LIST) * NUM_PMKID_CACHE);
>  		psecuritypriv->PMKIDIndex = 0;
> --
> 2.7.4
>
> --
> You received this message because you are subscribed to the Google Groups "outreachy-kernel" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to outreachy-kernel+unsubscribe@googlegroups.com.
> To post to this group, send email to outreachy-kernel@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/2494c4c09f776e7c9b4c80bbeea8d8973a5b69e4.1554016131.git.payal.s.kshirsagar.98%40gmail.com.
> For more options, visit https://groups.google.com/d/optout.
>


^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [Outreachy kernel] [PATCH 6/9] staging: rtl8723bs: os_dep: ioctl_linux.c: Avoid CamelCase "intReturn"
  2019-03-31  7:15 ` [Outreachy kernel] [PATCH 6/9] staging: rtl8723bs: os_dep: ioctl_linux.c: Avoid CamelCase "intReturn" Payal Kshirsagar
@ 2019-03-31  9:04   ` Julia Lawall
  2019-03-31  9:12     ` Payal Kshirsagar
  0 siblings, 1 reply; 15+ messages in thread
From: Julia Lawall @ 2019-03-31  9:04 UTC (permalink / raw)
  To: Payal Kshirsagar; +Cc: outreachy-kernel



On Sun, 31 Mar 2019, Payal Kshirsagar wrote:

> Change variable name "intReturn" to "ret" to avoid camelcase style
> issue.

This is hungarian notation too.  Using ret was a good idea.

julia

>
> Signed-off-by: Payal Kshirsagar <payal.s.kshirsagar.98@gmail.com>
> ---
>  drivers/staging/rtl8723bs/os_dep/ioctl_linux.c | 12 ++++++------
>  1 file changed, 6 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/staging/rtl8723bs/os_dep/ioctl_linux.c b/drivers/staging/rtl8723bs/os_dep/ioctl_linux.c
> index 99e02c4..98a91ce 100644
> --- a/drivers/staging/rtl8723bs/os_dep/ioctl_linux.c
> +++ b/drivers/staging/rtl8723bs/os_dep/ioctl_linux.c
> @@ -944,7 +944,7 @@ static int rtw_wx_set_pmkid(struct net_device *dev,
>  {
>  	struct adapter *padapter = (struct adapter *)rtw_netdev_priv(dev);
>  	u8 j, bl_inserted = false;
> -	int intReturn = false;
> +	int ret = false;
>  	struct security_priv *psecuritypriv = &padapter->securitypriv;
>  	struct iw_pmksa *pPMK = (struct iw_pmksa *)extra;
>  	u8 strZeroMacAddress[ETH_ALEN] = { 0x00 };
> @@ -961,9 +961,9 @@ static int rtw_wx_set_pmkid(struct net_device *dev,
>  	if (pPMK->cmd == IW_PMKSA_ADD) {
>  		DBG_871X("[rtw_wx_set_pmkid] IW_PMKSA_ADD!\n");
>  		if (!memcmp(strIssueBssid, strZeroMacAddress, ETH_ALEN))
> -			return intReturn;
> +			return ret;
>  		else
> -			intReturn = true;
> +			ret = true;
>
>  		bl_inserted = false;
>
> @@ -993,7 +993,7 @@ static int rtw_wx_set_pmkid(struct net_device *dev,
>  		}
>  	} else if (pPMK->cmd == IW_PMKSA_REMOVE) {
>  		DBG_871X("[rtw_wx_set_pmkid] IW_PMKSA_REMOVE!\n");
> -		intReturn = true;
> +		ret = true;
>  		for (j = 0 ; j<NUM_PMKID_CACHE; j++) {
>  			if (!memcmp(psecuritypriv->PMKIDList[j].Bssid, strIssueBssid, ETH_ALEN)) {
>  				/*  BSSID is matched, the same AP => Remove this PMKID information and reset it. */
> @@ -1006,9 +1006,9 @@ static int rtw_wx_set_pmkid(struct net_device *dev,
>  		DBG_871X("[rtw_wx_set_pmkid] IW_PMKSA_FLUSH!\n");
>  		memset(&psecuritypriv->PMKIDList[0], 0x00, sizeof(RT_PMKID_LIST) * NUM_PMKID_CACHE);
>  		psecuritypriv->PMKIDIndex = 0;
> -		intReturn = true;
> +		ret = true;
>  	}
> -	return intReturn;
> +	return ret;
>  }
>
>  static int rtw_wx_get_sens(struct net_device *dev,
> --
> 2.7.4
>
> --
> You received this message because you are subscribed to the Google Groups "outreachy-kernel" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to outreachy-kernel+unsubscribe@googlegroups.com.
> To post to this group, send email to outreachy-kernel@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/97ba5a38e386011ce2c46eb9668d44ef257da020.1554016131.git.payal.s.kshirsagar.98%40gmail.com.
> For more options, visit https://groups.google.com/d/optout.
>


^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [Outreachy kernel] [PATCH 5/9] staging: rtl8723bs: os_dep: ioctl_linux.c: Avoid CamelCase "blInserted"
  2019-03-31  7:15 ` [Outreachy kernel] [PATCH 5/9] staging: rtl8723bs: os_dep: ioctl_linux.c: Avoid CamelCase "blInserted" Payal Kshirsagar
@ 2019-03-31  9:05   ` Julia Lawall
  0 siblings, 0 replies; 15+ messages in thread
From: Julia Lawall @ 2019-03-31  9:05 UTC (permalink / raw)
  To: Payal Kshirsagar; +Cc: outreachy-kernel



On Sun, 31 Mar 2019, Payal Kshirsagar wrote:

> Change variable name "blInserted" to "bl_insetred"
> to avoid camelcase style issue.

No, the bl is hungarian notation (bool long?).  Just use inserted.  Also,
use the correct spelling of inserted in the log message.

julia

>
> Signed-off-by: Payal Kshirsagar <payal.s.kshirsagar.98@gmail.com>
> ---
>  drivers/staging/rtl8723bs/os_dep/ioctl_linux.c | 8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/staging/rtl8723bs/os_dep/ioctl_linux.c b/drivers/staging/rtl8723bs/os_dep/ioctl_linux.c
> index 86c7c9d..99e02c4 100644
> --- a/drivers/staging/rtl8723bs/os_dep/ioctl_linux.c
> +++ b/drivers/staging/rtl8723bs/os_dep/ioctl_linux.c
> @@ -943,7 +943,7 @@ static int rtw_wx_set_pmkid(struct net_device *dev,
>  			    union iwreq_data *wrqu, char *extra)
>  {
>  	struct adapter *padapter = (struct adapter *)rtw_netdev_priv(dev);
> -	u8 j, blInserted = false;
> +	u8 j, bl_inserted = false;
>  	int intReturn = false;
>  	struct security_priv *psecuritypriv = &padapter->securitypriv;
>  	struct iw_pmksa *pPMK = (struct iw_pmksa *)extra;
> @@ -965,7 +965,7 @@ static int rtw_wx_set_pmkid(struct net_device *dev,
>  		else
>  			intReturn = true;
>
> -		blInserted = false;
> +		bl_inserted = false;
>
>  		/* overwrite PMKID */
>  		for (j = 0 ; j<NUM_PMKID_CACHE; j++) {
> @@ -975,12 +975,12 @@ static int rtw_wx_set_pmkid(struct net_device *dev,
>  				memcpy(psecuritypriv->PMKIDList[j].PMKID, pPMK->pmkid, IW_PMKID_LEN);
>  				psecuritypriv->PMKIDList[j].bUsed = true;
>  				psecuritypriv->PMKIDIndex = j+1;
> -				blInserted = true;
> +				bl_inserted = true;
>  				break;
>  			}
>  		}
>
> -		if (!blInserted) {
> +		if (!bl_inserted) {
>  			/*  Find a new entry */
>  			DBG_871X("[rtw_wx_set_pmkid] Use the new entry index = %d for this PMKID.\n",
>  				  psecuritypriv->PMKIDIndex);
> --
> 2.7.4
>
> --
> You received this message because you are subscribed to the Google Groups "outreachy-kernel" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to outreachy-kernel+unsubscribe@googlegroups.com.
> To post to this group, send email to outreachy-kernel@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/262f9fa05d845ba0b407eb2f887ffa62d546c54c.1554016131.git.payal.s.kshirsagar.98%40gmail.com.
> For more options, visit https://groups.google.com/d/optout.
>


^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [Outreachy kernel] [PATCH 6/9] staging: rtl8723bs: os_dep: ioctl_linux.c: Avoid CamelCase "intReturn"
  2019-03-31  9:04   ` Julia Lawall
@ 2019-03-31  9:12     ` Payal Kshirsagar
  0 siblings, 0 replies; 15+ messages in thread
From: Payal Kshirsagar @ 2019-03-31  9:12 UTC (permalink / raw)
  To: Julia Lawall; +Cc: outreachy-kernel

[-- Attachment #1: Type: text/plain, Size: 3909 bytes --]

On Sun, 31 Mar 2019 at 14:34, Julia Lawall <julia.lawall@lip6.fr> wrote:

>
>
> On Sun, 31 Mar 2019, Payal Kshirsagar wrote:
>
> > Change variable name "intReturn" to "ret" to avoid camelcase style
> > issue.
>
> This is hungarian notation too.  Using ret was a good idea.
>

Thank you :)
payal


> julia
>
> >
> > Signed-off-by: Payal Kshirsagar <payal.s.kshirsagar.98@gmail.com>
> > ---
> >  drivers/staging/rtl8723bs/os_dep/ioctl_linux.c | 12 ++++++------
> >  1 file changed, 6 insertions(+), 6 deletions(-)
> >
> > diff --git a/drivers/staging/rtl8723bs/os_dep/ioctl_linux.c
> b/drivers/staging/rtl8723bs/os_dep/ioctl_linux.c
> > index 99e02c4..98a91ce 100644
> > --- a/drivers/staging/rtl8723bs/os_dep/ioctl_linux.c
> > +++ b/drivers/staging/rtl8723bs/os_dep/ioctl_linux.c
> > @@ -944,7 +944,7 @@ static int rtw_wx_set_pmkid(struct net_device *dev,
> >  {
> >       struct adapter *padapter = (struct adapter *)rtw_netdev_priv(dev);
> >       u8 j, bl_inserted = false;
> > -     int intReturn = false;
> > +     int ret = false;
> >       struct security_priv *psecuritypriv = &padapter->securitypriv;
> >       struct iw_pmksa *pPMK = (struct iw_pmksa *)extra;
> >       u8 strZeroMacAddress[ETH_ALEN] = { 0x00 };
> > @@ -961,9 +961,9 @@ static int rtw_wx_set_pmkid(struct net_device *dev,
> >       if (pPMK->cmd == IW_PMKSA_ADD) {
> >               DBG_871X("[rtw_wx_set_pmkid] IW_PMKSA_ADD!\n");
> >               if (!memcmp(strIssueBssid, strZeroMacAddress, ETH_ALEN))
> > -                     return intReturn;
> > +                     return ret;
> >               else
> > -                     intReturn = true;
> > +                     ret = true;
> >
> >               bl_inserted = false;
> >
> > @@ -993,7 +993,7 @@ static int rtw_wx_set_pmkid(struct net_device *dev,
> >               }
> >       } else if (pPMK->cmd == IW_PMKSA_REMOVE) {
> >               DBG_871X("[rtw_wx_set_pmkid] IW_PMKSA_REMOVE!\n");
> > -             intReturn = true;
> > +             ret = true;
> >               for (j = 0 ; j<NUM_PMKID_CACHE; j++) {
> >                       if (!memcmp(psecuritypriv->PMKIDList[j].Bssid,
> strIssueBssid, ETH_ALEN)) {
> >                               /*  BSSID is matched, the same AP =>
> Remove this PMKID information and reset it. */
> > @@ -1006,9 +1006,9 @@ static int rtw_wx_set_pmkid(struct net_device *dev,
> >               DBG_871X("[rtw_wx_set_pmkid] IW_PMKSA_FLUSH!\n");
> >               memset(&psecuritypriv->PMKIDList[0], 0x00,
> sizeof(RT_PMKID_LIST) * NUM_PMKID_CACHE);
> >               psecuritypriv->PMKIDIndex = 0;
> > -             intReturn = true;
> > +             ret = true;
> >       }
> > -     return intReturn;
> > +     return ret;
> >  }
> >
> >  static int rtw_wx_get_sens(struct net_device *dev,
> > --
> > 2.7.4
> >
> > --
> > You received this message because you are subscribed to the Google
> Groups "outreachy-kernel" group.
> > To unsubscribe from this group and stop receiving emails from it, send
> an email to outreachy-kernel+unsubscribe@googlegroups.com.
> > To post to this group, send email to outreachy-kernel@googlegroups.com.
> > To view this discussion on the web visit
> https://groups.google.com/d/msgid/outreachy-kernel/97ba5a38e386011ce2c46eb9668d44ef257da020.1554016131.git.payal.s.kshirsagar.98%40gmail.com
> .
> > For more options, visit https://groups.google.com/d/optout.
> >
>
> --
> You received this message because you are subscribed to the Google Groups
> "outreachy-kernel" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to outreachy-kernel+unsubscribe@googlegroups.com.
> To post to this group, send email to outreachy-kernel@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/outreachy-kernel/alpine.DEB.2.21.1903311103540.2578%40hadrien
> .
> For more options, visit https://groups.google.com/d/optout.
>

[-- Attachment #2: Type: text/html, Size: 6020 bytes --]

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [Outreachy kernel] [PATCH 8/9] staging: rtl8723bs: os_dep: ioctl_linux.c: Avoid CamelCase "pPMK"
  2019-03-31  9:03   ` Julia Lawall
@ 2019-03-31  9:15     ` Payal Kshirsagar
  0 siblings, 0 replies; 15+ messages in thread
From: Payal Kshirsagar @ 2019-03-31  9:15 UTC (permalink / raw)
  To: Julia Lawall; +Cc: outreachy-kernel

[-- Attachment #1: Type: text/plain, Size: 4924 bytes --]

On Sun, 31 Mar 2019 at 14:33, Julia Lawall <julia.lawall@lip6.fr> wrote:

>
>
> On Sun, 31 Mar 2019, Payal Kshirsagar wrote:
>
> > Change variable name "pPMK" to "PMK"
> > to avoid camelcase style issue.
>
> The p is actually hungarian notation.
>
> It would be good to lowercase the variable as well (pmk).  Normally only
> macros are in all upper case.
>

Okay I will send v2 for this patchset with corrections.
thanks,
payal

julia
>
> >
> > Signed-off-by: Payal Kshirsagar <payal.s.kshirsagar.98@gmail.com>
> > ---
> >  drivers/staging/rtl8723bs/os_dep/ioctl_linux.c | 14 +++++++-------
> >  1 file changed, 7 insertions(+), 7 deletions(-)
> >
> > diff --git a/drivers/staging/rtl8723bs/os_dep/ioctl_linux.c
> b/drivers/staging/rtl8723bs/os_dep/ioctl_linux.c
> > index 9f085a3..fbde2eb 100644
> > --- a/drivers/staging/rtl8723bs/os_dep/ioctl_linux.c
> > +++ b/drivers/staging/rtl8723bs/os_dep/ioctl_linux.c
> > @@ -946,7 +946,7 @@ static int rtw_wx_set_pmkid(struct net_device *dev,
> >       u8 j, bl_inserted = false;
> >       int ret = false;
> >       struct security_priv *psecuritypriv = &padapter->securitypriv;
> > -     struct iw_pmksa *pPMK = (struct iw_pmksa *)extra;
> > +     struct iw_pmksa *PMK = (struct iw_pmksa *)extra;
> >       u8 strZeroMacAddress[ETH_ALEN] = { 0x00 };
> >       u8 strIssueBssid[ETH_ALEN] = { 0x00 };
> >
> > @@ -957,8 +957,8 @@ static int rtw_wx_set_pmkid(struct net_device *dev,
> >       If cmd is IW_PMKSA_REMOVE, it means the wpa_supplicant wants to
> remove a PMKID/BSSID from driver.
> >       */
> >
> > -     memcpy(strIssueBssid, pPMK->bssid.sa_data, ETH_ALEN);
> > -     if (pPMK->cmd == IW_PMKSA_ADD) {
> > +     memcpy(strIssueBssid, PMK->bssid.sa_data, ETH_ALEN);
> > +     if (PMK->cmd == IW_PMKSA_ADD) {
> >               DBG_871X("[rtw_wx_set_pmkid] IW_PMKSA_ADD!\n");
> >               if (!memcmp(strIssueBssid, strZeroMacAddress, ETH_ALEN))
> >                       return ret;
> > @@ -972,7 +972,7 @@ static int rtw_wx_set_pmkid(struct net_device *dev,
> >                       if (!memcmp(psecuritypriv->PMKIDList[j].Bssid,
> strIssueBssid, ETH_ALEN)) {
> >                               /*  BSSID is matched, the same AP =>
> rewrite with new PMKID. */
> >                               DBG_871X("[rtw_wx_set_pmkid] BSSID exists
> in the PMKList.\n");
> > -                             memcpy(psecuritypriv->PMKIDList[j].PMKID,
> pPMK->pmkid, IW_PMKID_LEN);
> > +                             memcpy(psecuritypriv->PMKIDList[j].PMKID,
> PMK->pmkid, IW_PMKID_LEN);
> >                               psecuritypriv->PMKIDList[j].bUsed = true;
> >                               psecuritypriv->PMKIDIndex = j+1;
> >                               bl_inserted = true;
> > @@ -985,13 +985,13 @@ static int rtw_wx_set_pmkid(struct net_device *dev,
> >                       DBG_871X("[rtw_wx_set_pmkid] Use the new entry
> index = %d for this PMKID.\n",
> >                                 psecuritypriv->PMKIDIndex);
> >
>  memcpy(psecuritypriv->PMKIDList[psecuritypriv->PMKIDIndex].Bssid,
> strIssueBssid, ETH_ALEN);
> > -
>  memcpy(psecuritypriv->PMKIDList[psecuritypriv->PMKIDIndex].PMKID,
> pPMK->pmkid, IW_PMKID_LEN);
> > +
>  memcpy(psecuritypriv->PMKIDList[psecuritypriv->PMKIDIndex].PMKID,
> PMK->pmkid, IW_PMKID_LEN);
> >
>  psecuritypriv->PMKIDList[psecuritypriv->PMKIDIndex].bUsed = true;
> >                       psecuritypriv->PMKIDIndex++;
> >                       if (psecuritypriv->PMKIDIndex == 16)
> >                               psecuritypriv->PMKIDIndex = 0;
> >               }
> > -     } else if (pPMK->cmd == IW_PMKSA_REMOVE) {
> > +     } else if (PMK->cmd == IW_PMKSA_REMOVE) {
> >               DBG_871X("[rtw_wx_set_pmkid] IW_PMKSA_REMOVE!\n");
> >               ret = true;
> >               for (j = 0 ; j<NUM_PMKID_CACHE; j++) {
> > @@ -1002,7 +1002,7 @@ static int rtw_wx_set_pmkid(struct net_device *dev,
> >                               break;
> >                       }
> >               }
> > -     } else if (pPMK->cmd == IW_PMKSA_FLUSH) {
> > +     } else if (PMK->cmd == IW_PMKSA_FLUSH) {
> >               DBG_871X("[rtw_wx_set_pmkid] IW_PMKSA_FLUSH!\n");
> >               memset(&psecuritypriv->PMKIDList[0], 0x00,
> sizeof(RT_PMKID_LIST) * NUM_PMKID_CACHE);
> >               psecuritypriv->PMKIDIndex = 0;
> > --
> > 2.7.4
> >
> > --
> > You received this message because you are subscribed to the Google
> Groups "outreachy-kernel" group.
> > To unsubscribe from this group and stop receiving emails from it, send
> an email to outreachy-kernel+unsubscribe@googlegroups.com.
> > To post to this group, send email to outreachy-kernel@googlegroups.com.
> > To view this discussion on the web visit
> https://groups.google.com/d/msgid/outreachy-kernel/2494c4c09f776e7c9b4c80bbeea8d8973a5b69e4.1554016131.git.payal.s.kshirsagar.98%40gmail.com
> .
> > For more options, visit https://groups.google.com/d/optout.
> >
>

[-- Attachment #2: Type: text/html, Size: 7065 bytes --]

^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2019-03-31  9:15 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-03-31  7:15 [Outreachy kernel] [PATCH 0/9] staging: rtl8723bs: os_dep: ioctl_linux.c: Fix formatting issues Payal Kshirsagar
2019-03-31  7:15 ` [Outreachy kernel] [PATCH 1/9] staging: rtl8723bs: os_dep: ioctl_linux.c: Fix indentation issue Payal Kshirsagar
2019-03-31  7:15 ` [Outreachy kernel] [PATCH 2/9] staging: rtl8723bs: os_dep: ioctl_linux.c: space prohibited before square brackets Payal Kshirsagar
2019-03-31  7:15 ` [Outreachy kernel] [PATCH 3/9] staging: rtl8723bs: os_dep: ioctl_linux.c: "foo* bar" should be "foo *bar" Payal Kshirsagar
2019-03-31  7:15 ` [Outreachy kernel] [PATCH 4/9] staging: rtl8723bs: os_dep: ioctl_linux.c: "(foo*)" should be "(foo *)" Payal Kshirsagar
2019-03-31  7:15 ` [Outreachy kernel] [PATCH 5/9] staging: rtl8723bs: os_dep: ioctl_linux.c: Avoid CamelCase "blInserted" Payal Kshirsagar
2019-03-31  9:05   ` Julia Lawall
2019-03-31  7:15 ` [Outreachy kernel] [PATCH 6/9] staging: rtl8723bs: os_dep: ioctl_linux.c: Avoid CamelCase "intReturn" Payal Kshirsagar
2019-03-31  9:04   ` Julia Lawall
2019-03-31  9:12     ` Payal Kshirsagar
2019-03-31  7:15 ` [Outreachy kernel] [PATCH 7/9] staging: rtl8723bs: os_dep: ioctl_linux.c: space prohibited before semicolon Payal Kshirsagar
2019-03-31  7:15 ` [Outreachy kernel] [PATCH 8/9] staging: rtl8723bs: os_dep: ioctl_linux.c: Avoid CamelCase "pPMK" Payal Kshirsagar
2019-03-31  9:03   ` Julia Lawall
2019-03-31  9:15     ` Payal Kshirsagar
2019-03-31  7:15 ` [Outreachy kernel] [PATCH 9/9] staging: rtl8723bs: os_dep: ioctl_linux.c: Alignment should match open parenthesis Payal Kshirsagar

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.