Re: [PATCH 5/5] pci: spread interrupt vectors in pci_alloc_irq_vectors

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Jul 11, 2016 at 10:51:11PM +0200, Alexander Gordeev wrote:
> > +			dev->irq_affinity = irq_create_affinity_mask(&nvec);
> > +			if (nvec < minvec)
> > +				return -ERANGE;
> 
> 				return -ENOSPC;

Ok, fixed.

> > +		dev->irq_affinity = NULL;
> > +
> > +		if (rc < 0)
> >  			return rc;
> > +		if (rc < minvec)
> 
> 		else if (rc < minvec)

No need for the else - the previous line is a return (I've dropped
the removed lines above so that it's clearly visible).  And we already
handle the rc == 0 case a few lines above.

> > +int pci_enable_msi_range(struct pci_dev *dev, int minvec, int maxvec)
> > +{
> > +	return __pci_enable_msi_range(dev, minvec, maxvec, PCI_IRQ_NOAFFINITY);
> >  }
> >  EXPORT_SYMBOL(pci_enable_msi_range);
> 
> As a one-liner pci_enable_msi_range() appears rather as a static inline
> in linux/pci.h, but we do not want __pci_enable_msi*_range() to show up
> in a public header, right?

Exactly.

> > +		if (!(flags & PCI_IRQ_NOAFFINITY)) {
> > +			dev->irq_affinity = irq_create_affinity_mask(&nvec);
> > +			if (nvec < minvec)
> > +				return -ERANGE;
> 
> 				return -ENOSPC;

Fixed.

--
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



[Index of Archives]     [DMA Engine]     [Linux Coverity]     [Linux USB]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Greybus]

  Powered by Linux