On Wednesday 11 April 2012, Paul Walmsley wrote: > +void omap1_nand_cmd_ctl(struct mtd_info *mtd, int cmd, unsigned int ctrl) > +{ > + struct nand_chip *this = mtd->priv; > + unsigned long mask; > + > + if (cmd == NAND_CMD_NONE) > + return; > + > + mask = (ctrl & NAND_CLE) ? 0x02 : 0; > + if (ctrl & NAND_ALE) > + mask |= 0x04; > + > + mask |= (unsigned long)this->IO_ADDR_W; > + > + writeb(cmd, (void __iomem *)mask); > +} IO_ADDR_W is always a page aligned pointer AFAICT, so you can actually remove both casts and make it more readable at the same time by writing the last two lines as writeb(cmd, this->IO_ADDR_W + mask); Arnd -- To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html