From patchwork Sun Sep 4 06:33:35 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Baoyou Xie X-Patchwork-Id: 75343 Delivered-To: patch@linaro.org Received: by 10.140.29.8 with SMTP id a8csp1666089qga; Sat, 3 Sep 2016 23:35:22 -0700 (PDT) X-Received: by 10.66.83.72 with SMTP id o8mr19013866pay.54.1472970922279; Sat, 03 Sep 2016 23:35:22 -0700 (PDT) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id pp7si21753596pac.15.2016.09.03.23.35.21; Sat, 03 Sep 2016 23:35:22 -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 S1752920AbcIDGfQ (ORCPT + 27 others); Sun, 4 Sep 2016 02:35:16 -0400 Received: from mail-pa0-f53.google.com ([209.85.220.53]:32848 "EHLO mail-pa0-f53.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752101AbcIDGfM (ORCPT ); Sun, 4 Sep 2016 02:35:12 -0400 Received: by mail-pa0-f53.google.com with SMTP id cm16so5153470pac.0 for ; Sat, 03 Sep 2016 23:33:59 -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=PwrnKmFPWBiLtbNQ88QVP9czenGwpY3mdSs01xRYNJ0=; b=i/OVjaVTYhIWRJUll8IUDWmw06/NvLbkDKj5Mo7Y45KmX0wqnlEkPdZBTDQdxho1C4 67w+97EupPny2akje7RT15fmzR9DYIoiL155llLQwvowPkIVObf7fBmsBVtd12dB13vf fBM1G3w1xrBEuoDxRjcyTd8cL5ltTWKJ2BxNE= 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=PwrnKmFPWBiLtbNQ88QVP9czenGwpY3mdSs01xRYNJ0=; b=duv3p+LFZab6tCuVG2JPwBUrl5se+IVsm6v3iV3D7ffAmbJN2p5eJK+g6qVLbW07nV PExu+3T2Om6MBsPSVJ2WwDrcW4izN2V+b7qakxiTkHZJe9g7ZecHMi8nR0hZtwDrugWZ AYmkvuDRTuzg0ec4OoKj/0/N6gM5sbVjJ80tOGIMDYAGnSj0Y9mjEMLeVUyNzJpmfXoB iciU3+AES8xicJmcmPnCJl6SPSYp9lTzgsKRC+MPsvLeU/PIDVbDYfxUtoOxogzdUybZ 5uRe849wIG2jfeCWNFOWKY02BAQrIb4ggjuEJAQJNg3Ij+txO7Rb1aO2jFatVbZ2FfWc hdlg== X-Gm-Message-State: AE9vXwMRHgbe8qcjXEGMBByO+VNafOa3Ys3VbxSbCsKtKCmbshC85EdG22KT7cxW4Otzulka X-Received: by 10.66.87.6 with SMTP id t6mr51094380paz.141.1472970838931; Sat, 03 Sep 2016 23:33:58 -0700 (PDT) Received: from localhost.localdomain ([104.237.91.154]) by smtp.gmail.com with ESMTPSA id o80sm25353730pfa.67.2016.09.03.23.33.51 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sat, 03 Sep 2016 23:33:58 -0700 (PDT) From: Baoyou Xie To: gregkh@linuxfoundation.org, mateusz.kulikowski@gmail.com, bhumirks@gmail.com, davem@davemloft.net, seanm@seanm.ca, fw@strlen.de, bhaktipriya96@gmail.com, amitoj1606@gmail.com Cc: devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org, arnd@arndb.de, baoyou.xie@linaro.org, xie.baoyou@zte.com.cn Subject: [PATCH] Staging: rtl8192e: mark symbols static where possible Date: Sun, 4 Sep 2016 14:33:35 +0800 Message-Id: <1472970815-4460-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 a few warnings when building kernel with W=1: drivers/staging/rtl8192e/rtllib_softmac.c:279:13: warning: no previous declaration for 'softmac_ps_mgmt_xmit' [-Wmissing-declarations] drivers/staging/rtl8192e/rtllib_softmac.c:773:24: warning: no previous declaration for 'rtllib_authentication_req' [-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. In addition, some of these functions are declared in different files, it looks like that we need to clean the codes of this driver up, but we can repress these warnings first, then clean it up. so this patch marks these functions with 'static' now. Signed-off-by: Baoyou Xie --- drivers/staging/rtl8192e/rtllib_softmac.c | 41 +++++++++++++++++++------------ 1 file changed, 26 insertions(+), 16 deletions(-) -- 2.7.4 diff --git a/drivers/staging/rtl8192e/rtllib_softmac.c b/drivers/staging/rtl8192e/rtllib_softmac.c index 62154e3..b7f680f 100644 --- a/drivers/staging/rtl8192e/rtllib_softmac.c +++ b/drivers/staging/rtl8192e/rtllib_softmac.c @@ -276,8 +276,9 @@ inline void softmac_mgmt_xmit(struct sk_buff *skb, struct rtllib_device *ieee) } } -inline void softmac_ps_mgmt_xmit(struct sk_buff *skb, - struct rtllib_device *ieee) +static inline void +softmac_ps_mgmt_xmit(struct sk_buff *skb, + struct rtllib_device *ieee) { short single = ieee->softmac_features & IEEE_SOFTMAC_SINGLE_QUEUE; struct rtllib_hdr_3addr *header = @@ -770,8 +771,10 @@ void rtllib_start_scan_syncro(struct rtllib_device *ieee, u8 is_mesh) } EXPORT_SYMBOL(rtllib_start_scan_syncro); -inline struct sk_buff *rtllib_authentication_req(struct rtllib_network *beacon, - struct rtllib_device *ieee, int challengelen, u8 *daddr) +static inline struct sk_buff * +rtllib_authentication_req(struct rtllib_network *beacon, + struct rtllib_device *ieee, + int challengelen, u8 *daddr) { struct sk_buff *skb; struct rtllib_authentication *auth; @@ -1130,7 +1133,7 @@ static void rtllib_resp_to_probe(struct rtllib_device *ieee, u8 *dest) } -inline int SecIsInPMKIDList(struct rtllib_device *ieee, u8 *bssid) +static inline int SecIsInPMKIDList(struct rtllib_device *ieee, u8 *bssid) { int i = 0; @@ -1146,8 +1149,9 @@ inline int SecIsInPMKIDList(struct rtllib_device *ieee, u8 *bssid) return i; } -inline struct sk_buff *rtllib_association_req(struct rtllib_network *beacon, - struct rtllib_device *ieee) +static inline struct sk_buff * +rtllib_association_req(struct rtllib_network *beacon, + struct rtllib_device *ieee) { struct sk_buff *skb; struct rtllib_assoc_request_frame *hdr; @@ -2209,8 +2213,9 @@ static void rtllib_process_action(struct rtllib_device *ieee, } } -inline int rtllib_rx_assoc_resp(struct rtllib_device *ieee, struct sk_buff *skb, - struct rtllib_rx_stats *rx_stats) +static inline int +rtllib_rx_assoc_resp(struct rtllib_device *ieee, struct sk_buff *skb, + struct rtllib_rx_stats *rx_stats) { u16 errcode; int aid; @@ -2344,8 +2349,9 @@ static void rtllib_rx_auth_resp(struct rtllib_device *ieee, struct sk_buff *skb) } } -inline int rtllib_rx_auth(struct rtllib_device *ieee, struct sk_buff *skb, - struct rtllib_rx_stats *rx_stats) +static inline int +rtllib_rx_auth(struct rtllib_device *ieee, struct sk_buff *skb, + struct rtllib_rx_stats *rx_stats) { if (ieee->softmac_features & IEEE_SOFTMAC_ASSOCIATE) { @@ -2361,7 +2367,8 @@ inline int rtllib_rx_auth(struct rtllib_device *ieee, struct sk_buff *skb, return 0; } -inline int rtllib_rx_deauth(struct rtllib_device *ieee, struct sk_buff *skb) +static inline int +rtllib_rx_deauth(struct rtllib_device *ieee, struct sk_buff *skb) { struct rtllib_hdr_3addr *header = (struct rtllib_hdr_3addr *) skb->data; u16 frame_ctl; @@ -3397,8 +3404,9 @@ static int rtllib_wpa_set_encryption(struct rtllib_device *ieee, return ret; } -inline struct sk_buff *rtllib_disauth_skb(struct rtllib_network *beacon, - struct rtllib_device *ieee, u16 asRsn) +static inline struct sk_buff * +rtllib_disauth_skb(struct rtllib_network *beacon, + struct rtllib_device *ieee, u16 asRsn) { struct sk_buff *skb; struct rtllib_disauth *disauth; @@ -3423,8 +3431,9 @@ inline struct sk_buff *rtllib_disauth_skb(struct rtllib_network *beacon, return skb; } -inline struct sk_buff *rtllib_disassociate_skb(struct rtllib_network *beacon, - struct rtllib_device *ieee, u16 asRsn) +static inline struct sk_buff * +rtllib_disassociate_skb(struct rtllib_network *beacon, + struct rtllib_device *ieee, u16 asRsn) { struct sk_buff *skb; struct rtllib_disassoc *disass;