[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 3/5] hw/pci-host/uninorth: Use the PCI_FUNC() macro from 'hw/
From: |
David Gibson |
Subject: |
Re: [PATCH 3/5] hw/pci-host/uninorth: Use the PCI_FUNC() macro from 'hw/pci/pci.h' |
Date: |
Tue, 13 Oct 2020 11:42:56 +1100 |
On Mon, Oct 12, 2020 at 02:45:04PM +0200, Philippe Mathieu-Daudé wrote:
> From: Philippe Mathieu-Daudé <f4bug@amsat.org>
>
> 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>
> ---
> 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 */
--
David Gibson | I'll have my music baroque, and my code
david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_
| _way_ _around_!
http://www.ozlabs.org/~dgibson
signature.asc
Description: PGP signature
- [PATCH 0/5] hw: Use PCI macros from 'hw/pci/pci.h', Philippe Mathieu-Daudé, 2020/10/12
- [PATCH 1/5] hw/pci-host/bonito: Make PCI_ADDR() macro more readable, Philippe Mathieu-Daudé, 2020/10/12
- [PATCH 2/5] hw/pci-host: Use the PCI_BUILD_BDF() macro from 'hw/pci/pci.h', Philippe Mathieu-Daudé, 2020/10/12
- [PATCH 3/5] hw/pci-host/uninorth: Use the PCI_FUNC() macro from 'hw/pci/pci.h', Philippe Mathieu-Daudé, 2020/10/12
- Re: [PATCH 3/5] hw/pci-host/uninorth: Use the PCI_FUNC() macro from 'hw/pci/pci.h',
David Gibson <=
- [PATCH 4/5] hw: Use the PCI_SLOT() macro from 'hw/pci/pci.h', Philippe Mathieu-Daudé, 2020/10/12
- [PATCH 5/5] hw: Use the PCI_DEVFN() macro from 'hw/pci/pci.h', Philippe Mathieu-Daudé, 2020/10/12