mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] watchdog: imx2_wdt: set variables imx_wdt* storage-class-specifier to static
@ 2023-04-08 14:34 Tom Rix
  2023-04-08 15:19 ` Guenter Roeck
  0 siblings, 1 reply; 2+ messages in thread
From: Tom Rix @ 2023-04-08 14:34 UTC (permalink / raw)
  To: wim, linux, shawnguo, s.hauer, kernel, festevam, linux-imx
  Cc: linux-watchdog, linux-arm-kernel, linux-kernel, Tom Rix

smatch reports
drivers/watchdog/imx2_wdt.c:442:22: warning: symbol
  'imx_wdt' was not declared. Should it be static?
drivers/watchdog/imx2_wdt.c:446:22: warning: symbol
  'imx_wdt_legacy' was not declared. Should it be static?

These variables are only used in one file so should be static.

Signed-off-by: Tom Rix <trix@redhat.com>
---
 drivers/watchdog/imx2_wdt.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/watchdog/imx2_wdt.c b/drivers/watchdog/imx2_wdt.c
index 19ab7b3d286b..6fcc3596103c 100644
--- a/drivers/watchdog/imx2_wdt.c
+++ b/drivers/watchdog/imx2_wdt.c
@@ -439,11 +439,11 @@ static int __maybe_unused imx2_wdt_resume(struct device *dev)
 static SIMPLE_DEV_PM_OPS(imx2_wdt_pm_ops, imx2_wdt_suspend,
 			 imx2_wdt_resume);
 
-struct imx2_wdt_data imx_wdt = {
+static struct imx2_wdt_data imx_wdt = {
 	.wdw_supported = true,
 };
 
-struct imx2_wdt_data imx_wdt_legacy = {
+static struct imx2_wdt_data imx_wdt_legacy = {
 	.wdw_supported = false,
 };
 
-- 
2.27.0


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

* Re: [PATCH] watchdog: imx2_wdt: set variables imx_wdt* storage-class-specifier to static
  2023-04-08 14:34 [PATCH] watchdog: imx2_wdt: set variables imx_wdt* storage-class-specifier to static Tom Rix
@ 2023-04-08 15:19 ` Guenter Roeck
  0 siblings, 0 replies; 2+ messages in thread
From: Guenter Roeck @ 2023-04-08 15:19 UTC (permalink / raw)
  To: Tom Rix, wim, shawnguo, s.hauer, kernel, festevam, linux-imx
  Cc: linux-watchdog, linux-arm-kernel, linux-kernel

On 4/8/23 07:34, Tom Rix wrote:
> smatch reports
> drivers/watchdog/imx2_wdt.c:442:22: warning: symbol
>    'imx_wdt' was not declared. Should it be static?
> drivers/watchdog/imx2_wdt.c:446:22: warning: symbol
>    'imx_wdt_legacy' was not declared. Should it be static?
> 
> These variables are only used in one file so should be static.
> 
> Signed-off-by: Tom Rix <trix@redhat.com>

We already have that at

https://patchwork.kernel.org/project/linux-watchdog/patch/20230228151648.4087637-1-linux@roeck-us.net/

but I don't really care which one Wim picks up, so

Reviewed-by: Guenter Roeck <linux@roeck-us.net>

Guenter

> ---
>   drivers/watchdog/imx2_wdt.c | 4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/watchdog/imx2_wdt.c b/drivers/watchdog/imx2_wdt.c
> index 19ab7b3d286b..6fcc3596103c 100644
> --- a/drivers/watchdog/imx2_wdt.c
> +++ b/drivers/watchdog/imx2_wdt.c
> @@ -439,11 +439,11 @@ static int __maybe_unused imx2_wdt_resume(struct device *dev)
>   static SIMPLE_DEV_PM_OPS(imx2_wdt_pm_ops, imx2_wdt_suspend,
>   			 imx2_wdt_resume);
>   
> -struct imx2_wdt_data imx_wdt = {
> +static struct imx2_wdt_data imx_wdt = {
>   	.wdw_supported = true,
>   };
>   
> -struct imx2_wdt_data imx_wdt_legacy = {
> +static struct imx2_wdt_data imx_wdt_legacy = {
>   	.wdw_supported = false,
>   };
>   


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

end of thread, other threads:[~2023-04-08 15:19 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-04-08 14:34 [PATCH] watchdog: imx2_wdt: set variables imx_wdt* storage-class-specifier to static Tom Rix
2023-04-08 15:19 ` Guenter Roeck

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

all inboxes | Powered by JetHome®