public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] staging: ks7010: mark symbols static where possible
@ 2016-09-08 11:37 Baoyou Xie
  2016-09-12  9:19 ` Greg KH
  0 siblings, 1 reply; 5+ messages in thread
From: Baoyou Xie @ 2016-09-08 11:37 UTC (permalink / raw)
  To: gregkh, wsa; +Cc: devel, linux-kernel, arnd, baoyou.xie, xie.baoyou

We get 3 warnings when building kernel with W=1:
drivers/staging/ks7010/ks7010_sdio.c:90:6: warning: no previous prototype for 'ks_wlan_hw_sleep_doze_request' [-Wmissing-prototypes]
drivers/staging/ks7010/ks7010_sdio.c:121:6: warning: no previous prototype for 'ks_wlan_hw_sleep_wakeup_request' [-Wmissing-prototypes]
drivers/staging/ks7010/ks7010_sdio.c:174:5: warning: no previous prototype for '_ks_wlan_hw_power_save' [-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/ks7010_sdio.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/ks7010/ks7010_sdio.c b/drivers/staging/ks7010/ks7010_sdio.c
index b7337fd..466ba07 100644
--- a/drivers/staging/ks7010/ks7010_sdio.c
+++ b/drivers/staging/ks7010/ks7010_sdio.c
@@ -87,7 +87,7 @@ static int ks7010_sdio_write(struct ks_wlan_private *priv, unsigned int address,
 	return rc;
 }
 
-void ks_wlan_hw_sleep_doze_request(struct ks_wlan_private *priv)
+static void ks_wlan_hw_sleep_doze_request(struct ks_wlan_private *priv)
 {
 	unsigned char rw_data;
 	int retval;
@@ -118,7 +118,7 @@ void ks_wlan_hw_sleep_doze_request(struct ks_wlan_private *priv)
 	return;
 }
 
-void ks_wlan_hw_sleep_wakeup_request(struct ks_wlan_private *priv)
+static void ks_wlan_hw_sleep_wakeup_request(struct ks_wlan_private *priv)
 {
 	unsigned char rw_data;
 	int retval;
@@ -171,7 +171,7 @@ void ks_wlan_hw_wakeup_request(struct ks_wlan_private *priv)
 	}
 }
 
-int _ks_wlan_hw_power_save(struct ks_wlan_private *priv)
+static int _ks_wlan_hw_power_save(struct ks_wlan_private *priv)
 {
 	int rc = 0;
 	unsigned char rw_data;
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 5+ messages in thread
* [PATCH] staging: ks7010: mark symbols static where possible
@ 2016-09-04  6:38 Baoyou Xie
  2016-09-05 11:49 ` Arnd Bergmann
  2016-09-12  9:17 ` Greg KH
  0 siblings, 2 replies; 5+ messages in thread
From: Baoyou Xie @ 2016-09-04  6:38 UTC (permalink / raw)
  To: gregkh, wsa+renesas; +Cc: devel, linux-kernel, arnd, baoyou.xie, xie.baoyou

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(-)

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;
-- 
2.7.4

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

end of thread, other threads:[~2016-09-12  9:19 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-09-08 11:37 [PATCH] staging: ks7010: mark symbols static where possible Baoyou Xie
2016-09-12  9:19 ` Greg KH
  -- strict thread matches above, loose matches on Subject: below --
2016-09-04  6:38 Baoyou Xie
2016-09-05 11:49 ` Arnd Bergmann
2016-09-12  9:17 ` Greg KH

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