memory: ti-emif-pm: Fix cast to iomem pointer
authorKrzysztof Kozlowski <krzk@kernel.org>
Fri, 24 Jul 2020 07:40:24 +0000 (09:40 +0200)
committerKrzysztof Kozlowski <krzk@kernel.org>
Fri, 24 Jul 2020 14:18:32 +0000 (16:18 +0200)
Cast pointer to iomem memory properly to fix sparse warning:

    drivers/memory/ti-emif-pm.c:251:38: warning: incorrect type in argument 1 (different address spaces)
    drivers/memory/ti-emif-pm.c:251:38:    expected void const volatile [noderef] __iomem *addr
    drivers/memory/ti-emif-pm.c:251:38:    got void *

Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
drivers/memory/ti-emif-pm.c

index 9c90f81..6c747c1 100644 (file)
@@ -248,7 +248,7 @@ MODULE_DEVICE_TABLE(of, ti_emif_of_match);
 static int ti_emif_resume(struct device *dev)
 {
        unsigned long tmp =
-                       __raw_readl((void *)emif_instance->ti_emif_sram_virt);
+                       __raw_readl((void __iomem *)emif_instance->ti_emif_sram_virt);
 
        /*
         * Check to see if what we are copying is already present in the