diff options
author | Philippe Mathieu-Daudé <f4bug@amsat.org> | 2020-10-11 17:04:23 +0200 |
---|---|---|
committer | Philippe Mathieu-Daudé <f4bug@amsat.org> | 2021-01-04 23:24:44 +0100 |
commit | 8d40def66d744a964c2675a19c11f644d288dd4f (patch) | |
tree | 960390db0ec52c6ce7fe109bfe70fdb9ac4e346e /hw/sh4 | |
parent | d08b9c1b75c60c66ea65212a9dac90f58542e45e (diff) |
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>
Diffstat (limited to 'hw/sh4')
-rw-r--r-- | hw/sh4/sh_pci.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/hw/sh4/sh_pci.c b/hw/sh4/sh_pci.c index 73d2d0bccb..734892f47c 100644 --- a/hw/sh4/sh_pci.c +++ b/hw/sh4/sh_pci.c @@ -109,7 +109,7 @@ static const MemoryRegionOps sh_pci_reg_ops = { static int sh_pci_map_irq(PCIDevice *d, int irq_num) { - return (d->devfn >> 3); + return PCI_SLOT(d->devfn); } static void sh_pci_set_irq(void *opaque, int irq_num, int level) |