2022-08-02 02:57:15

by sunliming

[permalink] [raw]
Subject: [PATCH] watchdog: sa1100: make variable sa1100dog_driver static

This symbol is not used outside of sa1100_wdt.c, so marks it static.

Fixes the following warning:

>> drivers/watchdog/sa1100_wdt.c:241:24: sparse: sparse: symbol 'sa1100dog_driver'
was not declared. Should it be static?

Reported-by: kernel test robot <[email protected]>
Signed-off-by: sunliming <[email protected]>
---
drivers/watchdog/sa1100_wdt.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/watchdog/sa1100_wdt.c b/drivers/watchdog/sa1100_wdt.c
index 2d0a06a158a8..82ac5d19f519 100644
--- a/drivers/watchdog/sa1100_wdt.c
+++ b/drivers/watchdog/sa1100_wdt.c
@@ -238,7 +238,7 @@ static int sa1100dog_remove(struct platform_device *pdev)
return 0;
}

-struct platform_driver sa1100dog_driver = {
+static struct platform_driver sa1100dog_driver = {
.driver.name = "sa1100_wdt",
.probe = sa1100dog_probe,
.remove = sa1100dog_remove,
--
2.25.1



2022-08-02 08:29:27

by Arnd Bergmann

[permalink] [raw]
Subject: Re: [PATCH] watchdog: sa1100: make variable sa1100dog_driver static

On Tue, Aug 2, 2022 at 4:08 AM sunliming <[email protected]> wrote:
>
> This symbol is not used outside of sa1100_wdt.c, so marks it static.
>
> Fixes the following warning:
>
> >> drivers/watchdog/sa1100_wdt.c:241:24: sparse: sparse: symbol 'sa1100dog_driver'
> was not declared. Should it be static?
>
> Reported-by: kernel test robot <[email protected]>
> Signed-off-by: sunliming <[email protected]>

Acked-by: Arnd Bergmann <[email protected]>

2022-08-08 14:10:38

by Guenter Roeck

[permalink] [raw]
Subject: Re: [PATCH] watchdog: sa1100: make variable sa1100dog_driver static

On Tue, Aug 02, 2022 at 10:08:19AM +0800, sunliming wrote:
> This symbol is not used outside of sa1100_wdt.c, so marks it static.
>
> Fixes the following warning:
>
> >> drivers/watchdog/sa1100_wdt.c:241:24: sparse: sparse: symbol 'sa1100dog_driver'
> was not declared. Should it be static?
>
> Reported-by: kernel test robot <[email protected]>
> Signed-off-by: sunliming <[email protected]>

Reviewed-by: Guenter Roeck <[email protected]>

> ---
> drivers/watchdog/sa1100_wdt.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/watchdog/sa1100_wdt.c b/drivers/watchdog/sa1100_wdt.c
> index 2d0a06a158a8..82ac5d19f519 100644
> --- a/drivers/watchdog/sa1100_wdt.c
> +++ b/drivers/watchdog/sa1100_wdt.c
> @@ -238,7 +238,7 @@ static int sa1100dog_remove(struct platform_device *pdev)
> return 0;
> }
>
> -struct platform_driver sa1100dog_driver = {
> +static struct platform_driver sa1100dog_driver = {
> .driver.name = "sa1100_wdt",
> .probe = sa1100dog_probe,
> .remove = sa1100dog_remove,
> --
> 2.25.1
>