From patchwork Fri Sep 23 13:31:18 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Baoyou Xie X-Patchwork-Id: 76866 Delivered-To: patch@linaro.org Received: by 10.140.106.72 with SMTP id d66csp571788qgf; Fri, 23 Sep 2016 06:31:41 -0700 (PDT) X-Received: by 10.98.21.85 with SMTP id 82mr12588036pfv.81.1474637501819; Fri, 23 Sep 2016 06:31:41 -0700 (PDT) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id s69si7949366pfi.281.2016.09.23.06.31.41; Fri, 23 Sep 2016 06:31:41 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S966212AbcIWNbj (ORCPT + 27 others); Fri, 23 Sep 2016 09:31:39 -0400 Received: from mail-pa0-f45.google.com ([209.85.220.45]:35192 "EHLO mail-pa0-f45.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S965854AbcIWNbd (ORCPT ); Fri, 23 Sep 2016 09:31:33 -0400 Received: by mail-pa0-f45.google.com with SMTP id oz2so40431479pac.2 for ; Fri, 23 Sep 2016 06:31:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id; bh=FO24EWH5/TNcxui9/7qF7UkTZqvC/dEBiFeD0EUkq6U=; b=U0MJhRA/xochApsMbzmVIBbRwhHzTm3EbolC5PBj0uTFLTQXKXYaOtUONR4FI3Xb0G i5/TnXXrW1OEXa3MwKT8pKpYeEWm/pjUwVQv33ATxbLfEhu1iE63uVWrdo6ZFzTMt2Q7 08tngor0NZebmMc2DBe5WRRVCFZuIDs1RZqwM= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=FO24EWH5/TNcxui9/7qF7UkTZqvC/dEBiFeD0EUkq6U=; b=F+FVMlNWYJ3p6qI233vFSlL93JnbfP7/1ZP6r7NIpzzzUgIR8t5586SqkGxmMR0kSZ KqZUC9u113C+s+EbHvaxQpuOF4quv6kcazsB4avZfAXKlqgSKIz6SU4Yj1mRzBlxuwNX OWnmvgD6T3Z6GshtdTpDTFNil2UXQgw1EX5zOSixsg7ochfyvX4S6BhQ9BFV2VvcmLFb au55dUoQI6EAS3jUuoX/ViHLV0bnzcgoDAGwNQe3SQuP5VQOgnuCOVtkjuxkB1RDDcRH haZKB94s5IQkJ7UOl9N7j7fOSLyrZkiTxe0vFiMFWPCq47oOb/YgIqr5sLbza8y1VXID 9UOg== X-Gm-Message-State: AE9vXwPpumb0IzDZhGyD3wks8DfYbXqQXMGL7d71SIP6sq8pvRECdi0SGx/vIfX6uq8AFEkA X-Received: by 10.66.132.100 with SMTP id ot4mr12684190pab.84.1474637492927; Fri, 23 Sep 2016 06:31:32 -0700 (PDT) Received: from localhost.localdomain ([45.56.152.27]) by smtp.gmail.com with ESMTPSA id nc13sm11759865pab.43.2016.09.23.06.31.28 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 23 Sep 2016 06:31:32 -0700 (PDT) From: Baoyou Xie To: gregkh@linuxfoundation.org, amitoj1606@gmail.com, bhumirks@gmail.com, davem@davemloft.net, fw@strlen.de, binoy.jayan@linaro.org, janani.rvchndrn@gmail.com, bhaktipriya96@gmail.com Cc: devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org, baoyou.xie@linaro.org, xie.baoyou@zte.com.cn, arnd@arndb.de Subject: [PATCH] staging: rtl8192u: ieee80211: ieee80211_softmac: mark symbols static where possible Date: Fri, 23 Sep 2016 21:31:18 +0800 Message-Id: <1474637478-4931-1-git-send-email-baoyou.xie@linaro.org> X-Mailer: git-send-email 2.7.4 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org We get 5 warnings when building kernel with W=1: drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c:287:13: warning: no previous declaration for 'softmac_ps_mgmt_xmit' [-Wmissing-declarations] drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c:323:24: warning: no previous declaration for 'ieee80211_probe_req' [-Wmissing-declarations] drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c:643:24: warning: no previous declaration for 'ieee80211_authentication_req' [-Wmissing-declarations] drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c:981:24: warning: no previous declaration for 'ieee80211_association_req' [-Wmissing-declarations] drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c:3094:24: warning: no previous declaration for 'ieee80211_disassociate_skb' [-Wmissing-declarations] In fact, these functions are only used in the file in which they are declared and don't need a declaration, but can be made static. so this patch marks these functions with 'static'. Signed-off-by: Baoyou Xie --- drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) -- 2.7.4 diff --git a/drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c b/drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c index 49db1b7..4c2b341 100644 --- a/drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c +++ b/drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c @@ -284,7 +284,8 @@ inline void softmac_mgmt_xmit(struct sk_buff *skb, struct ieee80211_device *ieee } } -inline void softmac_ps_mgmt_xmit(struct sk_buff *skb, struct ieee80211_device *ieee) +static inline void +softmac_ps_mgmt_xmit(struct sk_buff *skb, struct ieee80211_device *ieee) { short single = ieee->softmac_features & IEEE_SOFTMAC_SINGLE_QUEUE; @@ -320,7 +321,7 @@ inline void softmac_ps_mgmt_xmit(struct sk_buff *skb, struct ieee80211_device *i //dev_kfree_skb_any(skb);//edit by thomas } -inline struct sk_buff *ieee80211_probe_req(struct ieee80211_device *ieee) +static inline struct sk_buff *ieee80211_probe_req(struct ieee80211_device *ieee) { unsigned int len, rate_len; u8 *tag; @@ -640,8 +641,9 @@ void ieee80211_start_scan_syncro(struct ieee80211_device *ieee) } EXPORT_SYMBOL(ieee80211_start_scan_syncro); -inline struct sk_buff *ieee80211_authentication_req(struct ieee80211_network *beacon, - struct ieee80211_device *ieee, int challengelen) +static inline struct sk_buff * +ieee80211_authentication_req(struct ieee80211_network *beacon, + struct ieee80211_device *ieee, int challengelen) { struct sk_buff *skb; struct ieee80211_authentication *auth; @@ -978,7 +980,9 @@ static void ieee80211_resp_to_probe(struct ieee80211_device *ieee, u8 *dest) } -inline struct sk_buff *ieee80211_association_req(struct ieee80211_network *beacon,struct ieee80211_device *ieee) +static inline struct sk_buff * +ieee80211_association_req(struct ieee80211_network *beacon, + struct ieee80211_device *ieee) { struct sk_buff *skb; //unsigned long flags; @@ -3091,7 +3095,7 @@ static int ieee80211_wpa_set_encryption(struct ieee80211_device *ieee, return ret; } -inline struct sk_buff *ieee80211_disassociate_skb( +static inline struct sk_buff *ieee80211_disassociate_skb( struct ieee80211_network *beacon, struct ieee80211_device *ieee, u8 asRsn)