[PATCH v3] staging: rtl8723bs: fix code style comparison warning

2021-02-19 Thread Kurt Manucredo



checkpatch gives the following WARNING:
WARNING: Comparisons should place the constant on the right side of the test
this patch fixes the coding style warning.

Signed-off-by: Kurt Manucredo 
---

changes since previous version:
- put version chatter below the --- cut off line.

thank you very much for your help Mr. Dan Carpenter.

 drivers/staging/rtl8723bs/core/rtw_wlan_util.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/rtl8723bs/core/rtw_wlan_util.c 
b/drivers/staging/rtl8723bs/core/rtw_wlan_util.c
index 975f2830e29e..96feced698ac 100644
--- a/drivers/staging/rtl8723bs/core/rtw_wlan_util.c
+++ b/drivers/staging/rtl8723bs/core/rtw_wlan_util.c
@@ -2146,7 +2146,7 @@ void rtw_get_sec_iv(struct adapter *padapter, u8 
*pcur_dot11txpn, u8 *StaAddr)
struct security_priv *psecpriv = >securitypriv;
 
memset(pcur_dot11txpn, 0, 8);
-   if (NULL == StaAddr)
+   if (!StaAddr)
return;
psta = rtw_get_stainfo(>stapriv, StaAddr);
DBG_871X("%s(): StaAddr: %02x %02x %02x %02x %02x %02x\n",
-- 
2.20.1


___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH v2] staging: rtl8723bs: fix code style comparison warning

2021-02-19 Thread Kurt Manucredo



changes since previous version:
- change Subject line
- change commit message
- change commit message position to above signed-off-by

checkpatch gives the following WARNING:
WARNING: Comparisons should place the constant on the right side of the test
this patch fixes the coding style warning.

Signed-off-by: Kurt Manucredo 
---
 drivers/staging/rtl8723bs/core/rtw_wlan_util.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/rtl8723bs/core/rtw_wlan_util.c 
b/drivers/staging/rtl8723bs/core/rtw_wlan_util.c
index 975f2830e29e..96feced698ac 100644
--- a/drivers/staging/rtl8723bs/core/rtw_wlan_util.c
+++ b/drivers/staging/rtl8723bs/core/rtw_wlan_util.c
@@ -2146,7 +2146,7 @@ void rtw_get_sec_iv(struct adapter *padapter, u8 
*pcur_dot11txpn, u8 *StaAddr)
struct security_priv *psecpriv = >securitypriv;
 
memset(pcur_dot11txpn, 0, 8);
-   if (NULL == StaAddr)
+   if (!StaAddr)
return;
psta = rtw_get_stainfo(>stapriv, StaAddr);
DBG_871X("%s(): StaAddr: %02x %02x %02x %02x %02x %02x\n",
-- 
2.20.1


___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH] staging: rtl8723bs: make if-statement checkpatch.pl conform

2021-02-18 Thread Kurt Manucredo
Signed-off-by: Kurt Manucredo 
---

The preferred coding style is:
if (!StaAddr)
return;

thank you mr. dan carpenter

 drivers/staging/rtl8723bs/core/rtw_wlan_util.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/rtl8723bs/core/rtw_wlan_util.c 
b/drivers/staging/rtl8723bs/core/rtw_wlan_util.c
index 975f2830e29e..96feced698ac 100644
--- a/drivers/staging/rtl8723bs/core/rtw_wlan_util.c
+++ b/drivers/staging/rtl8723bs/core/rtw_wlan_util.c
@@ -2146,7 +2146,7 @@ void rtw_get_sec_iv(struct adapter *padapter, u8 
*pcur_dot11txpn, u8 *StaAddr)
struct security_priv *psecpriv = >securitypriv;
 
memset(pcur_dot11txpn, 0, 8);
-   if (NULL == StaAddr)
+   if (!StaAddr)
return;
psta = rtw_get_stainfo(>stapriv, StaAddr);
DBG_871X("%s(): StaAddr: %02x %02x %02x %02x %02x %02x\n",
-- 
2.20.1


___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH] Staging: rtl8723bs: code-style fix

2021-02-18 Thread Kurt Manucredo
Signed-off-by: Kurt Manucredo 
---

Checkpatch complains the constant needs to be on the right side of the
comparison. The preferred way is: 

 drivers/staging/rtl8723bs/core/rtw_wlan_util.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/rtl8723bs/core/rtw_wlan_util.c 
b/drivers/staging/rtl8723bs/core/rtw_wlan_util.c
index 089c6ec19373..96feced698ac 100644
--- a/drivers/staging/rtl8723bs/core/rtw_wlan_util.c
+++ b/drivers/staging/rtl8723bs/core/rtw_wlan_util.c
@@ -2146,7 +2146,7 @@ void rtw_get_sec_iv(struct adapter *padapter, u8 
*pcur_dot11txpn, u8 *StaAddr)
struct security_priv *psecpriv = >securitypriv;
 
memset(pcur_dot11txpn, 0, 8);
-   if (StaAddr == NULL)
+   if (!StaAddr)
return;
psta = rtw_get_stainfo(>stapriv, StaAddr);
DBG_871X("%s(): StaAddr: %02x %02x %02x %02x %02x %02x\n",
-- 
2.20.1


___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH] fix comparisons - put constant on right side- eudyptula challenge 10

2021-02-18 Thread Kurt Manucredo
Signed-off-by: Kurt Manucredo 
---
 drivers/staging/rtl8723bs/core/rtw_wlan_util.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/rtl8723bs/core/rtw_wlan_util.c 
b/drivers/staging/rtl8723bs/core/rtw_wlan_util.c
index 975f2830e29e..089c6ec19373 100644
--- a/drivers/staging/rtl8723bs/core/rtw_wlan_util.c
+++ b/drivers/staging/rtl8723bs/core/rtw_wlan_util.c
@@ -2146,7 +2146,7 @@ void rtw_get_sec_iv(struct adapter *padapter, u8 
*pcur_dot11txpn, u8 *StaAddr)
struct security_priv *psecpriv = >securitypriv;
 
memset(pcur_dot11txpn, 0, 8);
-   if (NULL == StaAddr)
+   if (StaAddr == NULL)
return;
psta = rtw_get_stainfo(>stapriv, StaAddr);
DBG_871X("%s(): StaAddr: %02x %02x %02x %02x %02x %02x\n",
-- 
2.20.1


___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH] fix comparisons - put constant on right side- eudyptula

2021-02-18 Thread Kurt Manucredo


Dear linux kernel developers,

for my eudyptula challenge it is required of me to fix a coding style
issue in the staging area in linux-next. I am aware that it is in
general frowned upon when submitting these sorts of patches. However, to
finish my 10th challenge I was tasked to do exactly that. So I ask you
kindly to pull this patch if possible.

Thank you for your time,

kind regards



___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel