"4c3b89e powerpc/powernv: Add sanity checks to pnv_pci_get_{gpu|npu}_dev"
introduced explicit warnings in pnv_pci_get_npu_dev() when a PCIe device
has no associated device-tree node. However not all PCIe devices have an
of_node and pnv_pci_get_npu_dev() gets indirectly called at least once for
every PCIe device in the system. This results in spurious WARN_ON()'s so
remove it.
The same situation should not exist for pnv_pci_get_gpu_dev() as any NPU
based PCIe device requires a device-tree node.
Signed-off-by: Alistair Popple <redacted>
Reported-by: Alexey Kardashevskiy <redacted>
---
arch/powerpc/platforms/powernv/npu-dma.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
@@ -75,7 +75,8 @@ struct pci_dev *pnv_pci_get_npu_dev(struct pci_dev *gpdev, int index)if(WARN_ON(!gpdev))returnNULL;-if(WARN_ON(!gpdev->dev.of_node))+/* Not all PCI devices have device-tree nodes */+if(!gpdev->dev.of_node)returnNULL;/* Get assoicated PCI device */
"4c3b89e powerpc/powernv: Add sanity checks to pnv_pci_get_{gpu|npu}_dev"
introduced explicit warnings in pnv_pci_get_npu_dev() when a PCIe device
has no associated device-tree node. However not all PCIe devices have an
of_node and pnv_pci_get_npu_dev() gets indirectly called at least once for
every PCIe device in the system. This results in spurious WARN_ON()'s so
remove it.
The same situation should not exist for pnv_pci_get_gpu_dev() as any NPU
based PCIe device requires a device-tree node.
Signed-off-by: Alistair Popple <redacted>
Reported-by: Alexey Kardashevskiy <redacted>
@@ -75,7 +75,8 @@ struct pci_dev *pnv_pci_get_npu_dev(struct pci_dev *gpdev, int index)if(WARN_ON(!gpdev))returnNULL;-if(WARN_ON(!gpdev->dev.of_node))+/* Not all PCI devices have device-tree nodes */+if(!gpdev->dev.of_node)returnNULL;/* Get assoicated PCI device */
From: Michael Ellerman <hidden> Date: 2017-06-15 22:50:23
On Wed, 2017-06-14 at 04:47:50 UTC, Alistair Popple wrote:
"4c3b89e powerpc/powernv: Add sanity checks to pnv_pci_get_{gpu|npu}_dev"
introduced explicit warnings in pnv_pci_get_npu_dev() when a PCIe device
has no associated device-tree node. However not all PCIe devices have an
of_node and pnv_pci_get_npu_dev() gets indirectly called at least once for
every PCIe device in the system. This results in spurious WARN_ON()'s so
remove it.
The same situation should not exist for pnv_pci_get_gpu_dev() as any NPU
based PCIe device requires a device-tree node.
Signed-off-by: Alistair Popple <redacted>
Reported-by: Alexey Kardashevskiy <redacted>