From 0e39ad429e8aa68cd11e464cd76a8b9d1912fb7d Mon Sep 17 00:00:00 2001 From: Richard Zhao Date: Mon, 29 Jan 2018 16:15:58 -0800 Subject: gpu: nvgpu: vgpu: move to nvgpu_err/info from dev_err/info It helps code be more portable. Jira EVLR-2364 Change-Id: I0cc1fa739d7884d3c863975f08b3b592acd34613 Signed-off-by: Richard Zhao Reviewed-on: https://git-master.nvidia.com/r/1649941 Reviewed-by: Aingara Paramakuru Reviewed-by: Terje Bergstrom GVS: Gerrit_Virtual_Submit Reviewed-by: Nirav Patel Reviewed-by: mobile promotions Tested-by: mobile promotions --- drivers/gpu/nvgpu/common/linux/vgpu/fifo_vgpu.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'drivers/gpu/nvgpu/common/linux/vgpu/fifo_vgpu.c') diff --git a/drivers/gpu/nvgpu/common/linux/vgpu/fifo_vgpu.c b/drivers/gpu/nvgpu/common/linux/vgpu/fifo_vgpu.c index e8ca9d2f..2a7cfdb3 100644 --- a/drivers/gpu/nvgpu/common/linux/vgpu/fifo_vgpu.c +++ b/drivers/gpu/nvgpu/common/linux/vgpu/fifo_vgpu.c @@ -147,7 +147,6 @@ int vgpu_channel_setup_ramfc(struct channel_gk20a *ch, u64 gpfifo_base, u32 gpfifo_entries, unsigned long acquire_timeout, u32 flags) { - struct device __maybe_unused *d = dev_from_gk20a(ch->g); struct tegra_vgpu_cmd_msg msg; struct tegra_vgpu_ramfc_params *p = &msg.params.ramfc; int err; @@ -211,7 +210,6 @@ int vgpu_fifo_init_engine_info(struct fifo_gk20a *f) static int init_runlist(struct gk20a *g, struct fifo_gk20a *f) { struct fifo_runlist_info_gk20a *runlist; - struct device *d = dev_from_gk20a(g); unsigned int runlist_id = -1; u32 i; u64 runlist_size; @@ -242,7 +240,7 @@ static int init_runlist(struct gk20a *g, struct fifo_gk20a *f) int err = nvgpu_dma_alloc_sys(g, runlist_size, &runlist->mem[i]); if (err) { - dev_err(d, "memory allocation failed\n"); + nvgpu_err(g, "memory allocation failed"); goto clean_up_runlist; } } @@ -266,7 +264,6 @@ static int vgpu_init_fifo_setup_sw(struct gk20a *g) { struct nvgpu_os_linux *l = nvgpu_os_linux_from_gk20a(g); struct fifo_gk20a *f = &g->fifo; - struct device *d = dev_from_gk20a(g); struct vgpu_priv_data *priv = vgpu_get_priv_data(g); unsigned int chid; int err = 0; @@ -287,7 +284,7 @@ static int vgpu_init_fifo_setup_sw(struct gk20a *g) err = nvgpu_dma_alloc_sys(g, f->userd_entry_size * f->num_channels, &f->userd); if (err) { - dev_err(d, "memory allocation failed\n"); + nvgpu_err(g, "memory allocation failed"); goto clean_up; } @@ -296,7 +293,7 @@ static int vgpu_init_fifo_setup_sw(struct gk20a *g) f->userd.gpu_va = vgpu_bar1_map(g, &f->userd.priv.sgt, f->userd.size); if (!f->userd.gpu_va) { - dev_err(d, "gmmu mapping failed\n"); + nvgpu_err(g, "gmmu mapping failed"); goto clean_up; } /* if reduced BAR1 range is specified, use offset of 0 -- cgit v1.2.2