diff options
author | Amulya <Amurthyreddy@nvidia.com> | 2018-08-29 07:09:46 -0400 |
---|---|---|
committer | mobile promotions <svcmobile_promotions@nvidia.com> | 2018-09-05 23:40:03 -0400 |
commit | cf7850ee33a5a9ffc32f584c7c3beefe286ceed2 (patch) | |
tree | eaa6af1806dd3242857d41efe427f0240d7e5310 /drivers/gpu/nvgpu/common/ptimer | |
parent | 2eface802a4aea417206bcdda689a65cf47d300b (diff) |
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 <Amurthyreddy@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1807133
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/common/ptimer')
-rw-r--r-- | drivers/gpu/nvgpu/common/ptimer/ptimer_gk20a.c | 4 |
1 files changed, 2 insertions, 2 deletions
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) | |||
46 | nvgpu_err(g, "PRI timeout: ADR 0x%08x " | 46 | nvgpu_err(g, "PRI timeout: ADR 0x%08x " |
47 | "%s DATA 0x%08x", | 47 | "%s DATA 0x%08x", |
48 | timer_pri_timeout_save_0_addr_v(save0) << 2, | 48 | timer_pri_timeout_save_0_addr_v(save0) << 2, |
49 | timer_pri_timeout_save_0_write_v(save0) ? | 49 | (timer_pri_timeout_save_0_write_v(save0) != 0U) ? |
50 | "WRITE" : "READ", save1); | 50 | "WRITE" : "READ", save1); |
51 | 51 | ||
52 | gk20a_writel(g, timer_pri_timeout_save_0_r(), 0); | 52 | gk20a_writel(g, timer_pri_timeout_save_0_r(), 0); |
@@ -67,7 +67,7 @@ int gk20a_read_ptimer(struct gk20a *g, u64 *value) | |||
67 | unsigned int i = 0; | 67 | unsigned int i = 0; |
68 | u32 gpu_timestamp_hi_prev = 0; | 68 | u32 gpu_timestamp_hi_prev = 0; |
69 | 69 | ||
70 | if (!value) { | 70 | if (value == NULL) { |
71 | return -EINVAL; | 71 | return -EINVAL; |
72 | } | 72 | } |
73 | 73 | ||