lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <87egq5c21s.fsf@rasmusvillemoes.dk>
Date:	Wed, 04 Feb 2015 13:07:59 +0100
From:	Rasmus Villemoes <linux@...musvillemoes.dk>
To:	Nicholas Mc Guire <hofrat@...dl.org>
Cc:	Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
	devel@...verdev.osuosl.org, linux-kernel@...r.kernel.org,
	Abel Moyo <abelmoyo.ab@...il.com>,
	Larry Finger <Larry.Finger@...inger.net>
Subject: Re: [PATCH] staging: rtl8188eu: core: switch with redundant cases

On Wed, Feb 04 2015, Nicholas Mc Guire <hofrat@...dl.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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ