All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] rtc: test: make array pdev static
@ 2018-06-24 10:38 ` Colin King
  0 siblings, 0 replies; 4+ messages in thread
From: Colin King @ 2018-06-24 10:38 UTC (permalink / raw)
  To: Alessandro Zummo, Alexandre Belloni, linux-rtc
  Cc: kernel-janitors, linux-kernel

From: Colin Ian King <colin.king@canonical.com>

The array pdev is local to the source and does not need to be in
global scope, so make it static.

Cleans up sparse warning:
symbol 'pdev' was not declared. Should it be static?

Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
 drivers/rtc/rtc-test.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/rtc/rtc-test.c b/drivers/rtc/rtc-test.c
index 8469256edc2a..ade6a82709be 100644
--- a/drivers/rtc/rtc-test.c
+++ b/drivers/rtc/rtc-test.c
@@ -22,7 +22,7 @@ struct rtc_test_data {
 	bool alarm_en;
 };
 
-struct platform_device *pdev[MAX_RTC_TEST];
+static struct platform_device *pdev[MAX_RTC_TEST];
 
 static int test_rtc_read_alarm(struct device *dev, struct rtc_wkalrm *alrm)
 {
-- 
2.17.0


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

* [PATCH] rtc: test: make array pdev static
@ 2018-06-24 10:38 ` Colin King
  0 siblings, 0 replies; 4+ messages in thread
From: Colin King @ 2018-06-24 10:38 UTC (permalink / raw)
  To: Alessandro Zummo, Alexandre Belloni, linux-rtc
  Cc: kernel-janitors, linux-kernel

From: Colin Ian King <colin.king@canonical.com>

The array pdev is local to the source and does not need to be in
global scope, so make it static.

Cleans up sparse warning:
symbol 'pdev' was not declared. Should it be static?

Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
 drivers/rtc/rtc-test.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/rtc/rtc-test.c b/drivers/rtc/rtc-test.c
index 8469256edc2a..ade6a82709be 100644
--- a/drivers/rtc/rtc-test.c
+++ b/drivers/rtc/rtc-test.c
@@ -22,7 +22,7 @@ struct rtc_test_data {
 	bool alarm_en;
 };
 
-struct platform_device *pdev[MAX_RTC_TEST];
+static struct platform_device *pdev[MAX_RTC_TEST];
 
 static int test_rtc_read_alarm(struct device *dev, struct rtc_wkalrm *alrm)
 {
-- 
2.17.0


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

* Re: [PATCH] rtc: test: make array pdev static
  2018-06-24 10:38 ` Colin King
@ 2018-07-12 18:17   ` Alexandre Belloni
  -1 siblings, 0 replies; 4+ messages in thread
From: Alexandre Belloni @ 2018-07-12 18:17 UTC (permalink / raw)
  To: Colin King; +Cc: Alessandro Zummo, linux-rtc, kernel-janitors, linux-kernel

On 24/06/2018 11:38:03+0100, Colin King wrote:
> From: Colin Ian King <colin.king@canonical.com>
> 
> The array pdev is local to the source and does not need to be in
> global scope, so make it static.
> 
> Cleans up sparse warning:
> symbol 'pdev' was not declared. Should it be static?
> 
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
> ---
>  drivers/rtc/rtc-test.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 

Applied, thanks.

-- 
Alexandre Belloni, Bootlin (formerly Free Electrons)
Embedded Linux and Kernel engineering
https://bootlin.com

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

* Re: [PATCH] rtc: test: make array pdev static
@ 2018-07-12 18:17   ` Alexandre Belloni
  0 siblings, 0 replies; 4+ messages in thread
From: Alexandre Belloni @ 2018-07-12 18:17 UTC (permalink / raw)
  To: Colin King; +Cc: Alessandro Zummo, linux-rtc, kernel-janitors, linux-kernel

On 24/06/2018 11:38:03+0100, Colin King wrote:
> From: Colin Ian King <colin.king@canonical.com>
> 
> The array pdev is local to the source and does not need to be in
> global scope, so make it static.
> 
> Cleans up sparse warning:
> symbol 'pdev' was not declared. Should it be static?
> 
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
> ---
>  drivers/rtc/rtc-test.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 

Applied, thanks.

-- 
Alexandre Belloni, Bootlin (formerly Free Electrons)
Embedded Linux and Kernel engineering
https://bootlin.com

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

end of thread, other threads:[~2018-07-12 18:17 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-06-24 10:38 [PATCH] rtc: test: make array pdev static Colin King
2018-06-24 10:38 ` Colin King
2018-07-12 18:17 ` Alexandre Belloni
2018-07-12 18:17   ` Alexandre Belloni

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.