mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-24 02:22:34 +03:00
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
This commit is contained in:
committed by
mobile promotions
parent
2be51206af
commit
3ba374a5d9
@@ -23,6 +23,7 @@
|
||||
|
||||
#include <nvgpu/nvgpu_common.h>
|
||||
#include <nvgpu/kmem.h>
|
||||
#include <nvgpu/log.h>
|
||||
|
||||
#include "gk20a.h"
|
||||
#include "gr_ctx_gk20a.h"
|
||||
@@ -111,7 +112,6 @@ static bool gr_gk20a_is_firmware_defined(void)
|
||||
|
||||
static int gr_gk20a_init_ctx_vars_fw(struct gk20a *g, struct gr_gk20a *gr)
|
||||
{
|
||||
struct device *d = dev_from_gk20a(g);
|
||||
const struct firmware *netlist_fw;
|
||||
struct netlist_image *netlist = NULL;
|
||||
char name[MAX_NETLIST_NAME];
|
||||
@@ -135,13 +135,13 @@ static int gr_gk20a_init_ctx_vars_fw(struct gk20a *g, struct gr_gk20a *gr)
|
||||
|
||||
for (; net < max; net++) {
|
||||
if (g->ops.gr_ctx.get_netlist_name(g, net, name) != 0) {
|
||||
gk20a_warn(d, "invalid netlist index %d", net);
|
||||
nvgpu_warn(g, "invalid netlist index %d", net);
|
||||
continue;
|
||||
}
|
||||
|
||||
netlist_fw = nvgpu_request_firmware(g, name, 0);
|
||||
if (!netlist_fw) {
|
||||
gk20a_warn(d, "failed to load netlist %s", name);
|
||||
nvgpu_warn(g, "failed to load netlist %s", name);
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -436,7 +436,7 @@ done:
|
||||
gk20a_dbg_info("netlist image %s loaded", name);
|
||||
return 0;
|
||||
} else {
|
||||
gk20a_err(d, "failed to load netlist image!!");
|
||||
nvgpu_err(g, "failed to load netlist image!!");
|
||||
return err;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user