[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 3/5] hw/pci-host/uninorth: Use the PCI_FUNC() macro from 'hw/pci/pci.h'
- To: qemu-devel@xxxxxxxxxx
- From: Philippe Mathieu-Daudé <philmd@xxxxxxxxxx>
- Date: Mon, 12 Oct 2020 14:45:04 +0200
- Authentication-results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=philmd@xxxxxxxxxx
- Cc: Peter Maydell <peter.maydell@xxxxxxxxxx>, qemu-ppc@xxxxxxxxxx, qemu-trivial@xxxxxxxxxx, Paul Durrant <paul@xxxxxxx>, Aurelien Jarno <aurelien@xxxxxxxxxxx>, qemu-arm@xxxxxxxxxx, Philippe Mathieu-Daudé <f4bug@xxxxxxxxx>, "Michael S. Tsirkin" <mst@xxxxxxxxxx>, Eduardo Habkost <ehabkost@xxxxxxxxxx>, Jiaxun Yang <jiaxun.yang@xxxxxxxxxxx>, Yoshinori Sato <ysato@xxxxxxxxxxxxxxxxxxxx>, Cédric Le Goater <clg@xxxxxxxx>, David Gibson <david@xxxxxxxxxxxxxxxxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Helge Deller <deller@xxxxxx>, Anthony Perard <anthony.perard@xxxxxxxxxx>, Richard Henderson <rth@xxxxxxxxxxx>, Aleksandar Markovic <aleksandar.qemu.devel@xxxxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx, Aleksandar Rikalo <aleksandar.rikalo@xxxxxxxxxx>, Marcel Apfelbaum <marcel.apfelbaum@xxxxxxxxx>, Mark Cave-Ayland <mark.cave-ayland@xxxxxxxxxxxx>, Paolo Bonzini <pbonzini@xxxxxxxxxx>, Huacai Chen <chenhc@xxxxxxxxxx>
- Delivery-date: Mon, 12 Oct 2020 12:45:32 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
From: Philippe Mathieu-Daudé <f4bug@xxxxxxxxx>
We already have a generic PCI_FUNC() macro in "hw/pci/pci.h" to
extract the PCI function identifier, use it.
Signed-off-by: Philippe Mathieu-Daudé <f4bug@xxxxxxxxx>
---
hw/pci-host/uninorth.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/hw/pci-host/uninorth.c b/hw/pci-host/uninorth.c
index 1ed1072eeb5..c21de0ab805 100644
--- a/hw/pci-host/uninorth.c
+++ b/hw/pci-host/uninorth.c
@@ -65,7 +65,7 @@ static uint32_t unin_get_config_reg(uint32_t reg, uint32_t
addr)
if (slot == 32) {
slot = -1; /* XXX: should this be 0? */
}
- func = (reg >> 8) & 7;
+ func = PCI_FUNC(reg >> 8);
/* ... and then convert them to x86 format */
/* config pointer */
--
2.26.2
|