gpu: nvgpu: common: linux: Use new error macros

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: Ie3cf6f278dd4468832de3c3a6a6b601d55185461
Signed-off-by: Terje Bergstrom <tbergstrom@nvidia.com>
Reviewed-on: http://git-master/r/1459818
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Alex Waterman <alexw@nvidia.com>
GVS: Gerrit_Virtual_Submit
This commit is contained in:
Terje Bergstrom
2017-04-10 10:59:39 -07:00
committed by mobile promotions
parent a9c4c5d88d
commit 19b76d4fd7

View File

@@ -16,6 +16,7 @@
#include <nvgpu/nvgpu_mem.h> #include <nvgpu/nvgpu_mem.h>
#include <nvgpu/page_allocator.h> #include <nvgpu/page_allocator.h>
#include <nvgpu/log.h>
#include "gk20a/gk20a.h" #include "gk20a/gk20a.h"
#include "gk20a/mm_gk20a.h" #include "gk20a/mm_gk20a.h"
@@ -51,7 +52,7 @@ int nvgpu_mem_begin(struct gk20a *g, struct nvgpu_mem *mem)
return 0; return 0;
if (WARN_ON(mem->cpu_va)) { if (WARN_ON(mem->cpu_va)) {
gk20a_warn(dev_from_gk20a(g), "nested %s", __func__); nvgpu_warn(g, "nested");
return -EBUSY; return -EBUSY;
} }