]> git.baikalelectronics.ru Git - kernel.git/commit
powerpc/npu-dma: Remove spurious WARN_ON when a PCI device has no of_node
authorAlistair Popple <alistair@popple.id.au>
Wed, 14 Jun 2017 04:47:50 +0000 (14:47 +1000)
committerMichael Ellerman <mpe@ellerman.id.au>
Wed, 14 Jun 2017 05:23:19 +0000 (15:23 +1000)
commit0de8077226761989aa3e25b7ff47276a1d2dd369
tree298ad8b55f45348c5b17cbdb6f02381e6e4fc157
parentd9f3e99f92120f779fcd8faee7e218cff32939c7
powerpc/npu-dma: Remove spurious WARN_ON when a PCI device has no of_node

Commit de587087f9b9 ("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.

Fixes: de587087f9b9 ("powerpc/powernv: Add sanity checks to pnv_pci_get_{gpu|npu}_dev")
Reported-by: Alexey Kardashevskiy <aik@ozlabs.ru>
Signed-off-by: Alistair Popple <alistair@popple.id.au>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
arch/powerpc/platforms/powernv/npu-dma.c