Le 19/11/2019 à 02:26, Andrew Donnellan a écrit :
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.
ok. We still walk the parent list, but we don't start from the first
parent any more. I'll rename with a more generic "node" to avoid confusion.
Fred