Hi Thomas. > > +#define MGA_READ8(reg) \ > > + readb(((void __iomem *)dev_priv->mmio->handle) + (reg)) > > +#define MGA_READ(reg) \ > > + readl(((void __iomem *)dev_priv->mmio->handle) + (reg)) > > +#define MGA_WRITE8(reg, val) \ > > + writeb(val, ((void __iomem *)dev_priv->mmio->handle) + (reg)) > > +#define MGA_WRITE(reg, val) \ > > + writel(val, ((void __iomem *)dev_priv->mmio->handle) + (reg)) > > Addition is not defined or implementation specific for type void* IIRC. > Compilers tend to treat it like u8*. Maybe cast mmio->handle to (u8 > __iomem *) instead? I briefly looked at changing the type of mmio->handle Today: void *handle; /**< User-space: "Handle" to pass to mmap() */ Proposal: void __iomem *handle; /**< User-space: "Handle" to pass to mmap() */ This would allow me to drop the cast in the code above, that is only added to make sparse happy. But the above triggered other sparse warnings and I ended up dropping this. As for (void *) versus (u8 *), then (void *) is what we do today. [What Daniel also says in another mail]. Should we change the type I would prepfer a follow-up patch to do it. If you could test it I can type the patch, or you could do so when working with the driver. Sam _______________________________________________ dri-devel mailing list dri-devel@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/dri-devel