staging: rtl8192u: minor coding style fix
diff mbox series

Message ID 20210225100351.12199-1-leegib@gmail.com
State Accepted
Commit 861cdbdd4d70f7a4998cfb834ffca7dbcdcde890
Headers show
Series
  • staging: rtl8192u: minor coding style fix
Related show

Commit Message

Lee Gibson Feb. 25, 2021, 10:03 a.m. UTC
Fixes this checkpatch warning
WARNING: Comparisons should place the constant on the right side of the test

Signed-off-by: Lee Gibson <leegib@gmail.com>
---
 drivers/staging/rtl8192u/r8192U_wx.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Greg Kroah-Hartman Feb. 26, 2021, 7:57 a.m. UTC | #1
On Thu, Feb 25, 2021 at 10:03:51AM +0000, Lee Gibson wrote:
> Fixes this checkpatch warning
> WARNING: Comparisons should place the constant on the right side of the test
> 
> Signed-off-by: Lee Gibson <leegib@gmail.com>
> ---
>  drivers/staging/rtl8192u/r8192U_wx.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/staging/rtl8192u/r8192U_wx.c b/drivers/staging/rtl8192u/r8192U_wx.c
> index d853586705fc..175bb8b15389 100644
> --- a/drivers/staging/rtl8192u/r8192U_wx.c
> +++ b/drivers/staging/rtl8192u/r8192U_wx.c
> @@ -726,7 +726,7 @@ static int r8192_wx_set_enc_ext(struct net_device *dev,
>  			idx--;
>  		group = ext->ext_flags & IW_ENCODE_EXT_GROUP_KEY;
>  
> -		if ((!group) || (IW_MODE_ADHOC == ieee->iw_mode) || (alg ==  KEY_TYPE_WEP40)) {
> +		if ((!group) || (ieee->iw_mode == IW_MODE_ADHOC) || (alg ==  KEY_TYPE_WEP40)) {
>  			if ((ext->key_len == 13) && (alg == KEY_TYPE_WEP40))
>  				alg = KEY_TYPE_WEP104;
>  			ieee->pairwise_key_type = alg;
> -- 
> 2.25.1

Someone already sent this same fix in before you did, sorry.

greg k-h

Patch
diff mbox series

diff --git a/drivers/staging/rtl8192u/r8192U_wx.c b/drivers/staging/rtl8192u/r8192U_wx.c
index d853586705fc..175bb8b15389 100644
--- a/drivers/staging/rtl8192u/r8192U_wx.c
+++ b/drivers/staging/rtl8192u/r8192U_wx.c
@@ -726,7 +726,7 @@  static int r8192_wx_set_enc_ext(struct net_device *dev,
 			idx--;
 		group = ext->ext_flags & IW_ENCODE_EXT_GROUP_KEY;
 
-		if ((!group) || (IW_MODE_ADHOC == ieee->iw_mode) || (alg ==  KEY_TYPE_WEP40)) {
+		if ((!group) || (ieee->iw_mode == IW_MODE_ADHOC) || (alg ==  KEY_TYPE_WEP40)) {
 			if ((ext->key_len == 13) && (alg == KEY_TYPE_WEP40))
 				alg = KEY_TYPE_WEP104;
 			ieee->pairwise_key_type = alg;