linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] fix:gpio: mark symbols static where possible
@ 2016-08-27 16:27 Baoyou Xie
  2016-08-29 12:14 ` Kalle Valo
  0 siblings, 1 reply; 2+ messages in thread
From: Baoyou Xie @ 2016-08-27 16:27 UTC (permalink / raw)
  To: ath9k-devel, kvalo
  Cc: linux-wireless, ath9k-devel, netdev, linux-kernel, arnd,
	baoyou.xie, xie.baoyou

We get 1 warning about global functions without a declaration
in the ath9k gpio driver when building with W=1:
drivers/net/wireless/ath/ath9k/gpio.c:25:6: warning: no previous prototype for 'ath_fill_led_pin' [-Wmissing-prototypes]

In fact, this function is only used in the file in which it is declared
and don't need a declaration, but can be made static.
so this patch marks it 'static'.

Signed-off-by: Baoyou Xie <baoyou.xie@linaro.org>
---
 drivers/net/wireless/ath/ath9k/gpio.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/wireless/ath/ath9k/gpio.c b/drivers/net/wireless/ath/ath9k/gpio.c
index 490f74d..ddb2886 100644
--- a/drivers/net/wireless/ath/ath9k/gpio.c
+++ b/drivers/net/wireless/ath/ath9k/gpio.c
@@ -22,7 +22,7 @@
 
 #ifdef CONFIG_MAC80211_LEDS
 
-void ath_fill_led_pin(struct ath_softc *sc)
+static void ath_fill_led_pin(struct ath_softc *sc)
 {
 	struct ath_hw *ah = sc->sc_ah;
 
-- 
2.7.4

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

* Re: [PATCH] fix:gpio: mark symbols static where possible
  2016-08-27 16:27 [PATCH] fix:gpio: mark symbols static where possible Baoyou Xie
@ 2016-08-29 12:14 ` Kalle Valo
  0 siblings, 0 replies; 2+ messages in thread
From: Kalle Valo @ 2016-08-29 12:14 UTC (permalink / raw)
  To: Baoyou Xie
  Cc: ath9k-devel, linux-wireless, ath9k-devel, netdev, linux-kernel,
	arnd, xie.baoyou

Baoyou Xie <baoyou.xie@linaro.org> writes:

> We get 1 warning about global functions without a declaration
> in the ath9k gpio driver when building with W=1:
> drivers/net/wireless/ath/ath9k/gpio.c:25:6: warning: no previous prototype for 'ath_fill_led_pin' [-Wmissing-prototypes]
>
> In fact, this function is only used in the file in which it is declared
> and don't need a declaration, but can be made static.
> so this patch marks it 'static'.
>
> Signed-off-by: Baoyou Xie <baoyou.xie@linaro.org>
> ---
>  drivers/net/wireless/ath/ath9k/gpio.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

The commit title should be:

ath9k: mark ath_fill_led_pin() static

Check the wiki how to create titles:

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches#subject_name

-- 
Kalle Valo

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

end of thread, other threads:[~2016-08-29 12:14 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-08-27 16:27 [PATCH] fix:gpio: mark symbols static where possible Baoyou Xie
2016-08-29 12:14 ` Kalle Valo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).