Thread (50 messages) 50 messages, 6 authors, 2019-11-19

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

From: Frederic Barrat <hidden>
Date: 2019-11-19 14:35:55


Le 19/11/2019 à 02:26, Andrew Donnellan a écrit :
On 10/9/19 1:45 am, Frederic Barrat wrote:
quoted
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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help