[PATCH v2] ahci, msix: Fix build error for !PCI_MSI

From: Robert Richter
Date: Wed Jun 17 2015 - 09:45:37 EST


Tejun, Gerry,

On 17.06.15 17:02:20, Jiang Liu wrote:
> On 2015/6/17 16:48, Robert Richter wrote:

> > static struct msi_desc *msix_get_desc(struct pci_dev *dev, u16 entry)
> > {
> > +#ifdef CONFIG_PCI_MSI
> > struct msi_desc *desc;
> >
> > list_for_each_entry(desc, &dev->msi_list, list) {
> > if (desc->msi_attrib.entry_nr == entry)
> > return desc;
> > }
> > -
> > +#endif

> Hi Robert,
> While at it, could you please help to use for_each_pci_msi_entry()
> from include/linux/msi.h instead of hard-coding? We are trying to refine
> the msi_list related code,
> so we don't need to touch this code again later.

While looking into this I realized the code can be much more
simplified so that the desc lookup function can be removed at all.
See below.

Sorry for the patch noise.

-Robert