From 5405070ecd27ce462babc1dff231fec5cd8bd6b7 Mon Sep 17 00:00:00 2001 From: Terje Bergstrom Date: Thu, 6 Apr 2017 13:10:30 -0700 Subject: gpu: nvgpu: vgpu: 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: I071e8c50959bfa81730ca964d912bc69f9c7e6ad Signed-off-by: Terje Bergstrom Reviewed-on: http://git-master/r/1457355 Reviewed-by: mobile promotions Tested-by: mobile promotions --- drivers/gpu/nvgpu/vgpu/gp10b/vgpu_mm_gp10b.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'drivers/gpu/nvgpu/vgpu/gp10b/vgpu_mm_gp10b.c') diff --git a/drivers/gpu/nvgpu/vgpu/gp10b/vgpu_mm_gp10b.c b/drivers/gpu/nvgpu/vgpu/gp10b/vgpu_mm_gp10b.c index 2da18fb8..cfda867c 100644 --- a/drivers/gpu/nvgpu/vgpu/gp10b/vgpu_mm_gp10b.c +++ b/drivers/gpu/nvgpu/vgpu/gp10b/vgpu_mm_gp10b.c @@ -54,7 +54,6 @@ static u64 vgpu_gp10b_locked_gmmu_map(struct vm_gk20a *vm, enum nvgpu_aperture aperture) { int err = 0; - struct device *d = dev_from_vm(vm); struct gk20a *g = gk20a_from_vm(vm); struct tegra_vgpu_cmd_msg msg; struct tegra_vgpu_as_map_ex_params *p = &msg.params.as_map_ex; @@ -82,7 +81,7 @@ static u64 vgpu_gp10b_locked_gmmu_map(struct vm_gk20a *vm, if (!map_offset) { map_offset = gk20a_vm_alloc_va(vm, size, pgsz_idx); if (!map_offset) { - gk20a_err(d, "failed to allocate va space"); + nvgpu_err(g, "failed to allocate va space"); err = -ENOMEM; goto fail; } @@ -140,7 +139,7 @@ static u64 vgpu_gp10b_locked_gmmu_map(struct vm_gk20a *vm, vm->gmmu_page_sizes[gmmu_page_size_big]) { pgsz_idx = gmmu_page_size_big; } else { - gk20a_err(d, "invalid kernel page size %d\n", + nvgpu_err(g, "invalid kernel page size %d\n", page_size); goto fail; } @@ -171,7 +170,7 @@ static u64 vgpu_gp10b_locked_gmmu_map(struct vm_gk20a *vm, fail: if (handle) tegra_gr_comm_oob_put_ptr(handle); - gk20a_err(d, "%s: failed with err=%d\n", __func__, err); + nvgpu_err(g, "%s: failed with err=%d\n", __func__, err); return 0; } -- cgit v1.2.2