Skip to contentSkip to conversation

staging: rtl8723bs: fix code style comparison warning

PATCH Superseded Kurt Manucredo 3 participants 3 messages Feb 19, 2021 Staging

v2 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 staging: rtl8723bs: fix code style comparison warning

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.

---
 drivers/staging/rtl8723bs/core/rtw_wlan_util.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/rtl8723bs/core/rtw_wlan_util.c +1 -1
index 975f2830e29e..96feced698ac 100644
@@ -2146,7 +2146,7 @@ void rtw_get_sec_iv(struct adapter *padapter, u8 *pcur_dot11txpn, u8 *StaAddr)
 	struct security_priv *psecpriv = &padapter->securitypriv;
 
 	memset(pcur_dot11txpn, 0, 8);
-	if (NULL == StaAddr)
+	if (!StaAddr)
 		return;
 	psta = rtw_get_stainfo(&padapter->stapriv, StaAddr);
 	DBG_871X("%s(): StaAddr: %02x %02x %02x %02x %02x %02x\n",
Signature · 1 line
2.20.1
#1 lore raw
Quoted 7 lines · Kurt Manucredo

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

These comments need to go below the --- cut off line.

Quoted 6 lines

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.

---

^^^

This one here.

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

regards,
dan carpenter

maintainer
#2 lore raw
In reply to Kurt Manucredo
Quoted 6 lines · Kurt Manucredo

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

This all goes below the --- line please.

Please make a v3.

thanks,

greg k-h