Skip to contentSkip to conversation

powerpc/pci: remove the multi-init for pci_dn->phb

PATCH Superseded Wei Yang 2 participants 5 messages Dec 13, 2014 – Dec 15, 2014 PowerPC

lore
Share & tools
lore

Wei Yang

author
#0 lore raw

PATCH 1/1 powerpc/pci: remove the multi-init for pci_dn->phb

pci_dn->phb is set to phb in update_dn_pci_info(), if succeed.

This patch removes the duplication of pci_dn->phb initialization.

---
 arch/powerpc/kernel/pci_dn.c |    1 -
 1 file changed, 1 deletion(-)
arch/powerpc/kernel/pci_dn.c +0 -1
index ddae246..d40b579 100644
@@ -382,7 +382,6 @@ void pci_devs_phb_init_dynamic(struct pci_controller *phb)
 	pdn = dn->data;
 	if (pdn) {
 		pdn->devfn = pdn->busno = -1;
-		pdn->phb = phb;
 		phb->firmware_data = pdn;
 	}
 
Signature · 1 line
1.7.9.5
#1 lore raw
Quoted 14 lines · Wei Yang

pci_dn->phb is set to phb in update_dn_pci_info(), if succeed.

This patch removes the duplication of pci_dn->phb initialization.

---
arch/powerpc/kernel/pci_dn.c | 1 -

1 file changed, 1 deletion(-)
arch/powerpc/kernel/pci_dn.c +0 -0
index ddae246..d40b579 100644

arch/powerpc/kernel/pci_dn.c void pci_devs_phb_init_dynamic(struct pci_controller *phb) · line 385

Quoted 5 lines
arch/powerpc/kernel/pci_dn.c +0 -1
@@ -382,7 +382,6 @@ void pci_devs_phb_init_dynamic(struct pci_controller *phb)
 	pdn = dn->data;
 	if (pdn) {
 		pdn->devfn = pdn->busno = -1;
-		pdn->phb = phb;
 		phb->firmware_data = pdn;

It seems the patch bases on unmerged code because "phb->firmware_data" isn't existing yet in upstream or ppc.next.

Thanks,
Gavin

Quoted 9 lines
arch/powerpc/kernel/pci_dn.c +0 -0
 	}
 
Signature · 6 lines
1.7.9.5

_______________________________________________
Linuxppc-dev mailing list
[email protected]
https://lists.ozlabs.org/listinfo/linuxppc-dev
author
#2 lore raw
Quoted 10 lines · Gavin Shan
Quoted 9 lines · Wei Yang

pci_dn->phb is set to phb in update_dn_pci_info(), if succeed.

This patch removes the duplication of pci_dn->phb initialization.

---
arch/powerpc/kernel/pci_dn.c | 1 -

1 file changed, 1 deletion(-)
Quoted 14 lines

arch/powerpc/kernel/pci_dn.c void pci_devs_phb_init_dynamic(struct pci_controller *phb) · line 385

Quoted 10 lines
arch/powerpc/kernel/pci_dn.c +0 -1
index ddae246..d40b579 100644
@@ -382,7 +382,6 @@ void pci_devs_phb_init_dynamic(struct pci_controller *phb)
 	pdn = dn->data;
 	if (pdn) {
 		pdn->devfn = pdn->busno = -1;
-		pdn->phb = phb;
 		phb->firmware_data = pdn;

It seems the patch bases on unmerged code because "phb->firmware_data" isn't existing yet in upstream or ppc.next.

Oh, my mistake. I will rebase it on the latest upstream.

Quoted 12 lines

Thanks,
Gavin

Quoted 9 lines
arch/powerpc/kernel/pci_dn.c +0 -0
 	}
 
Signature · 6 lines
1.7.9.5

_______________________________________________
Linuxppc-dev mailing list
[email protected]
https://lists.ozlabs.org/listinfo/linuxppc-dev
Signature · 2 lines
Richard Yang
Help you, Help me
author
#3 lore raw

PATCH v2 1/1 powerpc/pci: remove the multi-init for pci_dn->phb

In reply to Gavin Shan

pci_dn->phb is set to phb in update_dn_pci_info(), if succeed.

This patch removes the duplication of pci_dn->phb initialization.

V2:
* rebase the code on v3.18

---
 arch/powerpc/kernel/pci_dn.c |    4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
arch/powerpc/kernel/pci_dn.c +1 -3
index 1f61fab..83df307 100644
@@ -147,10 +147,8 @@ void pci_devs_phb_init_dynamic(struct pci_controller *phb)
 	/* PHB nodes themselves must not match */
 	update_dn_pci_info(dn, phb);
 	pdn = dn->data;
-	if (pdn) {
+	if (pdn)
 		pdn->devfn = pdn->busno = -1;
-		pdn->phb = phb;
-	}
 
 	/* Update dn->phb ptrs for new phb and children devices */
 	traverse_pci_devices(dn, update_dn_pci_info, phb);
Signature · 1 line
1.7.9.5
Reviewed-by on v2 1/1
#4 lore raw
Quoted 5 lines · Wei Yang

pci_dn->phb is set to phb in update_dn_pci_info(), if succeed.

This patch removes the duplication of pci_dn->phb initialization.

Thanks,
Gavin

Quoted 26 lines

V2:
* rebase the code on v3.18
---
arch/powerpc/kernel/pci_dn.c | 4 +---

1 file changed, 1 insertion(+), 3 deletions(-)
arch/powerpc/kernel/pci_dn.c +1 -3
index 1f61fab..83df307 100644
@@ -147,10 +147,8 @@ void pci_devs_phb_init_dynamic(struct pci_controller *phb)
 	/* PHB nodes themselves must not match */
 	update_dn_pci_info(dn, phb);
 	pdn = dn->data;
-	if (pdn) {
+	if (pdn)
 		pdn->devfn = pdn->busno = -1;
-		pdn->phb = phb;
-	}
 
 	/* Update dn->phb ptrs for new phb and children devices */
 	traverse_pci_devices(dn, update_dn_pci_info, phb);
Signature · 1 line
1.7.9.5