(a) GCC has been known to generate worse code for this. But it's good
for checking for misuse. Why do you think the pte structs aren't
normally used?
(b) iooffset sucks -- you'd use it on nearly every readl/writel call.
So build it in:
#ifdef CHECK_IOCOOKIES
#define readl(iomem, offset) __readl (iomem.addr, offset)
#else
#define readl(iomem, offset) __readl ((iomem) + (offset))
#endif
Drivers that use readl(MY_REG_1(dev)) and readl(MY_REG_2(dev))
constructs can still do so. But whereas before you had:
#define MY_REG_1(dev) devinfo[dev]->iobase + 0x10
#define MY_REG_2(dev) devinfo[dev]->iobase + 0x14
Now you have:
#define MY_REG_1(dev) devinfo[dev]->iobase, 0x10
#define MY_REG_1(dev) devinfo[dev]->iobase, 0x14
enjoy,
-- Jamie
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/