diff options
author | Philippe Mathieu-Daudé <philmd@linaro.org> | 2023-05-23 08:12:06 +0200 |
---|---|---|
committer | Michael Tokarev <mjt@tls.msk.ru> | 2023-06-09 23:38:16 +0300 |
commit | 271233f21f66c10194a45c1bff1db61fe2694a22 (patch) | |
tree | 13b3e4bc0fcc079010f4922b9f3b1e01b6225996 /hw/pci/pci.c | |
parent | a5c80ab847dada26137461e534f75bb9bcb85a89 (diff) |
hw/pci/pci: Simplify pci_bar_address() using MACHINE_GET_CLASS() macro
Remove unnecessary intermediate variables.
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
Diffstat (limited to 'hw/pci/pci.c')
-rw-r--r-- | hw/pci/pci.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/hw/pci/pci.c b/hw/pci/pci.c index 9b7b4d7c18..bf38905b7d 100644 --- a/hw/pci/pci.c +++ b/hw/pci/pci.c @@ -1446,9 +1446,7 @@ pcibus_t pci_bar_address(PCIDevice *d, { pcibus_t new_addr, last_addr; uint16_t cmd = pci_get_word(d->config + PCI_COMMAND); - Object *machine = qdev_get_machine(); - ObjectClass *oc = object_get_class(machine); - MachineClass *mc = MACHINE_CLASS(oc); + MachineClass *mc = MACHINE_GET_CLASS(qdev_get_machine()); bool allow_0_address = mc->pci_allow_0_address; if (type & PCI_BASE_ADDRESS_SPACE_IO) { |