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/gr_ctx_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/gr_ctx_gk20a.c')
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/gr_ctx_gk20a.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/gr_ctx_gk20a.c b/drivers/gpu/nvgpu/gk20a/gr_ctx_gk20a.c index 96185ee7..712359e1 100644 --- a/drivers/gpu/nvgpu/gk20a/gr_ctx_gk20a.c +++ b/drivers/gpu/nvgpu/gk20a/gr_ctx_gk20a.c | |||
@@ -23,6 +23,7 @@ | |||
23 | 23 | ||
24 | #include <nvgpu/nvgpu_common.h> | 24 | #include <nvgpu/nvgpu_common.h> |
25 | #include <nvgpu/kmem.h> | 25 | #include <nvgpu/kmem.h> |
26 | #include <nvgpu/log.h> | ||
26 | 27 | ||
27 | #include "gk20a.h" | 28 | #include "gk20a.h" |
28 | #include "gr_ctx_gk20a.h" | 29 | #include "gr_ctx_gk20a.h" |
@@ -111,7 +112,6 @@ static bool gr_gk20a_is_firmware_defined(void) | |||
111 | 112 | ||
112 | static int gr_gk20a_init_ctx_vars_fw(struct gk20a *g, struct gr_gk20a *gr) | 113 | static int gr_gk20a_init_ctx_vars_fw(struct gk20a *g, struct gr_gk20a *gr) |
113 | { | 114 | { |
114 | struct device *d = dev_from_gk20a(g); | ||
115 | const struct firmware *netlist_fw; | 115 | const struct firmware *netlist_fw; |
116 | struct netlist_image *netlist = NULL; | 116 | struct netlist_image *netlist = NULL; |
117 | char name[MAX_NETLIST_NAME]; | 117 | char name[MAX_NETLIST_NAME]; |
@@ -135,13 +135,13 @@ static int gr_gk20a_init_ctx_vars_fw(struct gk20a *g, struct gr_gk20a *gr) | |||
135 | 135 | ||
136 | for (; net < max; net++) { | 136 | for (; net < max; net++) { |
137 | if (g->ops.gr_ctx.get_netlist_name(g, net, name) != 0) { | 137 | if (g->ops.gr_ctx.get_netlist_name(g, net, name) != 0) { |
138 | gk20a_warn(d, "invalid netlist index %d", net); | 138 | nvgpu_warn(g, "invalid netlist index %d", net); |
139 | continue; | 139 | continue; |
140 | } | 140 | } |
141 | 141 | ||
142 | netlist_fw = nvgpu_request_firmware(g, name, 0); | 142 | netlist_fw = nvgpu_request_firmware(g, name, 0); |
143 | if (!netlist_fw) { | 143 | if (!netlist_fw) { |
144 | gk20a_warn(d, "failed to load netlist %s", name); | 144 | nvgpu_warn(g, "failed to load netlist %s", name); |
145 | continue; | 145 | continue; |
146 | } | 146 | } |
147 | 147 | ||
@@ -436,7 +436,7 @@ done: | |||
436 | gk20a_dbg_info("netlist image %s loaded", name); | 436 | gk20a_dbg_info("netlist image %s loaded", name); |
437 | return 0; | 437 | return 0; |
438 | } else { | 438 | } else { |
439 | gk20a_err(d, "failed to load netlist image!!"); | 439 | nvgpu_err(g, "failed to load netlist image!!"); |
440 | return err; | 440 | return err; |
441 | } | 441 | } |
442 | } | 442 | } |