On Mon, Mar 25, 2013 at 12:17:39PM +0000, Peter Maydell wrote:
> On 25 March 2013 12:12, Michael S. Tsirkin <m...@redhat.com> wrote:
> > On Sun, Mar 24, 2013 at 11:32:37AM +0000, Peter Maydell wrote:
> >> +    return (PCI_SLOT(d->devfn) + irq_num - 2) % PCI_NUM_PINS;
> >
> > It seems this can be a bit shorter:
> >         pci_swizzle_map_irq_fn(d, irq_num - 2)
> > and below irq_num - 1 ?
> 
> Yes (though does pci_swizzle_map_irq_fn() accept negative
> pin values deliberately or by fluke? it might be better to
> use irq_num + 2 / + 3 , maybe.)
> 
> -- PMM

Yes, I prefer + too. The use of - here gave me pause though I figured
out it's all right in the end.

Reply via email to