From: Shivani Bhardwaj <shivanib134@gmail.com>
To: outreachy-kernel@googlegroups.com
Subject: [PATCH] Staging: rtl8192u: ieee80211_rx: Remove unnecessary code
Date: Wed, 14 Oct 2015 22:48:50 +0530 [thread overview]
Message-ID: <20151014171850.GA19220@ubuntu> (raw)
The variable frame_authorized is declared and mentioned in the code but
is not used anywhere so, it should be removed. Also, two case statements
are merged by removing an extra break.
Semantic patch used:
@@
type T;
identifier i;
constant C;
position p != e.p;
@@
- T i@p;
<+... when != i
- i = C;
...+>
Signed-off-by: Shivani Bhardwaj <shivanib134@gmail.com>
---
drivers/staging/rtl8192u/ieee80211/ieee80211_rx.c | 4 ----
1 file changed, 4 deletions(-)
diff --git a/drivers/staging/rtl8192u/ieee80211/ieee80211_rx.c b/drivers/staging/rtl8192u/ieee80211/ieee80211_rx.c
index 4b5f32d..130c852 100644
--- a/drivers/staging/rtl8192u/ieee80211/ieee80211_rx.c
+++ b/drivers/staging/rtl8192u/ieee80211/ieee80211_rx.c
@@ -899,7 +899,6 @@ int ieee80211_rx(struct ieee80211_device *ieee, struct sk_buff *skb,
struct net_device *wds = NULL;
struct sk_buff *skb2 = NULL;
struct net_device *wds = NULL;
- int frame_authorized = 0;
int from_assoc_ap = 0;
void *sta = NULL;
#endif
@@ -1106,10 +1105,7 @@ int ieee80211_rx(struct ieee80211_device *ieee, struct sk_buff *skb,
switch (hostap_handle_sta_rx(ieee, dev, skb, rx_stats,
wds != NULL)) {
case AP_RX_CONTINUE_NOT_AUTHORIZED:
- frame_authorized = 0;
- break;
case AP_RX_CONTINUE:
- frame_authorized = 1;
break;
case AP_RX_DROP:
goto rx_dropped;
--
2.1.0
next reply other threads:[~2015-10-14 17:19 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-10-14 17:18 Shivani Bhardwaj [this message]
2015-10-15 6:50 ` [Outreachy kernel] [PATCH] Staging: rtl8192u: ieee80211_rx: Remove unnecessary code Sudip Mukherjee
2015-10-15 6:52 ` Shivani Bhardwaj
2015-10-15 7:01 ` Sudip Mukherjee
2015-10-15 7:07 ` Shivani Bhardwaj
2015-10-15 7:19 ` Sudip Mukherjee
2015-10-15 7:43 ` Shivani Bhardwaj
2015-10-15 16:08 ` Julia Lawall
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=20151014171850.GA19220@ubuntu \
--to=shivanib134@gmail.com \
--cc=outreachy-kernel@googlegroups.com \
/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.