From 2be51206af88aba6662cdd9de5bd6c18989bbcbd Mon Sep 17 00:00:00 2001 From: Terje Bergstrom Date: Thu, 6 Apr 2017 13:21:10 -0700 Subject: gpu: nvgpu: pci: Use new error macros gk20a_err() and gk20a_warn() require a struct device pointer, which is not portable across operating systems. The new nvgpu_err() and nvgpu_warn() macros take struct gk20a pointer. Convert code to use the more portable macros. JIRA NVGPU-16 Change-Id: I747efef66aee6e58551e36737c06b3c1d0ec7858 Signed-off-by: Terje Bergstrom Reviewed-on: http://git-master/r/1457357 Reviewed-by: Alex Waterman --- drivers/gpu/nvgpu/pci.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'drivers') diff --git a/drivers/gpu/nvgpu/pci.c b/drivers/gpu/nvgpu/pci.c index 93c0a5cc..fb54ae18 100644 --- a/drivers/gpu/nvgpu/pci.c +++ b/drivers/gpu/nvgpu/pci.c @@ -256,7 +256,7 @@ static int nvgpu_pci_init_support(struct pci_dev *pdev) g->regs = ioremap(pci_resource_start(pdev, 0), pci_resource_len(pdev, 0)); if (IS_ERR(g->regs)) { - gk20a_err(dev_from_gk20a(g), "failed to remap gk20a registers"); + nvgpu_err(g, "failed to remap gk20a registers"); err = PTR_ERR(g->regs); goto fail; } @@ -264,7 +264,7 @@ static int nvgpu_pci_init_support(struct pci_dev *pdev) g->bar1 = ioremap(pci_resource_start(pdev, 1), pci_resource_len(pdev, 1)); if (IS_ERR(g->bar1)) { - gk20a_err(dev_from_gk20a(g), "failed to remap gk20a bar1"); + nvgpu_err(g, "failed to remap gk20a bar1"); err = PTR_ERR(g->bar1); goto fail; } @@ -350,7 +350,7 @@ static int nvgpu_pci_probe(struct pci_dev *pdev, g = kzalloc(sizeof(struct gk20a), GFP_KERNEL); if (!g) { - gk20a_err(&pdev->dev, "couldn't allocate gk20a support"); + nvgpu_err(g, "couldn't allocate gk20a support"); return -ENOMEM; } @@ -374,7 +374,7 @@ static int nvgpu_pci_probe(struct pci_dev *pdev, #if defined(CONFIG_PCI_MSI) err = pci_enable_msi(pdev); if (err) { - gk20a_err(&pdev->dev, + nvgpu_err(g, "MSI could not be enabled, falling back to legacy"); g->msi_enabled = false; } else @@ -395,7 +395,7 @@ static int nvgpu_pci_probe(struct pci_dev *pdev, #endif IRQF_SHARED, "nvgpu", g); if (err) { - gk20a_err(&pdev->dev, + nvgpu_err(g, "failed to request irq @ %d", g->irq_stall); return err; } @@ -411,7 +411,7 @@ static int nvgpu_pci_probe(struct pci_dev *pdev, return err; if (strchr(dev_name(&pdev->dev), '%')) { - gk20a_err(&pdev->dev, "illegal character in device name"); + nvgpu_err(g, "illegal character in device name"); return -EINVAL; } @@ -424,7 +424,7 @@ static int nvgpu_pci_probe(struct pci_dev *pdev, err = nvgpu_pci_pm_init(&pdev->dev); if (err) { - gk20a_err(&pdev->dev, "pm init failed"); + nvgpu_err(g, "pm init failed"); return err; } -- cgit v1.2.2