mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] staging: rtl8821ae: fix sparse warning for static declarations
@ 2014-09-24 15:32 Mathieu OTHACEHE
  0 siblings, 0 replies; 2+ messages in thread
From: Mathieu OTHACEHE @ 2014-09-24 15:32 UTC (permalink / raw)
  To: gregkh, standby24x7, hans, anders.darander, joe, sachin.kamat,
	linux, gokul.linux
  Cc: devel, linux-kernel, Mathieu OTHACEHE

This patch fixes the following sparse warnings:

drivers/staging/rtl8821ae/pci.c:52:4: warning: symbol '_rtl_mac_to_hwqueue' was not declared. Should it be static?
drivers/staging/rtl8821ae/pci.c:365:6: warning: symbol 'rtl_pci_check_buddy_priv' was not declared. Should it be static?
drivers/staging/rtl8821ae/pci.c:409:6: warning: symbol 'rtl_pci_get_linkcontrol_field' was not declared. Should it be static?
drivers/staging/rtl8821ae/pci.c:1748:6: warning: symbol 'rtl_pci_deinit' was not declared. Should it be static?
drivers/staging/rtl8821ae/pci.c:1763:5: warning: symbol 'rtl_pci_init' was not declared. Should it be static?
drivers/staging/rtl8821ae/pci.c:1780:5: warning: symbol 'rtl_pci_start' was not declared. Should it be static?
drivers/staging/rtl8821ae/pci.c:1814:6: warning: symbol 'rtl_pci_stop' was not declared. Should it be static?
drivers/staging/rtl8821ae/pci.c:2105:21: warning: symbol 'hw_export' was not declared. Should it be static?

Signed-off-by: Mathieu OTHACEHE <m.othacehe@gmail.com>
---
This patch is part of task 16 of the eudyptula challenge
 drivers/staging/rtl8821ae/pci.c | 18 +++++++++---------
 1 file changed, 9 insertions(+), 9 deletions(-)

diff --git a/drivers/staging/rtl8821ae/pci.c b/drivers/staging/rtl8821ae/pci.c
index 2995230..a332ede 100644
--- a/drivers/staging/rtl8821ae/pci.c
+++ b/drivers/staging/rtl8821ae/pci.c
@@ -49,7 +49,7 @@ static const u8 ac_to_hwq[] = {
 	BK_QUEUE
 };
 
-u8 _rtl_mac_to_hwqueue(struct ieee80211_hw *hw,
+static u8 _rtl_mac_to_hwqueue(struct ieee80211_hw *hw,
 		struct sk_buff *skb)
 {
 	struct rtl_hal *rtlhal = rtl_hal(rtl_priv(hw));
@@ -362,8 +362,8 @@ static bool rtl_pci_get_amd_l1_patch(struct ieee80211_hw *hw)
 	return status;
 }
 
-bool rtl_pci_check_buddy_priv(struct ieee80211_hw *hw,
-        		      struct rtl_priv **buddy_priv)
+static bool rtl_pci_check_buddy_priv(struct ieee80211_hw *hw,
+				     struct rtl_priv **buddy_priv)
 {
 	struct rtl_priv *rtlpriv = rtl_priv(hw);
 	struct rtl_pci_priv *pcipriv = rtl_pcipriv(hw);
@@ -406,7 +406,7 @@ bool rtl_pci_check_buddy_priv(struct ieee80211_hw *hw,
 	return b_find_buddy_priv;
 }
 
-void rtl_pci_get_linkcontrol_field(struct ieee80211_hw *hw)
+static void rtl_pci_get_linkcontrol_field(struct ieee80211_hw *hw)
 {
 	struct rtl_pci_priv *pcipriv = rtl_pcipriv(hw);
 	u8 capabilityoffset = pcipriv->ndis_adapter.pcibridge_pciehdr_offset;
@@ -1745,7 +1745,7 @@ static void rtl_pci_flush(struct ieee80211_hw *hw, u32 queues, bool drop)
 	}
 }
 
-void rtl_pci_deinit(struct ieee80211_hw *hw)
+static void rtl_pci_deinit(struct ieee80211_hw *hw)
 {
 	struct rtl_priv *rtlpriv = rtl_priv(hw);
 	struct rtl_pci *rtlpci = rtl_pcidev(rtl_pcipriv(hw));
@@ -1760,7 +1760,7 @@ void rtl_pci_deinit(struct ieee80211_hw *hw)
 
 }
 
-int rtl_pci_init(struct ieee80211_hw *hw, struct pci_dev *pdev)
+static int rtl_pci_init(struct ieee80211_hw *hw, struct pci_dev *pdev)
 {
 	struct rtl_priv *rtlpriv = rtl_priv(hw);
 	int err;
@@ -1777,7 +1777,7 @@ int rtl_pci_init(struct ieee80211_hw *hw, struct pci_dev *pdev)
 	return 1;
 }
 
-int rtl_pci_start(struct ieee80211_hw *hw)
+static int rtl_pci_start(struct ieee80211_hw *hw)
 {
 	struct rtl_priv *rtlpriv = rtl_priv(hw);
 	struct rtl_hal *rtlhal = rtl_hal(rtl_priv(hw));
@@ -1811,7 +1811,7 @@ int rtl_pci_start(struct ieee80211_hw *hw)
 	return 0;
 }
 
-void rtl_pci_stop(struct ieee80211_hw *hw)
+static void rtl_pci_stop(struct ieee80211_hw *hw)
 {
 	struct rtl_priv *rtlpriv = rtl_priv(hw);
 	struct rtl_ps_ctl *ppsc = rtl_psc(rtl_priv(hw));
@@ -2102,7 +2102,7 @@ static int rtl_pci_intr_mode_decide(struct ieee80211_hw *hw)
 
 /* this is used for other modules get
  * hw pointer in rtl_pci_get_hw_pointer */
-struct ieee80211_hw *hw_export = NULL;
+static struct ieee80211_hw *hw_export;
 
 int rtl_pci_probe(struct pci_dev *pdev,
                   const struct pci_device_id *id)
-- 
2.1.0


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

* [PATCH] staging: rtl8821ae: fix sparse warning for static declarations
@ 2014-06-01 15:18 Marcus Farkas
  0 siblings, 0 replies; 2+ messages in thread
From: Marcus Farkas @ 2014-06-01 15:18 UTC (permalink / raw)
  To: gregkh; +Cc: larry.finger, devel, linux-kernel, linville

This commit fixes the following sparse warnings in ps.c:
  - 702: warning: symbol 'rtl_p2p_noa_ie' was not declared. Should it be static?
  - 802: warning: symbol 'rtl_p2p_action_ie' was not declared. Should it be static?

Signed-off-by: Marcus Farkas <marcus.farkas@finitebox.com>
---
 drivers/staging/rtl8821ae/ps.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/rtl8821ae/ps.c b/drivers/staging/rtl8821ae/ps.c
index 5a9bbf0..db9a02f 100644
--- a/drivers/staging/rtl8821ae/ps.c
+++ b/drivers/staging/rtl8821ae/ps.c
@@ -699,7 +699,8 @@ void rtl_swlps_wq_callback(void *data)
 }
 
 
-void rtl_p2p_noa_ie(struct ieee80211_hw *hw, void *data, unsigned int len)
+static void rtl_p2p_noa_ie(struct ieee80211_hw *hw, void *data,
+			   unsigned int len)
 {
 	struct rtl_priv *rtlpriv = rtl_priv(hw);
 	struct ieee80211_mgmt *mgmt = (void *)data;
@@ -799,7 +800,8 @@ void rtl_p2p_noa_ie(struct ieee80211_hw *hw, void *data, unsigned int len)
 	}
 }
 
-void rtl_p2p_action_ie(struct ieee80211_hw *hw, void *data, unsigned int len)
+static void rtl_p2p_action_ie(struct ieee80211_hw *hw, void *data,
+			      unsigned int len)
 {
 	struct rtl_priv *rtlpriv = rtl_priv(hw);
 	struct ieee80211_mgmt *mgmt = (void *)data;
-- 
1.9.3


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

end of thread, other threads:[~2014-09-24 15:32 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-09-24 15:32 [PATCH] staging: rtl8821ae: fix sparse warning for static declarations Mathieu OTHACEHE
  -- strict thread matches above, loose matches on Subject: below --
2014-06-01 15:18 Marcus Farkas

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®