[PATCH] staging: rtl8192u: Remove unnecessary function and its call

From: simran singhal
Date: Sun Mar 05 2017 - 08:24:56 EST


The function ieee80211_tkip_null on being called, simply returns
back. The function hasn't been mentioned in the TODO and doesn't have
FIXME code around. Hence, ieee80211_tkip_null and its calls have
been removed.

This was done using Coccinelle.

@@
identifier f;
@@

void f(...) {

-return;

}

Signed-off-by: simran singhal <singhalsimran0@xxxxxxxxx>
---
drivers/staging/rtl8192u/ieee80211/ieee80211.h | 3 ---
drivers/staging/rtl8192u/ieee80211/ieee80211_crypt_tkip.c | 5 -----
drivers/staging/rtl8192u/ieee80211/ieee80211_module.c | 1 -
3 files changed, 9 deletions(-)

diff --git a/drivers/staging/rtl8192u/ieee80211/ieee80211.h b/drivers/staging/rtl8192u/ieee80211/ieee80211.h
index 176083e..1babc37 100644
--- a/drivers/staging/rtl8192u/ieee80211/ieee80211.h
+++ b/drivers/staging/rtl8192u/ieee80211/ieee80211.h
@@ -236,8 +236,6 @@ struct cb_desc {

#define ieee80211_ccmp_null ieee80211_ccmp_null_rsl

-#define ieee80211_tkip_null ieee80211_tkip_null_rsl
-
#define free_ieee80211 free_ieee80211_rsl
#define alloc_ieee80211 alloc_ieee80211_rsl

@@ -2266,7 +2264,6 @@ void ieee80211_ps_tx_ack(struct ieee80211_device *ieee, short success);
void softmac_mgmt_xmit(struct sk_buff *skb, struct ieee80211_device *ieee);

/* ieee80211_crypt_ccmp&tkip&wep.c */
-void ieee80211_tkip_null(void);

int ieee80211_crypto_init(void);
void ieee80211_crypto_deinit(void);
diff --git a/drivers/staging/rtl8192u/ieee80211/ieee80211_crypt_tkip.c b/drivers/staging/rtl8192u/ieee80211/ieee80211_crypt_tkip.c
index df94021..54ca69e 100644
--- a/drivers/staging/rtl8192u/ieee80211/ieee80211_crypt_tkip.c
+++ b/drivers/staging/rtl8192u/ieee80211/ieee80211_crypt_tkip.c
@@ -785,8 +785,3 @@ void __exit ieee80211_crypto_tkip_exit(void)
ieee80211_unregister_crypto_ops(&ieee80211_crypt_tkip);
}

-void ieee80211_tkip_null(void)
-{
-// printk("============>%s()\n", __func__);
- return;
-}
diff --git a/drivers/staging/rtl8192u/ieee80211/ieee80211_module.c b/drivers/staging/rtl8192u/ieee80211/ieee80211_module.c
index a791175..bb52eee 100644
--- a/drivers/staging/rtl8192u/ieee80211/ieee80211_module.c
+++ b/drivers/staging/rtl8192u/ieee80211/ieee80211_module.c
@@ -176,7 +176,6 @@ struct net_device *alloc_ieee80211(int sizeof_priv)
}

/* These function were added to load crypte module autoly */
- ieee80211_tkip_null();

return dev;

--
2.7.4