diff options
author | Terje Bergstrom <tbergstrom@nvidia.com> | 2017-03-30 10:44:03 -0400 |
---|---|---|
committer | mobile promotions <svcmobile_promotions@nvidia.com> | 2017-04-10 22:04:19 -0400 |
commit | 3ba374a5d94f8c2067731155afaf79f03e6c390c (patch) | |
tree | d8a2bd0d52b1e8862510aedeb7529944c0b7e28e /drivers/gpu/nvgpu/gk20a/ctxsw_trace_gk20a.c | |
parent | 2be51206af88aba6662cdd9de5bd6c18989bbcbd (diff) |
gpu: nvgpu: gk20a: Use new error macro
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: Ia51f36d94c5ce57a5a0ab83b3c83a6bce09e2d5c
Signed-off-by: Terje Bergstrom <tbergstrom@nvidia.com>
Reviewed-on: http://git-master/r/1331694
Reviewed-by: svccoveritychecker <svccoveritychecker@nvidia.com>
Reviewed-by: Alex Waterman <alexw@nvidia.com>
GVS: Gerrit_Virtual_Submit
Diffstat (limited to 'drivers/gpu/nvgpu/gk20a/ctxsw_trace_gk20a.c')
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/ctxsw_trace_gk20a.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/ctxsw_trace_gk20a.c b/drivers/gpu/nvgpu/gk20a/ctxsw_trace_gk20a.c index cc008844..b33845d1 100644 --- a/drivers/gpu/nvgpu/gk20a/ctxsw_trace_gk20a.c +++ b/drivers/gpu/nvgpu/gk20a/ctxsw_trace_gk20a.c | |||
@@ -32,6 +32,8 @@ | |||
32 | #include "gk20a.h" | 32 | #include "gk20a.h" |
33 | #include "gr_gk20a.h" | 33 | #include "gr_gk20a.h" |
34 | 34 | ||
35 | #include <nvgpu/log.h> | ||
36 | |||
35 | #include <nvgpu/hw/gk20a/hw_ctxsw_prog_gk20a.h> | 37 | #include <nvgpu/hw/gk20a/hw_ctxsw_prog_gk20a.h> |
36 | #include <nvgpu/hw/gk20a/hw_gr_gk20a.h> | 38 | #include <nvgpu/hw/gk20a/hw_gr_gk20a.h> |
37 | 39 | ||
@@ -601,7 +603,7 @@ int gk20a_ctxsw_trace_write(struct gk20a *g, | |||
601 | 603 | ||
602 | write_idx = hdr->write_idx; | 604 | write_idx = hdr->write_idx; |
603 | if (write_idx >= dev->num_ents) { | 605 | if (write_idx >= dev->num_ents) { |
604 | gk20a_err(dev_from_gk20a(dev->g), | 606 | nvgpu_err(dev->g, |
605 | "write_idx=%u out of range [0..%u]", | 607 | "write_idx=%u out of range [0..%u]", |
606 | write_idx, dev->num_ents); | 608 | write_idx, dev->num_ents); |
607 | ret = -ENOSPC; | 609 | ret = -ENOSPC; |