I don't like this 'save' boolean. How about we do it this way: On Tue, Jun 23, 2009 at 05:38:37PM +0900, Hidetoshi Seto wrote: > @@ -127,7 +127,7 @@ static inline __attribute_const__ u32 msi_enabled_mask(u16 control) > * reliably as devices without an INTx disable bit will then generate a > * level IRQ which will never be cleared. > */ > -static void msi_mask_irq(struct msi_desc *desc, u32 mask, u32 flag) > +static void __msi_mask_irq(struct msi_desc *desc, u32 mask, u32 flag, int save) static u32 __msi_mask_irq(struct msi_desc *desc, u32 mask, u32 flag) > { > u32 mask_bits = desc->masked; > > @@ -137,7 +137,19 @@ static void msi_mask_irq(struct msi_desc *desc, u32 mask, u32 flag) > mask_bits &= ~mask; > mask_bits |= flag; > pci_write_config_dword(desc->dev, desc->mask_pos, mask_bits); > - desc->masked = mask_bits; > + > + if (save) > + desc->masked = mask_bits; > +} + return mask_bits; } static void msi_mask_irq(struct msi_desc *desc, u32 mask, u32 flag) { desc->masked = __msi_mask_irq(desc, mask, flag); } and then we can get rid of msi_mask_irq_nocache -- the caller can simply call __msi_mask_irq() directly. The same applies to msix_ of course. -- Matthew Wilcox Intel Open Source Technology Centre "Bill, look, we understand that you're interested in selling us this operating system, but compare it to ours. We can't possibly take such a retrograde step." -- To unsubscribe from this list: send the line "unsubscribe linux-pci" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html