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/isa/piix3.c | |
parent | d08b9c1b75c60c66ea65212a9dac90f58542e45e (diff) | |
download | qemu-8d40def66d744a964c2675a19c11f644d288dd4f.zip qemu-8d40def66d744a964c2675a19c11f644d288dd4f.tar.gz qemu-8d40def66d744a964c2675a19c11f644d288dd4f.tar.bz2 |
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/isa/piix3.c')
-rw-r--r-- | hw/isa/piix3.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/hw/isa/piix3.c b/hw/isa/piix3.c index 587850b..f46ccae 100644 --- a/hw/isa/piix3.c +++ b/hw/isa/piix3.c @@ -361,7 +361,7 @@ type_init(piix3_register_types) static int pci_slot_get_pirq(PCIDevice *pci_dev, int pci_intx) { int slot_addend; - slot_addend = (pci_dev->devfn >> 3) - 1; + slot_addend = PCI_SLOT(pci_dev->devfn) - 1; return (pci_intx + slot_addend) & 3; } |