On Mon, Oct 10, 2011 at 04:23:28PM +0200, Rafał Miłecki wrote: > > -#define CCREGS_FAST(si) (((char *)((si)->curmap) + PCI_16KB0_CCREGS_OFFSET)) > > +#define CCREGS_FAST(si) (((char __iomem *)((si)->curmap) + \ > > + PCI_16KB0_CCREGS_OFFSET)) > > I've a question (not to just you), should we prefer u8/u16/u32 types in code? > If so, you could think to changing this since you already touch this code. > The char is just so that the addition works, the caller will have to cast it again. It's up to the author to decide. If you're going to be doing bitwise operations then you can run into signedness bugs using char. printf("0x%x\n", (int) 0 | (char) -1); /* 0xffffffff */ printf("0x%x\n", (int) 0 | (unsigned char) -1); /* 0xff */ Also if you are going to save hex digits to it, then it should be u8. You occasionally see bugs like this: char x = 0xff; if (x == 0xff) printf("dead code here.\n"); else printf("signed chars only reach up to 0x7f\n"); regards, dan carpenter -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html