From: Shivani Bhardwaj <shivanib134@gmail.com>
To: outreachy-kernel@googlegroups.com
Subject: [PATCH] Staging: wilc1000: coreconfigurator: Remove unnecessary wrapper function
Date: Fri, 23 Oct 2015 00:50:06 +0530 [thread overview]
Message-ID: <20151022192006.GA23576@ubuntu> (raw)
Remove the function get_current_channel() and replace its calls by
get_current_channel_802_11n() as the former function's definition
involves only returning the value of latter function.
Semantic patch used to find out the issue:
@@
identifier f,g;
@@
*f(...) {
return g(...); }
Signed-off-by: Shivani Bhardwaj <shivanib134@gmail.com>
---
drivers/staging/wilc1000/coreconfigurator.c | 14 +++++---------
1 file changed, 5 insertions(+), 9 deletions(-)
diff --git a/drivers/staging/wilc1000/coreconfigurator.c b/drivers/staging/wilc1000/coreconfigurator.c
index 6dfe26d..f20f2f3 100644
--- a/drivers/staging/wilc1000/coreconfigurator.c
+++ b/drivers/staging/wilc1000/coreconfigurator.c
@@ -331,13 +331,6 @@ u8 get_current_channel_802_11n(u8 *pu8msa, u16 u16RxLen)
return 0; /* no MIB here */
}
-u8 get_current_channel(u8 *pu8msa, u16 u16RxLen)
-{
- /* Extract current channel information from */
- /* the beacon/probe response frame */
- return get_current_channel_802_11n(pu8msa, u16RxLen);
-}
-
/**
* @brief parses the received 'N' message
* @details
@@ -425,8 +418,11 @@ s32 parse_network_info(u8 *pu8MsgBuffer, tstrNetworkInfo **ppstrNetworkInfo)
/* Get BSSID */
get_BSSID(pu8msa, pstrNetworkInfo->au8bssid);
- /* Get the current channel */
- pstrNetworkInfo->u8channel = get_current_channel(pu8msa, (u16RxLen + FCS_LEN));
+ /*
+ * Extract current channel information from
+ * the beacon/probe response frame
+ */
+ pstrNetworkInfo->u8channel = get_current_channel_802_11n(pu8msa, (u16RxLen + FCS_LEN));
/* Get beacon period */
u8index = (MAC_HDR_LEN + TIME_STAMP_LEN);
--
2.1.0
next reply other threads:[~2015-10-22 19:20 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-10-22 19:20 Shivani Bhardwaj [this message]
2015-10-22 19:29 ` [Outreachy kernel] [PATCH] Staging: wilc1000: coreconfigurator: Remove unnecessary wrapper function Julia Lawall
2015-10-22 22:45 ` Shivani Bhardwaj
2015-10-23 5:20 ` Julia Lawall
2015-10-23 6:19 ` Shivani Bhardwaj
2015-10-23 6:24 ` Julia Lawall
2015-10-23 6:33 ` Shivani Bhardwaj
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=20151022192006.GA23576@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.