From 6ff534b678e26450ad6e2ad850b70c9db0e92139 Mon Sep 17 00:00:00 2001 From: Isaku Yamahata Date: Thu, 27 Jan 2011 15:56:38 +0900 Subject: [PATCH] pci: use PCI_DEVFN in pci_get_bus_devfn() Replace hardcoded logic by a common macro. Signed-off-by: Isaku Yamahata Signed-off-by: Michael S. Tsirkin --- hw/pci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/pci.c b/hw/pci.c index 44a1f9e526..df184f1829 100644 --- a/hw/pci.c +++ b/hw/pci.c @@ -558,7 +558,7 @@ PCIBus *pci_get_bus_devfn(int *devfnp, const char *devaddr) return NULL; } - *devfnp = slot << 3; + *devfnp = PCI_DEVFN(slot, 0); return pci_find_bus(pci_find_root_bus(dom), bus); } -- 2.11.0