LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Nicholas Mc Guire <hofrat@osadl.org>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: navin patidar <navin.patidar@gmail.com>,
Larry Finger <Larry.Finger@lwfinger.net>,
Abel Moyo <abelmoyo.ab@gmail.com>,
devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org,
Nicholas Mc Guire <hofrat@osadl.org>
Subject: [PATCH v2] staging: rtl8188eu: core: switch with redundant cases
Date: Thu, 5 Feb 2015 09:21:32 -0500 [thread overview]
Message-ID: <1423146092-8136-1-git-send-email-hofrat@osadl.org> (raw)
A few redundant switch cases as well as a redundant if/else
within one of the cases was consolidated to a single call.
case WIFI_REASSOCREQ,WIFI_PROBEREQ,WIFI_BEACON,WIFI_ACTION all have the
same effect - notably also both the if and else in the WIFI_PROBEREQ case.
These redundant cases could all be dropped and consolidated into the
default but for documentation they are combined into a fall through case.
Signed-off-by: Nicholas Mc Guire <hofrat@osadl.org>
---
v2: verified that check_fwstate() has no side-effects requested by
Rasmus Villemoes <linux@rasmusvillemoes.dk>, and fixed up the log
message based on feedback from Dan Carpenter
<dan.carpenter@oracle.com> (hope this is better now)
Patch was only compile-tested for x86_64_defconfig + CONFIG_STAGING=y
CONFIG_R8188EU=m
Patch is against 3.19.0-rc7 (localversion-next is -next-20150204)
drivers/staging/rtl8188eu/core/rtw_mlme_ext.c | 9 ---------
1 file changed, 9 deletions(-)
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);
- break;
case WIFI_BEACON:
- _mgt_dispatcher(padapter, ptable, precv_frame);
- break;
case WIFI_ACTION:
_mgt_dispatcher(padapter, ptable, precv_frame);
break;
--
1.7.10.4
reply other threads:[~2015-02-05 14:25 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=1423146092-8136-1-git-send-email-hofrat@osadl.org \
--to=hofrat@osadl.org \
--cc=Larry.Finger@lwfinger.net \
--cc=abelmoyo.ab@gmail.com \
--cc=devel@driverdev.osuosl.org \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=navin.patidar@gmail.com \
--subject='Re: [PATCH v2] staging: rtl8188eu: core: switch with redundant cases' \
/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
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).