[v2] staging: rtl8723bs: fix code style comparison warning
diff mbox series

Message ID 20210219144928.8-1-fuzzybritches@protonmail.com
State Accepted
Commit c1abfd8cd821badf42222972ea7002550e6b2664
Headers show
Series
  • [v2] staging: rtl8723bs: fix code style comparison warning
Related show

Commit Message

Kurt Manucredo Feb. 19, 2021, 2:50 p.m. UTC
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 <fuzzybritches@protonmail.com>
---
 drivers/staging/rtl8723bs/core/rtw_wlan_util.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Greg KH Feb. 19, 2021, 4:25 p.m. UTC | #1
On Fri, Feb 19, 2021 at 02:50:53PM +0000, Kurt Manucredo wrote:
> 
> 
> 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
Dan Carpenter Feb. 19, 2021, 5:14 p.m. UTC | #2
On Fri, Feb 19, 2021 at 02:50:53PM +0000, Kurt Manucredo wrote:
> 
> 
> 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.

> 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 <fuzzybritches@protonmail.com>
> ---
  ^^^

This one here.

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

regards,
dan carpenter

Patch
diff mbox series

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 = &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",