aboutsummaryrefslogtreecommitdiff
path: root/hw/hppa
diff options
context:
space:
mode:
authorPhilippe Mathieu-Daudé <f4bug@amsat.org>2020-10-11 17:04:23 +0200
committerPhilippe Mathieu-Daudé <f4bug@amsat.org>2021-01-04 23:24:44 +0100
commit8d40def66d744a964c2675a19c11f644d288dd4f (patch)
tree960390db0ec52c6ce7fe109bfe70fdb9ac4e346e /hw/hppa
parentd08b9c1b75c60c66ea65212a9dac90f58542e45e (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/hppa')
-rw-r--r--hw/hppa/dino.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/hw/hppa/dino.c b/hw/hppa/dino.c
index 81053b5fb6..5b82c9440d 100644
--- a/hw/hppa/dino.c
+++ b/hw/hppa/dino.c
@@ -496,7 +496,7 @@ static void dino_set_irq(void *opaque, int irq, int level)
static int dino_pci_map_irq(PCIDevice *d, int irq_num)
{
- int slot = d->devfn >> 3;
+ int slot = PCI_SLOT(d->devfn);
assert(irq_num >= 0 && irq_num <= 3);