Message ID | 20191120012859.23300-40-oohall@gmail.com (mailing list archive) |
---|---|
State | RFC |
Headers | show |
Series | [Very,RFC,01/46] powerpc/eeh: Don't attempt to restore VF config space after reset | expand |
Context | Check | Description |
---|---|---|
snowpatch_ozlabs/apply_patch | warning | Failed to apply on branch powerpc/merge (784eee1cc44801366d4f197e0ade7739ee8e1e83) |
snowpatch_ozlabs/apply_patch | warning | Failed to apply on branch powerpc/next (0695f8bca93ea0c57f0e8e21b4b4db70183b3d1c) |
snowpatch_ozlabs/apply_patch | warning | Failed to apply on branch linus/master (c74386d50fbaf4a54fd3fe560f1abc709c0cff4b) |
snowpatch_ozlabs/apply_patch | warning | Failed to apply on branch powerpc/fixes (7d6475051fb3d9339c5c760ed9883bc0a9048b21) |
snowpatch_ozlabs/apply_patch | warning | Failed to apply on branch linux-next (5d1131b4d61e52e5702e0fa4bcbec81ac7d6ef52) |
snowpatch_ozlabs/apply_patch | fail | Failed to apply to any branch |
On 20/11/2019 12:28, Oliver O'Halloran wrote: > There's no need to use the pci_dn to find a device_node from a pci_dev. > Just search for the node pointed to by the pci_dev's of_node pointer. Reviewed-by: Alexey Kardashevskiy <aik@ozlabs.ru> > > Signed-off-by: Oliver O'Halloran <oohall@gmail.com> > --- > arch/powerpc/platforms/powernv/npu-dma.c | 8 ++++---- > 1 file changed, 4 insertions(+), 4 deletions(-) > > diff --git a/arch/powerpc/platforms/powernv/npu-dma.c b/arch/powerpc/platforms/powernv/npu-dma.c > index 68bfaef44862..72d3749da02c 100644 > --- a/arch/powerpc/platforms/powernv/npu-dma.c > +++ b/arch/powerpc/platforms/powernv/npu-dma.c > @@ -21,11 +21,11 @@ > > static struct pci_dev *get_pci_dev(struct device_node *dn) > { > - struct pci_dn *pdn = PCI_DN(dn); > - struct pci_dev *pdev; > + struct pci_dev *pdev = NULL; > > - pdev = pci_get_domain_bus_and_slot(pci_domain_nr(pdn->phb->bus), > - pdn->busno, pdn->devfn); > + for_each_pci_dev(pdev) > + if (pdev->dev.of_node == dn) > + break; > > /* > * pci_get_domain_bus_and_slot() increased the reference count of >
diff --git a/arch/powerpc/platforms/powernv/npu-dma.c b/arch/powerpc/platforms/powernv/npu-dma.c index 68bfaef44862..72d3749da02c 100644 --- a/arch/powerpc/platforms/powernv/npu-dma.c +++ b/arch/powerpc/platforms/powernv/npu-dma.c @@ -21,11 +21,11 @@ static struct pci_dev *get_pci_dev(struct device_node *dn) { - struct pci_dn *pdn = PCI_DN(dn); - struct pci_dev *pdev; + struct pci_dev *pdev = NULL; - pdev = pci_get_domain_bus_and_slot(pci_domain_nr(pdn->phb->bus), - pdn->busno, pdn->devfn); + for_each_pci_dev(pdev) + if (pdev->dev.of_node == dn) + break; /* * pci_get_domain_bus_and_slot() increased the reference count of
There's no need to use the pci_dn to find a device_node from a pci_dev. Just search for the node pointed to by the pci_dev's of_node pointer. Signed-off-by: Oliver O'Halloran <oohall@gmail.com> --- arch/powerpc/platforms/powernv/npu-dma.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)