From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752620AbdCENYd (ORCPT ); Sun, 5 Mar 2017 08:24:33 -0500 Received: from mail-pf0-f193.google.com ([209.85.192.193]:32820 "EHLO mail-pf0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751359AbdCENYb (ORCPT ); Sun, 5 Mar 2017 08:24:31 -0500 Date: Sun, 5 Mar 2017 18:54:27 +0530 From: simran singhal To: gregkh@linuxfoundation.org Cc: devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org, outreachy-kernel@googlegroups.com Subject: [PATCH] staging: rtl8192u: Remove unnecessary function and its call Message-ID: <20170305132426.GA19802@singhal-Inspiron-5558> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- 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