From: Rasmus Villemoes <linux@rasmusvillemoes.dk>
To: Nicholas Mc Guire <hofrat@osadl.org>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org,
Abel Moyo <abelmoyo.ab@gmail.com>,
Larry Finger <Larry.Finger@lwfinger.net>
Subject: Re: [PATCH] staging: rtl8188eu: core: switch with redundant cases
Date: Wed, 04 Feb 2015 13:07:59 +0100 [thread overview]
Message-ID: <87egq5c21s.fsf@rasmusvillemoes.dk> (raw)
In-Reply-To: <1423047878-5783-1-git-send-email-hofrat@osadl.org> (Nicholas Mc Guire's message of "Wed, 4 Feb 2015 06:04:38 -0500")
On Wed, Feb 04 2015, Nicholas Mc Guire <hofrat@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
prev parent reply other threads:[~2015-02-04 12:08 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-02-04 11:04 [PATCH] staging: rtl8188eu: core: switch with redundant cases Nicholas Mc Guire
2015-02-04 11:42 ` Dan Carpenter
2015-02-04 11:43 ` Dan Carpenter
2015-02-04 13:16 ` Nicholas Mc Guire
2015-02-04 12:07 ` Rasmus Villemoes [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87egq5c21s.fsf@rasmusvillemoes.dk \
--to=linux@rasmusvillemoes.dk \
--cc=Larry.Finger@lwfinger.net \
--cc=abelmoyo.ab@gmail.com \
--cc=devel@driverdev.osuosl.org \
--cc=gregkh@linuxfoundation.org \
--cc=hofrat@osadl.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.