]> Git Repo - linux.git/commitdiff
watchdog: ixp4xx_wdt: Fix address space warning
authorGuenter Roeck <[email protected]>
Sat, 11 Sep 2021 04:29:25 +0000 (21:29 -0700)
committerWim Van Sebroeck <[email protected]>
Tue, 26 Oct 2021 18:22:51 +0000 (20:22 +0200)
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 <[email protected]>
Reviewed-by: Linus Walleij <[email protected]>
Signed-off-by: Guenter Roeck <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Wim Van Sebroeck <[email protected]>
drivers/watchdog/ixp4xx_wdt.c

index 2693ffb24ac7ebfbdace2d2b435e4146c24c75d0..31b03fa713412dd0b06e770efddb7d950c583e09 100644 (file)
@@ -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
This page took 0.057816 seconds and 4 git commands to generate.