diff mbox

staging: ks7010: mark symbols static where possible

Message ID 1472971119-4560-1-git-send-email-baoyou.xie@linaro.org
State New
Headers show

Commit Message

Baoyou Xie Sept. 4, 2016, 6:38 a.m. UTC
We get 2 warnings when building kernel with W=1:
drivers/staging/ks7010/ks_hostif.c:72:6: warning: no previous prototype for 'ks_wlan_hw_wakeup_task' [-Wmissing-prototypes]
drivers/staging/ks7010/ks_hostif.c:1508:6: warning: no previous prototype for 'hostif_infrastructure_set2_request' [-Wmissing-prototypes]

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 <baoyou.xie@linaro.org>

---
 drivers/staging/ks7010/ks_hostif.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

-- 
2.7.4

Comments

Arnd Bergmann Sept. 5, 2016, 11:49 a.m. UTC | #1
On Sunday, September 4, 2016 2:38:39 PM CEST Baoyou Xie wrote:
> We get 2 warnings when building kernel with W=1:

> drivers/staging/ks7010/ks_hostif.c:72:6: warning: no previous prototype for 'ks_wlan_hw_wakeup_task' [-Wmissing-prototypes]

> drivers/staging/ks7010/ks_hostif.c:1508:6: warning: no previous prototype for 'hostif_infrastructure_set2_request' [-Wmissing-prototypes]

> 

> 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 <baoyou.xie@linaro.org>

> 


Acked-by: Arnd Bergmann <arnd@arndb.de>
Greg KH Sept. 12, 2016, 9:17 a.m. UTC | #2
On Sun, Sep 04, 2016 at 02:38:39PM +0800, Baoyou Xie wrote:
> We get 2 warnings when building kernel with W=1:

> drivers/staging/ks7010/ks_hostif.c:72:6: warning: no previous prototype for 'ks_wlan_hw_wakeup_task' [-Wmissing-prototypes]

> drivers/staging/ks7010/ks_hostif.c:1508:6: warning: no previous prototype for 'hostif_infrastructure_set2_request' [-Wmissing-prototypes]

> 

> 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 <baoyou.xie@linaro.org>

> ---

>  drivers/staging/ks7010/ks_hostif.c | 4 ++--

>  1 file changed, 2 insertions(+), 2 deletions(-)


This patch is already in my tree :(
diff mbox

Patch

diff --git a/drivers/staging/ks7010/ks_hostif.c b/drivers/staging/ks7010/ks_hostif.c
index a8822fe..71b6ba2 100644
--- a/drivers/staging/ks7010/ks_hostif.c
+++ b/drivers/staging/ks7010/ks_hostif.c
@@ -69,7 +69,7 @@  inline u32 get_DWORD(struct ks_wlan_private *priv)
 	return data;
 }
 
-void ks_wlan_hw_wakeup_task(struct work_struct *work)
+static void ks_wlan_hw_wakeup_task(struct work_struct *work)
 {
 	struct ks_wlan_private *priv =
 	    container_of(work, struct ks_wlan_private, ks_wlan_wakeup_task);
@@ -1505,7 +1505,7 @@  void hostif_infrastructure_set_request(struct ks_wlan_private *priv)
 	ks_wlan_hw_tx(priv, pp, hif_align_size(sizeof(*pp)), NULL, NULL, NULL);
 }
 
-void hostif_infrastructure_set2_request(struct ks_wlan_private *priv)
+static void hostif_infrastructure_set2_request(struct ks_wlan_private *priv)
 {
 	struct hostif_infrastructure_set2_request_t *pp;
 	uint16_t capability;