Skip to contentSkip to conversation

pci: fix typo in nvkm_pcie_set_link()

PATCH In review Alexandre Courbot 3 participants 3 messages Feb 3, 2016 2 messages not in the archive

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 pci: fix typo in nvkm_pcie_set_link()

Fix a test that would either do nothing on PCI systems, or crash badly on Tegra.

---
 drm/nouveau/nvkm/subdev/pci/pcie.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drm/nouveau/nvkm/subdev/pci/pcie.c +1 -1
index b32954f5311e..d71e5db5028a 100644
@@ -119,7 +119,7 @@ nvkm_pcie_set_link(struct nvkm_pci *pci, enum nvkm_pcie_speed speed, u8 width)
 	struct pci_bus *pbus;
 	int ret;
 
-	if (pci || !pci_is_pcie(pci->pdev))
+	if (!pci || !pci_is_pcie(pci->pdev))
 		return 0;
 	pbus = pci->pdev->bus;
 
Signature · 6 lines
2.7.0

_______________________________________________
Nouveau mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/nouveau
#2 lore raw
In reply to a message not in the archive
Quoted 14 lines · Alexandre Courbot

Fix a test that would either do nothing on PCI systems, or crash badly on Tegra.

---
  drm/nouveau/nvkm/subdev/pci/pcie.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
drm/nouveau/nvkm/subdev/pci/pcie.c +0 -0
index b32954f5311e..d71e5db5028a 100644

drm/nouveau/nvkm/subdev/pci/pcie.c nvkm_pcie_set_link(struct nvkm_pci *pci, enum nvkm_pcie_speed speed, u8 width) · line 124

Quoted 7 lines
drm/nouveau/nvkm/subdev/pci/pcie.c +1 -1
@@ -119,7 +119,7 @@ nvkm_pcie_set_link(struct nvkm_pci *pci, enum nvkm_pcie_speed speed, u8 width)
  	struct pci_bus *pbus;
  	int ret;
 
-	if (pci || !pci_is_pcie(pci->pdev))
+	if (!pci || !pci_is_pcie(pci->pdev))
  		return 0;
  	pbus = pci->pdev->bus;

This has already been fixed but Ben still didn't apply this change to his repository.

http://cgit.freedesktop.org/~airlied/linux/tree/drivers/gpu/drm/nouveau/nvkm/subdev/pci/pcie.c?h=drm-next#n122

Quoted 2 lines
Signature · 5 lines
-Samuel
_______________________________________________
Nouveau mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/nouveau
#4 lore raw
In reply to a message not in the archive
Quoted 32 lines · Samuel Pitoiset
Quoted 16 lines · Alexandre Courbot

Fix a test that would either do nothing on PCI systems, or crash badly on Tegra.

---
  drm/nouveau/nvkm/subdev/pci/pcie.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
drm/nouveau/nvkm/subdev/pci/pcie.c +0 -0
index b32954f5311e..d71e5db5028a 100644

drm/nouveau/nvkm/subdev/pci/pcie.c nvkm_pcie_set_link(struct nvkm_pci *pci, enum · line 125

Quoted 8 lines
drm/nouveau/nvkm/subdev/pci/pcie.c +1 -1
@@ -119,7 +119,7 @@ nvkm_pcie_set_link(struct nvkm_pci *pci, enum
 nvkm_pcie_speed speed, u8 width)
        struct pci_bus *pbus;
        int ret;
 
-       if (pci || !pci_is_pcie(pci->pdev))
+       if (!pci || !pci_is_pcie(pci->pdev))
                return 0;
        pbus = pci->pdev->bus;

This has already been fixed but Ben still didn't apply this change to his repository.

Quoted 1 line

http://cgit.freedesktop.org/~airlied/linux/tree/drivers/gpu/drm/nouveau/nvkm/subdev/pci/pcie.c?h=drm-next#n122

Ah, perfect then. Dropping this patch.

Cheers,
Alex.
_______________________________________________
Nouveau mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/nouveau