From cf7850ee33a5a9ffc32f584c7c3beefe286ceed2 Mon Sep 17 00:00:00 2001 From: Amulya Date: Wed, 29 Aug 2018 16:39:46 +0530 Subject: nvgpu: common: MISRA 10.1 boolean fixes Fix violations where a variable of type non-boolean is used as a boolean in gpu/nvgpu/common. JIRA NVGPU-646 Change-Id: I91baa5cf1d38081161336bde5fbc06661b741273 Signed-off-by: Amulya Reviewed-on: https://git-master.nvidia.com/r/1807133 Reviewed-by: mobile promotions Tested-by: mobile promotions --- drivers/gpu/nvgpu/common/ptimer/ptimer_gk20a.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'drivers/gpu/nvgpu/common/ptimer') diff --git a/drivers/gpu/nvgpu/common/ptimer/ptimer_gk20a.c b/drivers/gpu/nvgpu/common/ptimer/ptimer_gk20a.c index a9c971df..eeb6e460 100644 --- a/drivers/gpu/nvgpu/common/ptimer/ptimer_gk20a.c +++ b/drivers/gpu/nvgpu/common/ptimer/ptimer_gk20a.c @@ -46,7 +46,7 @@ void gk20a_ptimer_isr(struct gk20a *g) nvgpu_err(g, "PRI timeout: ADR 0x%08x " "%s DATA 0x%08x", timer_pri_timeout_save_0_addr_v(save0) << 2, - timer_pri_timeout_save_0_write_v(save0) ? + (timer_pri_timeout_save_0_write_v(save0) != 0U) ? "WRITE" : "READ", save1); gk20a_writel(g, timer_pri_timeout_save_0_r(), 0); @@ -67,7 +67,7 @@ int gk20a_read_ptimer(struct gk20a *g, u64 *value) unsigned int i = 0; u32 gpu_timestamp_hi_prev = 0; - if (!value) { + if (value == NULL) { return -EINVAL; } -- cgit v1.2.2