[PATCH 05/11] powerpc/powernv/ioda: Find opencapi slot for a device node

Andrew Donnellan ajd at linux.ibm.com
Tue Nov 19 12:26:01 AEDT 2019


On 10/9/19 1:45 am, Frederic Barrat wrote:
> diff --git a/arch/powerpc/platforms/powernv/pci.c b/arch/powerpc/platforms/powernv/pci.c
> index 6104418c9ad5..00a79f3c989f 100644
> --- a/arch/powerpc/platforms/powernv/pci.c
> +++ b/arch/powerpc/platforms/powernv/pci.c
> @@ -48,13 +48,14 @@ int pnv_pci_get_slot_id(struct device_node *np, uint64_t *id)
>   		return -ENXIO;
>   
>   	bdfn = ((bdfn & 0x00ffff00) >> 8);
> -	while ((parent = of_get_parent(parent))) {
> +	for (parent = np; parent; parent = of_get_parent(parent)) {

I think we should rename this pointer from "parent" as it no longer 
means that.

-- 
Andrew Donnellan              OzLabs, ADL Canberra
ajd at linux.ibm.com             IBM Australia Limited



More information about the Linuxppc-dev mailing list