2021-08-29 09:04:49

by Saurav Girepunje

[permalink] [raw]
Subject: [PATCH] staging: r8188eu: core: remove condition with no effect

Remove the condition with no effect (if == else) and group multiple
cases which execute same statement in rtw_mlme_ext.c

Signed-off-by: Saurav Girepunje <[email protected]>
---
drivers/staging/r8188eu/core/rtw_mlme_ext.c | 9 ---------
1 file changed, 9 deletions(-)

diff --git a/drivers/staging/r8188eu/core/rtw_mlme_ext.c b/drivers/staging/r8188eu/core/rtw_mlme_ext.c
index 5a472a4954b0..4178b3c1ff57 100644
--- a/drivers/staging/r8188eu/core/rtw_mlme_ext.c
+++ b/drivers/staging/r8188eu/core/rtw_mlme_ext.c
@@ -453,17 +453,8 @@ void mgt_dispatcher(struct adapter *padapter, struct recv_frame *precv_frame)
fallthrough;
case WIFI_ASSOCREQ:
case WIFI_REASSOCREQ:
- _mgt_dispatcher(padapter, ptable, precv_frame);
- break;
case WIFI_PROBEREQ:
- if (check_fwstate(pmlmepriv, WIFI_AP_STATE))
- _mgt_dispatcher(padapter, ptable, precv_frame);
- else
- _mgt_dispatcher(padapter, ptable, precv_frame);
- break;
case WIFI_BEACON:
- _mgt_dispatcher(padapter, ptable, precv_frame);
- break;
case WIFI_ACTION:
_mgt_dispatcher(padapter, ptable, precv_frame);
break;
--
2.32.0


2021-08-29 12:14:56

by Pavel Skripkin

[permalink] [raw]
Subject: Re: [PATCH] staging: r8188eu: core: remove condition with no effect

On 8/29/21 12:01 PM, Saurav Girepunje wrote:
> Remove the condition with no effect (if == else) and group multiple
> cases which execute same statement in rtw_mlme_ext.c
>
> Signed-off-by: Saurav Girepunje <[email protected]>

Reviewed-by: Pavel Skripkin <[email protected]>


2021-08-29 12:50:31

by Michael Straube

[permalink] [raw]
Subject: Re: [PATCH] staging: r8188eu: core: remove condition with no effect

On 8/29/21 11:01, Saurav Girepunje wrote:
> Remove the condition with no effect (if == else) and group multiple
> cases which execute same statement in rtw_mlme_ext.c
>
> Signed-off-by: Saurav Girepunje <[email protected]>
> ---
> drivers/staging/r8188eu/core/rtw_mlme_ext.c | 9 ---------
> 1 file changed, 9 deletions(-)
>
> diff --git a/drivers/staging/r8188eu/core/rtw_mlme_ext.c b/drivers/staging/r8188eu/core/rtw_mlme_ext.c
> index 5a472a4954b0..4178b3c1ff57 100644
> --- a/drivers/staging/r8188eu/core/rtw_mlme_ext.c
> +++ b/drivers/staging/r8188eu/core/rtw_mlme_ext.c
> @@ -453,17 +453,8 @@ void mgt_dispatcher(struct adapter *padapter, struct recv_frame *precv_frame)
> fallthrough;
> case WIFI_ASSOCREQ:
> case WIFI_REASSOCREQ:
> - _mgt_dispatcher(padapter, ptable, precv_frame);
> - break;
> case WIFI_PROBEREQ:
> - if (check_fwstate(pmlmepriv, WIFI_AP_STATE))
> - _mgt_dispatcher(padapter, ptable, precv_frame);
> - else
> - _mgt_dispatcher(padapter, ptable, precv_frame);
> - break;
> case WIFI_BEACON:
> - _mgt_dispatcher(padapter, ptable, precv_frame);
> - break;
> case WIFI_ACTION:
> _mgt_dispatcher(padapter, ptable, precv_frame);
> break;
> --
> 2.32.0
>

Acked-by: Michael Straube <[email protected]>

Thanks,
Michael