]> git.proxmox.com Git - mirror_ubuntu-zesty-kernel.git/commit
powerpc/npu-dma: Remove spurious WARN_ON when a PCI device has no of_node
authorAlistair Popple <alistair@popple.id.au>
Thu, 29 Jun 2017 16:40:13 +0000 (13:40 -0300)
committerThadeu Lima de Souza Cascardo <cascardo@canonical.com>
Tue, 11 Jul 2017 19:16:52 +0000 (16:16 -0300)
commit95ed9fe6066a3848d4d0d8788a0e84832c420c68
tree032c4f8ea00cbedd78d30ff41dd64779c6bdcecc
parent52f74e51aac1521e81aecc22e57bef8cc41ee7d7
powerpc/npu-dma: Remove spurious WARN_ON when a PCI device has no of_node

BugLink: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1701272
Commit 4c3b89effc28 ("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: 4c3b89effc28 ("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>
(cherry picked from commit 377aa6b0efbaa29cfeecd8b9244641217f9544ca)
Signed-off-by: Breno Leitao <breno.leitao@gmail.com>
Acked-by: Seth Forshee <seth.forshee@canonical.com>
Acked-by: Stefan Bader <stefan.bader@canonical.com>
Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@canonical.com>
arch/powerpc/platforms/powernv/npu-dma.c