hw: Use the PCI_SLOT() macro from 'hw/pci/pci.h'

We already have a generic PCI_SLOT() macro in "hw/pci/pci.h"
to extract the PCI slot identifier, use it.

Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Acked-by: Paul Durrant <paul@xen.org>
Acked-by: David Gibson <david@gibson.dropbear.id.au>
Acked-by: Michael S. Tsirkin <mst@redhat.com>
Message-Id: <20201012124506.3406909-5-philmd@redhat.com>
This commit is contained in:
Philippe Mathieu-Daudé 2020-10-11 17:04:23 +02:00
parent d08b9c1b75
commit 8d40def66d
8 changed files with 8 additions and 8 deletions

View file

@ -243,7 +243,7 @@ static void ppc4xx_pci_reset(void *opaque)
* may need further refactoring for other boards. */
static int ppc4xx_pci_map_irq(PCIDevice *pci_dev, int irq_num)
{
int slot = pci_dev->devfn >> 3;
int slot = PCI_SLOT(pci_dev->devfn);
trace_ppc4xx_pci_map_irq(pci_dev->devfn, irq_num, slot);