diff options
author | Philippe Mathieu-Daudé <f4bug@amsat.org> | 2020-10-11 17:22:04 +0200 |
---|---|---|
committer | Philippe Mathieu-Daudé <f4bug@amsat.org> | 2021-01-04 23:24:44 +0100 |
commit | d08b9c1b75c60c66ea65212a9dac90f58542e45e (patch) | |
tree | 09c89562aa00907784761e5cd17ffb16848f80e0 /hw/pci-host | |
parent | 0374cbd2f1b5bc68816c811bdaf266d98b21ecfe (diff) |
hw/pci-host/uninorth: Use the PCI_FUNC() macro from 'hw/pci/pci.h'
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@amsat.org>
Acked-by: David Gibson <david@gibson.dropbear.id.au>
Acked-by: Michael S. Tsirkin <mst@redhat.com>
Message-Id: <20201012124506.3406909-4-philmd@redhat.com>
Diffstat (limited to 'hw/pci-host')
-rw-r--r-- | hw/pci-host/uninorth.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/hw/pci-host/uninorth.c b/hw/pci-host/uninorth.c index 0c0a9ecee1..f0a4d8c717 100644 --- a/hw/pci-host/uninorth.c +++ b/hw/pci-host/uninorth.c @@ -63,7 +63,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 */ |