gpu: nvgpu: remove linux specific include from gr_*.c files

Remove linux specific #include "common/linux/os_linux.h" from common source
files gr_gk20a.c/gr_gm20b.c/gr_gp10b.c

Remove use of ZERO_OR_NULL_PTR() and simply check if pointer is NULL or not

Jira NVGPU-405

Change-Id: I663fe298cc720f0b0e22beaa05697b18b375a204
Signed-off-by: Deepak Nibade <dnibade@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1607233
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
Deepak Nibade
2017-11-29 06:10:38 -08:00
committed by mobile promotions
parent 31261ba884
commit 7cecf8cf9e
3 changed files with 1 additions and 5 deletions

View File

@@ -47,8 +47,6 @@
#include "regops_gk20a.h"
#include "dbg_gpu_gk20a.h"
#include "common/linux/os_linux.h"
#include <nvgpu/hw/gk20a/hw_ccsr_gk20a.h>
#include <nvgpu/hw/gk20a/hw_ctxsw_prog_gk20a.h>
#include <nvgpu/hw/gk20a/hw_fifo_gk20a.h>
@@ -6491,7 +6489,7 @@ int gr_gk20a_get_pm_ctx_buffer_offsets(struct gk20a *g,
return -ENODEV;
priv_registers = nvgpu_kzalloc(g, sizeof(u32) * potential_offsets);
if (ZERO_OR_NULL_PTR(priv_registers)) {
if (!priv_registers) {
gk20a_dbg_fn("failed alloc for potential_offsets=%d", potential_offsets);
return -ENOMEM;
}

View File

@@ -30,7 +30,6 @@
#include "gk20a/gk20a.h"
#include "gk20a/gr_gk20a.h"
#include "common/linux/os_linux.h"
#include "gr_gm20b.h"
#include "pmu_gm20b.h"

View File

@@ -35,7 +35,6 @@
#include "gk20a/gr_gk20a.h"
#include "gk20a/dbg_gpu_gk20a.h"
#include "gk20a/regops_gk20a.h"
#include "common/linux/os_linux.h"
#include "gm20b/gr_gm20b.h"
#include "gp10b/gr_gp10b.h"