Commit 99e629f1 authored by Alexander Lobakin's avatar Alexander Lobakin Committed by Bjorn Helgaas

PCI: dwc: Fix inverted condition of DMA mask setup warning

Commit 660c4865 ("PCI: dwc: Set 32-bit DMA mask for MSI target address
allocation") added dma_mask_set() call to explicitly set 32-bit DMA mask
for MSI message mapping, but for now it throws a warning on ret == 0, while
dma_set_mask() returns 0 in case of success.

Fix this by inverting the condition.

[bhelgaas: join string to make it greppable]
Fixes: 660c4865 ("PCI: dwc: Set 32-bit DMA mask for MSI target address allocation")
Link: https://lore.kernel.org/r/20201222150708.67983-1-alobakin@pm.meSigned-off-by: default avatarAlexander Lobakin <alobakin@pm.me>
Signed-off-by: default avatarBjorn Helgaas <bhelgaas@google.com>
parent 275e88b0
...@@ -397,12 +397,8 @@ int dw_pcie_host_init(struct pcie_port *pp) ...@@ -397,12 +397,8 @@ int dw_pcie_host_init(struct pcie_port *pp)
pp); pp);
ret = dma_set_mask(pci->dev, DMA_BIT_MASK(32)); ret = dma_set_mask(pci->dev, DMA_BIT_MASK(32));
if (!ret) { if (ret)
dev_warn(pci->dev, dev_warn(pci->dev, "Failed to set DMA mask to 32-bit. Devices with only 32-bit MSI support may not work properly\n");
"Failed to set DMA mask to 32-bit. "
"Devices with only 32-bit MSI support"
" may not work properly\n");
}
pp->msi_data = dma_map_single_attrs(pci->dev, &pp->msi_msg, pp->msi_data = dma_map_single_attrs(pci->dev, &pp->msi_msg,
sizeof(pp->msi_msg), sizeof(pp->msi_msg),
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment