All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Staging: wilc1000: coreconfigurator: Remove unnecessary wrapper function
@ 2015-10-22 19:20 Shivani Bhardwaj
  2015-10-22 19:29 ` [Outreachy kernel] " Julia Lawall
  0 siblings, 1 reply; 7+ messages in thread
From: Shivani Bhardwaj @ 2015-10-22 19:20 UTC (permalink / raw)
  To: outreachy-kernel

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



^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2015-10-23  6:33 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-10-22 19:20 [PATCH] Staging: wilc1000: coreconfigurator: Remove unnecessary wrapper function Shivani Bhardwaj
2015-10-22 19:29 ` [Outreachy kernel] " 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

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.