There is no real reason to do several loops over the MSI descriptors instead of just doing one loop. In case of an error everything is undone anyway so it does not matter whether it's a partial or a full rollback.
Showing the changes to include (1 of 3 files). Show all
Unified · Split
| @@ -206,12 +206,6 @@ struct msi_desc *msi_next_desc(struct device *dev, enum msi_desc_filter filter); · 205 unmodified lines | |||
| 206 | list_for_each_entry((desc), dev_to_msi_list((dev)), list) | 206 | list_for_each_entry((desc), dev_to_msi_list((dev)), list) |
| 207 | #define for_each_msi_entry_safe(desc, tmp, dev) \ | 207 | #define for_each_msi_entry_safe(desc, tmp, dev) \ |
| 208 | list_for_each_entry_safe((desc), (tmp), dev_to_msi_list((dev)), list) | 208 | list_for_each_entry_safe((desc), (tmp), dev_to_msi_list((dev)), list) |
| 209 | #define for_each_msi_vector(desc, __irq, dev) \ | ||
| 210 | for_each_msi_entry((desc), (dev)) \ | ||
| 211 | if ((desc)->irq) \ | ||
| 212 | for (__irq = (desc)->irq; \ | ||
| 213 | __irq < ((desc)->irq + (desc)->nvec_used); \ | ||
| 214 | __irq++) | ||
| 215 | 209 | ||
| 216 | #ifdef CONFIG_IRQ_MSI_IOMMU | 210 | #ifdef CONFIG_IRQ_MSI_IOMMU |
| 217 | static inline const void *msi_desc_get_iommu_cookie(struct msi_desc *desc) | 211 | static inline const void *msi_desc_get_iommu_cookie(struct msi_desc *desc) |