gpu: nvgpu: MISRA 14.4 boolean fixes

MISRA rule 14.4 doesn't allow the usage of non-boolean variable as
boolean in the controlling expression of an if statement or an
iteration statement.

Fix violations where a non-boolean variable is used as a boolean in the
controlling expression of if and loop statements.

JIRA NVGPU-1022

Change-Id: I957f8ca1fa0eb00928c476960da1e6e420781c09
Signed-off-by: Amurthyreddy <amurthyreddy@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1941002
GVS: Gerrit_Virtual_Submit
Reviewed-by: Adeel Raza <araza@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
Amurthyreddy
2018-11-01 14:50:59 +05:30
committed by mobile promotions
parent f9ca193a60
commit 710aab6ba4
33 changed files with 176 additions and 176 deletions

View File

@@ -43,7 +43,7 @@
} else { \
nvgpu_log(g, gpu_dbg_map, fmt, ##args); \
} \
} while (0)
} while (false)
#define __gmmu_dbg_v(g, attrs, fmt, args...) \
do { \
@@ -52,7 +52,7 @@
} else { \
nvgpu_log(g, gpu_dbg_map_v, fmt, ##args); \
} \
} while (0)
} while (false)
static int pd_allocate(struct vm_gk20a *vm,
struct nvgpu_gmmu_pd *pd,