* [Outreachy kernel] [PATCH v2 0/9] staging: rtl8723bs: os_dep: ioctl_linux.c: Fix formatting issues
@ 2019-03-31 10:48 Payal Kshirsagar
2019-03-31 10:48 ` [Outreachy kernel] [PATCH v2 1/9] staging: rtl8723bs: os_dep: ioctl_linux.c: Fix indentation issue Payal Kshirsagar
` (9 more replies)
0 siblings, 10 replies; 13+ messages in thread
From: Payal Kshirsagar @ 2019-03-31 10:48 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.
Changes in v2:
-Variable name “bl_inserted” changed to “inserted”.
-Variable name “PMK” changed to “pmk”.
-Spelling corrected to “inserted” in log message.
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] 13+ messages in thread
* [Outreachy kernel] [PATCH v2 1/9] staging: rtl8723bs: os_dep: ioctl_linux.c: Fix indentation issue.
2019-03-31 10:48 [Outreachy kernel] [PATCH v2 0/9] staging: rtl8723bs: os_dep: ioctl_linux.c: Fix formatting issues Payal Kshirsagar
@ 2019-03-31 10:48 ` Payal Kshirsagar
2019-04-01 17:24 ` Greg KH
2019-03-31 10:48 ` [Outreachy kernel] [PATCH v2 2/9] staging: rtl8723bs: os_dep: ioctl_linux.c: space prohibited before square brackets Payal Kshirsagar
` (8 subsequent siblings)
9 siblings, 1 reply; 13+ messages in thread
From: Payal Kshirsagar @ 2019-03-31 10:48 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] 13+ messages in thread
* [Outreachy kernel] [PATCH v2 2/9] staging: rtl8723bs: os_dep: ioctl_linux.c: space prohibited before square brackets
2019-03-31 10:48 [Outreachy kernel] [PATCH v2 0/9] staging: rtl8723bs: os_dep: ioctl_linux.c: Fix formatting issues Payal Kshirsagar
2019-03-31 10:48 ` [Outreachy kernel] [PATCH v2 1/9] staging: rtl8723bs: os_dep: ioctl_linux.c: Fix indentation issue Payal Kshirsagar
@ 2019-03-31 10:48 ` Payal Kshirsagar
2019-03-31 10:48 ` [Outreachy kernel] [PATCH v2 3/9] staging: rtl8723bs: os_dep: ioctl_linux.c: "foo* bar" should be "foo *bar" Payal Kshirsagar
` (7 subsequent siblings)
9 siblings, 0 replies; 13+ messages in thread
From: Payal Kshirsagar @ 2019-03-31 10:48 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] 13+ messages in thread
* [Outreachy kernel] [PATCH v2 3/9] staging: rtl8723bs: os_dep: ioctl_linux.c: "foo* bar" should be "foo *bar"
2019-03-31 10:48 [Outreachy kernel] [PATCH v2 0/9] staging: rtl8723bs: os_dep: ioctl_linux.c: Fix formatting issues Payal Kshirsagar
2019-03-31 10:48 ` [Outreachy kernel] [PATCH v2 1/9] staging: rtl8723bs: os_dep: ioctl_linux.c: Fix indentation issue Payal Kshirsagar
2019-03-31 10:48 ` [Outreachy kernel] [PATCH v2 2/9] staging: rtl8723bs: os_dep: ioctl_linux.c: space prohibited before square brackets Payal Kshirsagar
@ 2019-03-31 10:48 ` Payal Kshirsagar
2019-03-31 10:48 ` [Outreachy kernel] [PATCH v2 4/9] staging: rtl8723bs: os_dep: ioctl_linux.c: "(foo*)" should be "(foo *)" Payal Kshirsagar
` (6 subsequent siblings)
9 siblings, 0 replies; 13+ messages in thread
From: Payal Kshirsagar @ 2019-03-31 10:48 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] 13+ messages in thread
* [Outreachy kernel] [PATCH v2 4/9] staging: rtl8723bs: os_dep: ioctl_linux.c: "(foo*)" should be "(foo *)"
2019-03-31 10:48 [Outreachy kernel] [PATCH v2 0/9] staging: rtl8723bs: os_dep: ioctl_linux.c: Fix formatting issues Payal Kshirsagar
` (2 preceding siblings ...)
2019-03-31 10:48 ` [Outreachy kernel] [PATCH v2 3/9] staging: rtl8723bs: os_dep: ioctl_linux.c: "foo* bar" should be "foo *bar" Payal Kshirsagar
@ 2019-03-31 10:48 ` Payal Kshirsagar
2019-03-31 10:48 ` [Outreachy kernel] [PATCH v2 5/9] staging: rtl8723bs: os_dep: ioctl_linux.c: Avoid CamelCase "blInserted" Payal Kshirsagar
` (5 subsequent siblings)
9 siblings, 0 replies; 13+ messages in thread
From: Payal Kshirsagar @ 2019-03-31 10:48 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] 13+ messages in thread
* [Outreachy kernel] [PATCH v2 5/9] staging: rtl8723bs: os_dep: ioctl_linux.c: Avoid CamelCase "blInserted"
2019-03-31 10:48 [Outreachy kernel] [PATCH v2 0/9] staging: rtl8723bs: os_dep: ioctl_linux.c: Fix formatting issues Payal Kshirsagar
` (3 preceding siblings ...)
2019-03-31 10:48 ` [Outreachy kernel] [PATCH v2 4/9] staging: rtl8723bs: os_dep: ioctl_linux.c: "(foo*)" should be "(foo *)" Payal Kshirsagar
@ 2019-03-31 10:48 ` Payal Kshirsagar
2019-03-31 10:48 ` [Outreachy kernel] [PATCH v2 6/9] staging: rtl8723bs: os_dep: ioctl_linux.c: Avoid CamelCase "intReturn" Payal Kshirsagar
` (4 subsequent siblings)
9 siblings, 0 replies; 13+ messages in thread
From: Payal Kshirsagar @ 2019-03-31 10:48 UTC (permalink / raw)
To: outreachy-kernel; +Cc: Payal Kshirsagar
Change variable name "blInserted" to “inserted”
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..e550806 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, 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;
+ 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;
+ inserted = true;
break;
}
}
- if (!blInserted) {
+ if (!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] 13+ messages in thread
* [Outreachy kernel] [PATCH v2 6/9] staging: rtl8723bs: os_dep: ioctl_linux.c: Avoid CamelCase "intReturn"
2019-03-31 10:48 [Outreachy kernel] [PATCH v2 0/9] staging: rtl8723bs: os_dep: ioctl_linux.c: Fix formatting issues Payal Kshirsagar
` (4 preceding siblings ...)
2019-03-31 10:48 ` [Outreachy kernel] [PATCH v2 5/9] staging: rtl8723bs: os_dep: ioctl_linux.c: Avoid CamelCase "blInserted" Payal Kshirsagar
@ 2019-03-31 10:48 ` Payal Kshirsagar
2019-03-31 10:48 ` [Outreachy kernel] [PATCH v2 7/9] staging: rtl8723bs: os_dep: ioctl_linux.c: space prohibited before semicolon Payal Kshirsagar
` (3 subsequent siblings)
9 siblings, 0 replies; 13+ messages in thread
From: Payal Kshirsagar @ 2019-03-31 10:48 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 e550806..6020b0c 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, 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;
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] 13+ messages in thread
* [Outreachy kernel] [PATCH v2 7/9] staging: rtl8723bs: os_dep: ioctl_linux.c: space prohibited before semicolon
2019-03-31 10:48 [Outreachy kernel] [PATCH v2 0/9] staging: rtl8723bs: os_dep: ioctl_linux.c: Fix formatting issues Payal Kshirsagar
` (5 preceding siblings ...)
2019-03-31 10:48 ` [Outreachy kernel] [PATCH v2 6/9] staging: rtl8723bs: os_dep: ioctl_linux.c: Avoid CamelCase "intReturn" Payal Kshirsagar
@ 2019-03-31 10:48 ` Payal Kshirsagar
2019-03-31 10:48 ` [Outreachy kernel] [PATCH v2 8/9] staging: rtl8723bs: os_dep: ioctl_linux.c: Avoid CamelCase "pPMK" Payal Kshirsagar
` (2 subsequent siblings)
9 siblings, 0 replies; 13+ messages in thread
From: Payal Kshirsagar @ 2019-03-31 10:48 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 6020b0c..21b2065 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] 13+ messages in thread
* [Outreachy kernel] [PATCH v2 8/9] staging: rtl8723bs: os_dep: ioctl_linux.c: Avoid CamelCase "pPMK"
2019-03-31 10:48 [Outreachy kernel] [PATCH v2 0/9] staging: rtl8723bs: os_dep: ioctl_linux.c: Fix formatting issues Payal Kshirsagar
` (6 preceding siblings ...)
2019-03-31 10:48 ` [Outreachy kernel] [PATCH v2 7/9] staging: rtl8723bs: os_dep: ioctl_linux.c: space prohibited before semicolon Payal Kshirsagar
@ 2019-03-31 10:48 ` Payal Kshirsagar
2019-03-31 10:48 ` [Outreachy kernel] [PATCH v2 9/9] staging: rtl8723bs: os_dep: ioctl_linux.c: Alignment should match open parenthesis Payal Kshirsagar
2019-04-01 17:25 ` [Outreachy kernel] [PATCH v2 0/9] staging: rtl8723bs: os_dep: ioctl_linux.c: Fix formatting issues Greg KH
9 siblings, 0 replies; 13+ messages in thread
From: Payal Kshirsagar @ 2019-03-31 10:48 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 21b2065..0fe11dd 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, 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;
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] 13+ messages in thread
* [Outreachy kernel] [PATCH v2 9/9] staging: rtl8723bs: os_dep: ioctl_linux.c: Alignment should match open parenthesis
2019-03-31 10:48 [Outreachy kernel] [PATCH v2 0/9] staging: rtl8723bs: os_dep: ioctl_linux.c: Fix formatting issues Payal Kshirsagar
` (7 preceding siblings ...)
2019-03-31 10:48 ` [Outreachy kernel] [PATCH v2 8/9] staging: rtl8723bs: os_dep: ioctl_linux.c: Avoid CamelCase "pPMK" Payal Kshirsagar
@ 2019-03-31 10:48 ` Payal Kshirsagar
2019-04-01 17:25 ` [Outreachy kernel] [PATCH v2 0/9] staging: rtl8723bs: os_dep: ioctl_linux.c: Fix formatting issues Greg KH
9 siblings, 0 replies; 13+ messages in thread
From: Payal Kshirsagar @ 2019-03-31 10:48 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 0fe11dd..c15e3a9 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 (!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] 13+ messages in thread
* Re: [Outreachy kernel] [PATCH v2 1/9] staging: rtl8723bs: os_dep: ioctl_linux.c: Fix indentation issue.
2019-03-31 10:48 ` [Outreachy kernel] [PATCH v2 1/9] staging: rtl8723bs: os_dep: ioctl_linux.c: Fix indentation issue Payal Kshirsagar
@ 2019-04-01 17:24 ` Greg KH
0 siblings, 0 replies; 13+ messages in thread
From: Greg KH @ 2019-04-01 17:24 UTC (permalink / raw)
To: Payal Kshirsagar; +Cc: outreachy-kernel
On Sun, Mar 31, 2019 at 04:18:36PM +0530, Payal Kshirsagar wrote:
> 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.
> + */
That is not the correct indentation to make :(
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [Outreachy kernel] [PATCH v2 0/9] staging: rtl8723bs: os_dep: ioctl_linux.c: Fix formatting issues
2019-03-31 10:48 [Outreachy kernel] [PATCH v2 0/9] staging: rtl8723bs: os_dep: ioctl_linux.c: Fix formatting issues Payal Kshirsagar
` (8 preceding siblings ...)
2019-03-31 10:48 ` [Outreachy kernel] [PATCH v2 9/9] staging: rtl8723bs: os_dep: ioctl_linux.c: Alignment should match open parenthesis Payal Kshirsagar
@ 2019-04-01 17:25 ` Greg KH
2019-04-02 4:46 ` Payal Kshirsagar
9 siblings, 1 reply; 13+ messages in thread
From: Greg KH @ 2019-04-01 17:25 UTC (permalink / raw)
To: Payal Kshirsagar; +Cc: outreachy-kernel
On Sun, Mar 31, 2019 at 04:18:35PM +0530, Payal Kshirsagar wrote:
> 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.
>
> Changes in v2:
> -Variable name “bl_inserted” changed to “inserted”.
> -Variable name “PMK” changed to “pmk”.
> -Spelling corrected to “inserted” in log message.
As I didn't take the 1st patch here, I couldn't take any of the others.
Please fix up and resend the whole series.
thanks,
greg k-h
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [Outreachy kernel] [PATCH v2 0/9] staging: rtl8723bs: os_dep: ioctl_linux.c: Fix formatting issues
2019-04-01 17:25 ` [Outreachy kernel] [PATCH v2 0/9] staging: rtl8723bs: os_dep: ioctl_linux.c: Fix formatting issues Greg KH
@ 2019-04-02 4:46 ` Payal Kshirsagar
0 siblings, 0 replies; 13+ messages in thread
From: Payal Kshirsagar @ 2019-04-02 4:46 UTC (permalink / raw)
To: Greg KH; +Cc: outreachy-kernel
[-- Attachment #1: Type: text/plain, Size: 813 bytes --]
On Mon, Apr 1, 2019, 11:10 PM Greg KH <greg@kroah.com> wrote:
> On Sun, Mar 31, 2019 at 04:18:35PM +0530, Payal Kshirsagar wrote:
> > 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.
> >
> > Changes in v2:
> > -Variable name “bl_inserted” changed to “inserted”.
> > -Variable name “PMK” changed to “pmk”.
> > -Spelling corrected to “inserted” in log message.
>
> As I didn't take the 1st patch here, I couldn't take any of the others.
> Please fix up and resend the whole series.
>
Sure, I will do.
Thanks,
Payal
thanks,
>
> greg k-h
>
[-- Attachment #2: Type: text/html, Size: 1622 bytes --]
^ permalink raw reply [flat|nested] 13+ messages in thread
end of thread, other threads:[~2019-04-02 4:46 UTC | newest]
Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-03-31 10:48 [Outreachy kernel] [PATCH v2 0/9] staging: rtl8723bs: os_dep: ioctl_linux.c: Fix formatting issues Payal Kshirsagar
2019-03-31 10:48 ` [Outreachy kernel] [PATCH v2 1/9] staging: rtl8723bs: os_dep: ioctl_linux.c: Fix indentation issue Payal Kshirsagar
2019-04-01 17:24 ` Greg KH
2019-03-31 10:48 ` [Outreachy kernel] [PATCH v2 2/9] staging: rtl8723bs: os_dep: ioctl_linux.c: space prohibited before square brackets Payal Kshirsagar
2019-03-31 10:48 ` [Outreachy kernel] [PATCH v2 3/9] staging: rtl8723bs: os_dep: ioctl_linux.c: "foo* bar" should be "foo *bar" Payal Kshirsagar
2019-03-31 10:48 ` [Outreachy kernel] [PATCH v2 4/9] staging: rtl8723bs: os_dep: ioctl_linux.c: "(foo*)" should be "(foo *)" Payal Kshirsagar
2019-03-31 10:48 ` [Outreachy kernel] [PATCH v2 5/9] staging: rtl8723bs: os_dep: ioctl_linux.c: Avoid CamelCase "blInserted" Payal Kshirsagar
2019-03-31 10:48 ` [Outreachy kernel] [PATCH v2 6/9] staging: rtl8723bs: os_dep: ioctl_linux.c: Avoid CamelCase "intReturn" Payal Kshirsagar
2019-03-31 10:48 ` [Outreachy kernel] [PATCH v2 7/9] staging: rtl8723bs: os_dep: ioctl_linux.c: space prohibited before semicolon Payal Kshirsagar
2019-03-31 10:48 ` [Outreachy kernel] [PATCH v2 8/9] staging: rtl8723bs: os_dep: ioctl_linux.c: Avoid CamelCase "pPMK" Payal Kshirsagar
2019-03-31 10:48 ` [Outreachy kernel] [PATCH v2 9/9] staging: rtl8723bs: os_dep: ioctl_linux.c: Alignment should match open parenthesis Payal Kshirsagar
2019-04-01 17:25 ` [Outreachy kernel] [PATCH v2 0/9] staging: rtl8723bs: os_dep: ioctl_linux.c: Fix formatting issues Greg KH
2019-04-02 4:46 ` 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.