diff options
author | Philippe Mathieu-Daudé <f4bug@amsat.org> | 2020-10-11 17:18:59 +0200 |
---|---|---|
committer | Philippe Mathieu-Daudé <f4bug@amsat.org> | 2021-01-04 23:24:44 +0100 |
commit | 0374cbd2f1b5bc68816c811bdaf266d98b21ecfe (patch) | |
tree | d8fe5ddc441c2d55974432a59880e432f88149c7 /hw/pci-host/bonito.c | |
parent | e551455f1e7a3d7eee9e11e2903e4050bc5511ae (diff) | |
download | qemu-0374cbd2f1b5bc68816c811bdaf266d98b21ecfe.zip qemu-0374cbd2f1b5bc68816c811bdaf266d98b21ecfe.tar.gz qemu-0374cbd2f1b5bc68816c811bdaf266d98b21ecfe.tar.bz2 |
hw/pci-host: Use the PCI_BUILD_BDF() macro from 'hw/pci/pci.h'
We already have a generic PCI_BUILD_BDF() macro in "hw/pci/pci.h"
to pack these values, 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-3-philmd@redhat.com>
Diffstat (limited to 'hw/pci-host/bonito.c')
-rw-r--r-- | hw/pci-host/bonito.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/hw/pci-host/bonito.c b/hw/pci-host/bonito.c index a99eced..b052956 100644 --- a/hw/pci-host/bonito.c +++ b/hw/pci-host/bonito.c @@ -196,8 +196,7 @@ FIELD(BONGENCFG, PCIQUEUE, 12, 1) #define PCI_IDSEL_VIA686B (1 << PCI_IDSEL_VIA686B_BIT) #define PCI_ADDR(busno , devno , funno , regno) \ - ((((busno) << 16) & 0xff0000) + (((devno) << 11) & 0xf800) + \ - (((funno) << 8) & 0x700) + (regno)) + ((PCI_BUILD_BDF(busno, PCI_DEVFN(devno , funno)) << 8) + (regno)) typedef struct BonitoState BonitoState; |