The kpc_spi driver unnecessarily casts from a (u64 __iomem *) to a (void
*) when invoking readq and writeq which both take a (void __iomem *) arg.
There is no need for this cast, and it actually harms us by discarding
the sparse cookie, __iomem. Make the driver stop performing this casting
operation.
Signed-off-by: Geordan Neukum <gneukum1@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
        if ((idx == KP_SPI_REG_CONFIG) && (cs->conf_cache >= 0)){
                return cs->conf_cache;
        }
-       val = readq((void*)addr);
+       val = readq(addr);
        return val;
 }
 
 {
        u64 __iomem *addr = cs->base;
        addr += idx;
-       writeq(val, (void*)addr);
+       writeq(val, addr);
        if (idx == KP_SPI_REG_CONFIG)
                cs->conf_cache = val;
 }