summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTerje Bergstrom <tbergstrom@nvidia.com>2017-04-06 16:21:10 -0400
committermobile promotions <svcmobile_promotions@nvidia.com>2017-04-10 15:24:28 -0400
commit2be51206af88aba6662cdd9de5bd6c18989bbcbd (patch)
tree7c9f385a436c18222d9c84c06a870856e30afd1c
parent04d9de84783bcf16f97516fa9602d118820831f4 (diff)
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 <tbergstrom@nvidia.com> Reviewed-on: http://git-master/r/1457357 Reviewed-by: Alex Waterman <alexw@nvidia.com>
-rw-r--r--drivers/gpu/nvgpu/pci.c14
1 files changed, 7 insertions, 7 deletions
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)
256 g->regs = ioremap(pci_resource_start(pdev, 0), 256 g->regs = ioremap(pci_resource_start(pdev, 0),
257 pci_resource_len(pdev, 0)); 257 pci_resource_len(pdev, 0));
258 if (IS_ERR(g->regs)) { 258 if (IS_ERR(g->regs)) {
259 gk20a_err(dev_from_gk20a(g), "failed to remap gk20a registers"); 259 nvgpu_err(g, "failed to remap gk20a registers");
260 err = PTR_ERR(g->regs); 260 err = PTR_ERR(g->regs);
261 goto fail; 261 goto fail;
262 } 262 }
@@ -264,7 +264,7 @@ static int nvgpu_pci_init_support(struct pci_dev *pdev)
264 g->bar1 = ioremap(pci_resource_start(pdev, 1), 264 g->bar1 = ioremap(pci_resource_start(pdev, 1),
265 pci_resource_len(pdev, 1)); 265 pci_resource_len(pdev, 1));
266 if (IS_ERR(g->bar1)) { 266 if (IS_ERR(g->bar1)) {
267 gk20a_err(dev_from_gk20a(g), "failed to remap gk20a bar1"); 267 nvgpu_err(g, "failed to remap gk20a bar1");
268 err = PTR_ERR(g->bar1); 268 err = PTR_ERR(g->bar1);
269 goto fail; 269 goto fail;
270 } 270 }
@@ -350,7 +350,7 @@ static int nvgpu_pci_probe(struct pci_dev *pdev,
350 350
351 g = kzalloc(sizeof(struct gk20a), GFP_KERNEL); 351 g = kzalloc(sizeof(struct gk20a), GFP_KERNEL);
352 if (!g) { 352 if (!g) {
353 gk20a_err(&pdev->dev, "couldn't allocate gk20a support"); 353 nvgpu_err(g, "couldn't allocate gk20a support");
354 return -ENOMEM; 354 return -ENOMEM;
355 } 355 }
356 356
@@ -374,7 +374,7 @@ static int nvgpu_pci_probe(struct pci_dev *pdev,
374#if defined(CONFIG_PCI_MSI) 374#if defined(CONFIG_PCI_MSI)
375 err = pci_enable_msi(pdev); 375 err = pci_enable_msi(pdev);
376 if (err) { 376 if (err) {
377 gk20a_err(&pdev->dev, 377 nvgpu_err(g,
378 "MSI could not be enabled, falling back to legacy"); 378 "MSI could not be enabled, falling back to legacy");
379 g->msi_enabled = false; 379 g->msi_enabled = false;
380 } else 380 } else
@@ -395,7 +395,7 @@ static int nvgpu_pci_probe(struct pci_dev *pdev,
395#endif 395#endif
396 IRQF_SHARED, "nvgpu", g); 396 IRQF_SHARED, "nvgpu", g);
397 if (err) { 397 if (err) {
398 gk20a_err(&pdev->dev, 398 nvgpu_err(g,
399 "failed to request irq @ %d", g->irq_stall); 399 "failed to request irq @ %d", g->irq_stall);
400 return err; 400 return err;
401 } 401 }
@@ -411,7 +411,7 @@ static int nvgpu_pci_probe(struct pci_dev *pdev,
411 return err; 411 return err;
412 412
413 if (strchr(dev_name(&pdev->dev), '%')) { 413 if (strchr(dev_name(&pdev->dev), '%')) {
414 gk20a_err(&pdev->dev, "illegal character in device name"); 414 nvgpu_err(g, "illegal character in device name");
415 return -EINVAL; 415 return -EINVAL;
416 } 416 }
417 417
@@ -424,7 +424,7 @@ static int nvgpu_pci_probe(struct pci_dev *pdev,
424 424
425 err = nvgpu_pci_pm_init(&pdev->dev); 425 err = nvgpu_pci_pm_init(&pdev->dev);
426 if (err) { 426 if (err) {
427 gk20a_err(&pdev->dev, "pm init failed"); 427 nvgpu_err(g, "pm init failed");
428 return err; 428 return err;
429 } 429 }
430 430