diff options
author | Terje Bergstrom <tbergstrom@nvidia.com> | 2017-03-24 13:55:46 -0400 |
---|---|---|
committer | mobile promotions <svcmobile_promotions@nvidia.com> | 2017-03-28 15:05:03 -0400 |
commit | 3e39798997f0726472e18a17462216094c084074 (patch) | |
tree | cf68b3fff464c1217fa28ec27f6c612d5cfc66fb /drivers/gpu/nvgpu/gk20a/channel_gk20a.c | |
parent | 580c8112f08281332cefea16243fcfbf27cd6bdd (diff) |
gpu: nvgpu: Remove unnecessary use of dev_name()
Move the name field from struct gpu_ops up to struct gk20a. The field
is not a function op, so it doesn't belong in gpu_ops.
Replace all uses of dev_name() with use of g->name when possible.
JIRA NVGPU-16
Change-Id: Ic6e99e39258cbf3bb7c806962cbbd7de5126688f
Signed-off-by: Terje Bergstrom <tbergstrom@nvidia.com>
Reviewed-on: http://git-master/r/1328534
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/gk20a/channel_gk20a.c')
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/channel_gk20a.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/channel_gk20a.c b/drivers/gpu/nvgpu/gk20a/channel_gk20a.c index 8e0d3407..88495bde 100644 --- a/drivers/gpu/nvgpu/gk20a/channel_gk20a.c +++ b/drivers/gpu/nvgpu/gk20a/channel_gk20a.c | |||
@@ -1245,7 +1245,7 @@ int gk20a_channel_release(struct inode *inode, struct file *filp) | |||
1245 | goto channel_release; | 1245 | goto channel_release; |
1246 | } | 1246 | } |
1247 | 1247 | ||
1248 | trace_gk20a_channel_release(dev_name(g->dev)); | 1248 | trace_gk20a_channel_release(g->name); |
1249 | 1249 | ||
1250 | gk20a_channel_close(ch); | 1250 | gk20a_channel_close(ch); |
1251 | gk20a_idle(g); | 1251 | gk20a_idle(g); |
@@ -1396,7 +1396,7 @@ static int __gk20a_channel_open(struct gk20a *g, struct file *filp, s32 runlist_ | |||
1396 | if (!g) | 1396 | if (!g) |
1397 | return -ENODEV; | 1397 | return -ENODEV; |
1398 | 1398 | ||
1399 | trace_gk20a_channel_open(dev_name(g->dev)); | 1399 | trace_gk20a_channel_open(g->name); |
1400 | 1400 | ||
1401 | priv = nvgpu_kzalloc(g, sizeof(*priv)); | 1401 | priv = nvgpu_kzalloc(g, sizeof(*priv)); |
1402 | if (!priv) { | 1402 | if (!priv) { |
@@ -1463,7 +1463,7 @@ int gk20a_channel_open_ioctl(struct gk20a *g, | |||
1463 | fd = err; | 1463 | fd = err; |
1464 | 1464 | ||
1465 | snprintf(name, sizeof(name), "nvhost-%s-fd%d", | 1465 | snprintf(name, sizeof(name), "nvhost-%s-fd%d", |
1466 | dev_name(g->dev), fd); | 1466 | g->name, fd); |
1467 | 1467 | ||
1468 | file = anon_inode_getfile(name, g->channel.cdev.ops, NULL, O_RDWR); | 1468 | file = anon_inode_getfile(name, g->channel.cdev.ops, NULL, O_RDWR); |
1469 | if (IS_ERR(file)) { | 1469 | if (IS_ERR(file)) { |
@@ -2041,7 +2041,7 @@ static void trace_write_pushbuffer(struct channel_gk20a *c, | |||
2041 | */ | 2041 | */ |
2042 | for (i = 0; i < words; i += 128U) { | 2042 | for (i = 0; i < words; i += 128U) { |
2043 | trace_gk20a_push_cmdbuf( | 2043 | trace_gk20a_push_cmdbuf( |
2044 | dev_name(c->g->dev), | 2044 | c->g->name, |
2045 | 0, | 2045 | 0, |
2046 | min(words - i, 128U), | 2046 | min(words - i, 128U), |
2047 | offset + i * sizeof(u32), | 2047 | offset + i * sizeof(u32), |
@@ -2442,7 +2442,7 @@ int nvgpu_channel_worker_init(struct gk20a *g) | |||
2442 | INIT_LIST_HEAD(&g->channel_worker.items); | 2442 | INIT_LIST_HEAD(&g->channel_worker.items); |
2443 | nvgpu_spinlock_init(&g->channel_worker.items_lock); | 2443 | nvgpu_spinlock_init(&g->channel_worker.items_lock); |
2444 | task = kthread_run(gk20a_channel_poll_worker, g, | 2444 | task = kthread_run(gk20a_channel_poll_worker, g, |
2445 | "nvgpu_channel_poll_%s", dev_name(g->dev)); | 2445 | "nvgpu_channel_poll_%s", g->name); |
2446 | if (IS_ERR(task)) { | 2446 | if (IS_ERR(task)) { |
2447 | gk20a_err(g->dev, "failed to start channel poller thread"); | 2447 | gk20a_err(g->dev, "failed to start channel poller thread"); |
2448 | return PTR_ERR(task); | 2448 | return PTR_ERR(task); |
@@ -2753,7 +2753,7 @@ static void gk20a_submit_append_priv_cmdbuf(struct channel_gk20a *c, | |||
2753 | &x, sizeof(x)); | 2753 | &x, sizeof(x)); |
2754 | 2754 | ||
2755 | if (cmd->mem->aperture == APERTURE_SYSMEM) | 2755 | if (cmd->mem->aperture == APERTURE_SYSMEM) |
2756 | trace_gk20a_push_cmdbuf(dev_name(g->dev), 0, cmd->size, 0, | 2756 | trace_gk20a_push_cmdbuf(g->name, 0, cmd->size, 0, |
2757 | cmd->mem->cpu_va + cmd->off * sizeof(u32)); | 2757 | cmd->mem->cpu_va + cmd->off * sizeof(u32)); |
2758 | 2758 | ||
2759 | c->gpfifo.put = (c->gpfifo.put + 1) & (c->gpfifo.entry_num - 1); | 2759 | c->gpfifo.put = (c->gpfifo.put + 1) & (c->gpfifo.entry_num - 1); |
@@ -3147,7 +3147,7 @@ int gk20a_submit_channel_gpfifo(struct channel_gk20a *c, | |||
3147 | } | 3147 | } |
3148 | } | 3148 | } |
3149 | 3149 | ||
3150 | trace_gk20a_channel_submit_gpfifo(dev_name(c->g->dev), | 3150 | trace_gk20a_channel_submit_gpfifo(g->name, |
3151 | c->hw_chid, | 3151 | c->hw_chid, |
3152 | num_entries, | 3152 | num_entries, |
3153 | flags, | 3153 | flags, |
@@ -3219,7 +3219,7 @@ int gk20a_submit_channel_gpfifo(struct channel_gk20a *c, | |||
3219 | 3219 | ||
3220 | g->ops.fifo.userd_gp_put(g, c); | 3220 | g->ops.fifo.userd_gp_put(g, c); |
3221 | 3221 | ||
3222 | trace_gk20a_channel_submitted_gpfifo(dev_name(c->g->dev), | 3222 | trace_gk20a_channel_submitted_gpfifo(g->name, |
3223 | c->hw_chid, | 3223 | c->hw_chid, |
3224 | num_entries, | 3224 | num_entries, |
3225 | flags, | 3225 | flags, |