From 8d40def66d744a964c2675a19c11f644d288dd4f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Date: Sun, 11 Oct 2020 17:04:23 +0200 Subject: hw: Use the PCI_SLOT() macro from 'hw/pci/pci.h' MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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é Acked-by: Paul Durrant Acked-by: David Gibson Acked-by: Michael S. Tsirkin Message-Id: <20201012124506.3406909-5-philmd@redhat.com> --- hw/pci-host/bonito.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'hw/pci-host/bonito.c') diff --git a/hw/pci-host/bonito.c b/hw/pci-host/bonito.c index b05295639a..ee8b193e15 100644 --- a/hw/pci-host/bonito.c +++ b/hw/pci-host/bonito.c @@ -570,7 +570,7 @@ static int pci_bonito_map_irq(PCIDevice *pci_dev, int irq_num) { int slot; - slot = (pci_dev->devfn >> 3); + slot = PCI_SLOT(pci_dev->devfn); switch (slot) { case 5: /* FULOONG2E_VIA_SLOT, SouthBridge, IDE, USB, ACPI, AC97, MC97 */ -- cgit v1.2.3