linux-watchdog.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] watchdog: ixp4xx_wdt: Fix address space warning
@ 2021-09-11  4:29 Guenter Roeck
  2021-09-17 22:28 ` Linus Walleij
  0 siblings, 1 reply; 2+ messages in thread
From: Guenter Roeck @ 2021-09-11  4:29 UTC (permalink / raw)
  To: Wim Van Sebroeck
  Cc: linux-watchdog, linux-kernel, Guenter Roeck, Linus Walleij

sparse reports the following address space warning.

drivers/watchdog/ixp4xx_wdt.c:122:20: sparse:
	incorrect type in assignment (different address spaces)
drivers/watchdog/ixp4xx_wdt.c:122:20: sparse:
	expected void [noderef] __iomem *base
drivers/watchdog/ixp4xx_wdt.c:122:20: sparse:
	got void *platform_data

Add a typecast to solve the problem.

Fixes: 21a0a29d16c6 ("watchdog: ixp4xx: Rewrite driver to use core")
Cc: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
---
 drivers/watchdog/ixp4xx_wdt.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/watchdog/ixp4xx_wdt.c b/drivers/watchdog/ixp4xx_wdt.c
index 2693ffb24ac7..31b03fa71341 100644
--- a/drivers/watchdog/ixp4xx_wdt.c
+++ b/drivers/watchdog/ixp4xx_wdt.c
@@ -119,7 +119,7 @@ static int ixp4xx_wdt_probe(struct platform_device *pdev)
 	iwdt = devm_kzalloc(dev, sizeof(*iwdt), GFP_KERNEL);
 	if (!iwdt)
 		return -ENOMEM;
-	iwdt->base = dev->platform_data;
+	iwdt->base = (void __iomem *)dev->platform_data;
 
 	/*
 	 * Retrieve rate from a fixed clock from the device tree if
-- 
2.33.0


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

* Re: [PATCH] watchdog: ixp4xx_wdt: Fix address space warning
  2021-09-11  4:29 [PATCH] watchdog: ixp4xx_wdt: Fix address space warning Guenter Roeck
@ 2021-09-17 22:28 ` Linus Walleij
  0 siblings, 0 replies; 2+ messages in thread
From: Linus Walleij @ 2021-09-17 22:28 UTC (permalink / raw)
  To: Guenter Roeck; +Cc: Wim Van Sebroeck, LINUXWATCHDOG, linux-kernel

On Sat, Sep 11, 2021 at 6:29 AM Guenter Roeck <linux@roeck-us.net> wrote:

> sparse reports the following address space warning.
>
> drivers/watchdog/ixp4xx_wdt.c:122:20: sparse:
>         incorrect type in assignment (different address spaces)
> drivers/watchdog/ixp4xx_wdt.c:122:20: sparse:
>         expected void [noderef] __iomem *base
> drivers/watchdog/ixp4xx_wdt.c:122:20: sparse:
>         got void *platform_data
>
> Add a typecast to solve the problem.
>
> Fixes: 21a0a29d16c6 ("watchdog: ixp4xx: Rewrite driver to use core")
> Cc: Linus Walleij <linus.walleij@linaro.org>
> Signed-off-by: Guenter Roeck <linux@roeck-us.net>

Thanks for fixing this!
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>

Yours,
Linus Walleij

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

end of thread, other threads:[~2021-09-17 22:28 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-11  4:29 [PATCH] watchdog: ixp4xx_wdt: Fix address space warning Guenter Roeck
2021-09-17 22:28 ` Linus Walleij

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).