From 86ecddf68734e4a938eda351f4dde11ab507de3f Mon Sep 17 00:00:00 2001 From: Terje Bergstrom Date: Thu, 6 Apr 2017 12:09:01 -0700 Subject: gpu: nvgpu: gp106: 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: I18955b4c46c082883ee0bf589ab17cd66ab0add2 Signed-off-by: Terje Bergstrom Reviewed-on: http://git-master/r/1457346 Reviewed-by: mobile promotions Tested-by: mobile promotions --- drivers/gpu/nvgpu/gp106/gr_gp106.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) (limited to 'drivers/gpu/nvgpu/gp106/gr_gp106.c') diff --git a/drivers/gpu/nvgpu/gp106/gr_gp106.c b/drivers/gpu/nvgpu/gp106/gr_gp106.c index a804f9bb..08d6ec28 100644 --- a/drivers/gpu/nvgpu/gp106/gr_gp106.c +++ b/drivers/gpu/nvgpu/gp106/gr_gp106.c @@ -167,8 +167,7 @@ static int gr_gp106_set_ctxsw_preemption_mode(struct gk20a *g, g->gr.t18x.ctx_vars.preempt_image_size, &gr_ctx->t18x.preempt_ctxsw_buffer); if (err) { - gk20a_err(dev_from_gk20a(g), - "cannot allocate preempt buffer"); + nvgpu_err(g, "cannot allocate preempt buffer"); goto fail; } @@ -176,8 +175,7 @@ static int gr_gp106_set_ctxsw_preemption_mode(struct gk20a *g, spill_size, &gr_ctx->t18x.spill_ctxsw_buffer); if (err) { - gk20a_err(dev_from_gk20a(g), - "cannot allocate spill buffer"); + nvgpu_err(g, "cannot allocate spill buffer"); goto fail_free_preempt; } @@ -185,8 +183,7 @@ static int gr_gp106_set_ctxsw_preemption_mode(struct gk20a *g, attrib_cb_size, &gr_ctx->t18x.betacb_ctxsw_buffer); if (err) { - gk20a_err(dev_from_gk20a(g), - "cannot allocate beta buffer"); + nvgpu_err(g, "cannot allocate beta buffer"); goto fail_free_spill; } @@ -194,8 +191,7 @@ static int gr_gp106_set_ctxsw_preemption_mode(struct gk20a *g, pagepool_size, &gr_ctx->t18x.pagepool_ctxsw_buffer); if (err) { - gk20a_err(dev_from_gk20a(g), - "cannot allocate page pool"); + nvgpu_err(g, "cannot allocate page pool"); goto fail_free_betacb; } -- cgit v1.2.2