[PATCH] staging: rtl8188eu: core: switch with redundant cases
Rasmus Villemoes
linux at rasmusvillemoes.dk
Wed Feb 4 12:07:59 UTC 2015
On Wed, Feb 04 2015, Nicholas Mc Guire <hofrat at osadl.org> wrote:
> A few redundant switch cases as well as a redundant if/else
> within one of the cases was consolidated to a single call.
> The cases are intentionally retained for documentation purposes.
>
[...]
> diff --git a/drivers/staging/rtl8188eu/core/rtw_mlme_ext.c b/drivers/staging/rtl8188eu/core/rtw_mlme_ext.c
> index 28918201..cd12dd7 100644
> --- a/drivers/staging/rtl8188eu/core/rtw_mlme_ext.c
> +++ b/drivers/staging/rtl8188eu/core/rtw_mlme_ext.c
> @@ -484,17 +484,8 @@ void mgt_dispatcher(struct adapter *padapter, struct recv_frame *precv_frame)
> /* fall through */
> 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);
It is highly unlikely that a function called check_fwstate has side
effects, but it might be nice checking that and making a note in the
commit log.
Rasmus
More information about the devel
mailing list