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 Tue, Jul 12, 2016 at 11:17:54AM +0200, Christoph Hellwig wrote:
> > > +		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.

There is no bug here definitely, but (a) (if my memory serves me well)
there are archs whose branch prediction benefits from -else parts in
conditionals and (b) the code style you're updating was consistent
wrt branching and your change makes it inconsistent even within one
function.
--
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