Hi Marc, [...] > At that stage, you're better off just calling > > list_del(&desc->list); > free_msi_entry(desc); > > I like this approach better as we only traverse the list once. Right. > > > } > > } > > > /** > > diff --git a/include/linux/msi.h b/include/linux/msi.h > > index 5839d8062dfc..be8ec813dbfb 100644 > > --- a/include/linux/msi.h > > +++ b/include/linux/msi.h > > @@ -116,6 +116,8 @@ struct msi_desc { > > list_first_entry(dev_to_msi_list((dev)), struct msi_desc, list) > > #define for_each_msi_entry(desc, dev) \ > > list_for_each_entry((desc), dev_to_msi_list((dev)), list) > > +#define for_each_msi_entry_safe(desc, tmp, dev) \ > > + list_for_each_entry_safe((desc), (tmp), dev_to_msi_list((dev)), list) > > > #ifdef CONFIG_PCI_MSI > > #define first_pci_msi_entry(pdev) first_msi_entry(&(pdev)->dev) > > If you repin this, I'll queue it right away. Let me test the new version to be sure I'm not breaking anything and I'll send a v2. Thanks, Miquèl