From 7cecf8cf9e8834c568fde0bfd58d488c6b097d5c Mon Sep 17 00:00:00 2001 From: Deepak Nibade Date: Wed, 29 Nov 2017 06:10:38 -0800 Subject: 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 Reviewed-on: https://git-master.nvidia.com/r/1607233 Reviewed-by: mobile promotions Tested-by: mobile promotions --- drivers/gpu/nvgpu/gk20a/gr_gk20a.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'drivers/gpu/nvgpu/gk20a/gr_gk20a.c') diff --git a/drivers/gpu/nvgpu/gk20a/gr_gk20a.c b/drivers/gpu/nvgpu/gk20a/gr_gk20a.c index 73b49927..bc8d3ea8 100644 --- a/drivers/gpu/nvgpu/gk20a/gr_gk20a.c +++ b/drivers/gpu/nvgpu/gk20a/gr_gk20a.c @@ -47,8 +47,6 @@ #include "regops_gk20a.h" #include "dbg_gpu_gk20a.h" -#include "common/linux/os_linux.h" - #include #include #include @@ -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; } -- cgit v1.2.2