[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 02/35] hw/pci-host/uninorth: Use the PCI_FUNC() macro from 'hw/pci
From: |
Philippe Mathieu-Daudé |
Subject: |
[PULL 02/35] hw/pci-host/uninorth: Use the PCI_FUNC() macro from 'hw/pci/pci.h' |
Date: |
Sun, 3 Jan 2021 21:49:48 +0100 |
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>
Message-Id: <20201012124506.3406909-4-philmd@redhat.com>
---
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 0c0a9ecee14..f0a4d8c7178 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 */
--
2.26.2
- [PULL 00/35] MIPS patches for 2021-01-03, Philippe Mathieu-Daudé, 2021/01/03
- [PULL 01/35] hw/pci-host: Use the PCI_BUILD_BDF() macro from 'hw/pci/pci.h', Philippe Mathieu-Daudé, 2021/01/03
- [PULL 02/35] hw/pci-host/uninorth: Use the PCI_FUNC() macro from 'hw/pci/pci.h',
Philippe Mathieu-Daudé <=
- [PULL 03/35] hw: Use the PCI_SLOT() macro from 'hw/pci/pci.h', Philippe Mathieu-Daudé, 2021/01/03
- [PULL 04/35] hw: Use the PCI_DEVFN() macro from 'hw/pci/pci.h', Philippe Mathieu-Daudé, 2021/01/03
- [PULL 05/35] hw/pci-host/bonito: Display hexadecimal value with '0x' prefix, Philippe Mathieu-Daudé, 2021/01/03
- [PULL 06/35] hw/pci-host/bonito: Use pci_config_set_interrupt_pin(), Philippe Mathieu-Daudé, 2021/01/03
- [PULL 07/35] vt82c686: Rename AC97/MC97 parts from VT82C686B to VIA, Philippe Mathieu-Daudé, 2021/01/03
- [PULL 08/35] vt82c686: Remove unnecessary _DEVICE suffix from type macros, Philippe Mathieu-Daudé, 2021/01/03
- [PULL 09/35] vt82c686: Rename VT82C686B to VT82C686B_ISA, Philippe Mathieu-Daudé, 2021/01/03
- [PULL 10/35] vt82c686: Remove vt82c686b_[am]c97_init() functions, Philippe Mathieu-Daudé, 2021/01/03
- [PULL 11/35] vt82c686: Split off via-[am]c97 into separate file in hw/audio, Philippe Mathieu-Daudé, 2021/01/03
- [PULL 12/35] audio/via-ac97: Simplify code and set user_creatable to false, Philippe Mathieu-Daudé, 2021/01/03