Skip to contentSkip to conversation

watchdog: imx2_wdg: Declare local symbols static

PATCH In review Guenter Roeck 2 participants 2 messages Feb 28, 2023 – Mar 2, 2023

Subsystems (2)
lore
Share & tools
lore

Guenter Roeck

author maintainer
#0 lore raw

PATCH 1/1 watchdog: imx2_wdg: Declare local symbols static

0-day complains:

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

Declare as static variables.

Fixes e42c73f1ef0d ("watchdog: imx2_wdg: suspend watchdog in WAIT mode")
Cc Andrej Picej <[email protected]>
---
 drivers/watchdog/imx2_wdt.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/watchdog/imx2_wdt.c +2 -2
index 19ab7b3d286b..6fcc3596103c 100644
@@ -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,
 };
 
Signature · 1 line
2.39.1
#1 lore raw
Quoted 7 lines · Guenter Roeck

0-day complains:

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

Quoted 5 lines

Declare as static variables.

Fixes e42c73f1ef0d ("watchdog: imx2_wdg: suspend watchdog in WAIT mode")
Cc Andrej Picej <[email protected]>

Hi Guenter,

thanks for the fix. Sorry for the trouble.

Best regards,
Andrej