diff options
author | Amulya <Amurthyreddy@nvidia.com> | 2018-08-28 03:04:55 -0400 |
---|---|---|
committer | mobile promotions <svcmobile_promotions@nvidia.com> | 2018-09-19 06:24:12 -0400 |
commit | 941ac9a9d07bedb4062fd0c4d32eb2ef80a42359 (patch) | |
tree | c53622d96a4c2e7c18693ecf4059d7e403cd7808 /drivers/gpu/nvgpu/common/pmu/pmu.c | |
parent | 2805f03aa0496502b64ff760f667bfe9d8a27928 (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: I9773d863b715f83ae1772b75d5373f77244bc8ca
Signed-off-by: Amulya <Amurthyreddy@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1807132
GVS: Gerrit_Virtual_Submit
Tested-by: Amulya Murthyreddy <amurthyreddy@nvidia.com>
Reviewed-by: Vijayakumar Subbu <vsubbu@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/common/pmu/pmu.c')
-rw-r--r-- | drivers/gpu/nvgpu/common/pmu/pmu.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/gpu/nvgpu/common/pmu/pmu.c b/drivers/gpu/nvgpu/common/pmu/pmu.c index 0395e463..6d1d5f00 100644 --- a/drivers/gpu/nvgpu/common/pmu/pmu.c +++ b/drivers/gpu/nvgpu/common/pmu/pmu.c | |||
@@ -170,8 +170,8 @@ void nvgpu_kill_task_pg_init(struct gk20a *g) | |||
170 | break; | 170 | break; |
171 | } | 171 | } |
172 | nvgpu_udelay(2); | 172 | nvgpu_udelay(2); |
173 | } while (!nvgpu_timeout_expired_msg(&timeout, | 173 | } while (nvgpu_timeout_expired_msg(&timeout, |
174 | "timeout - waiting PMU state machine thread stop")); | 174 | "timeout - waiting PMU state machine thread stop") == 0); |
175 | } | 175 | } |
176 | } | 176 | } |
177 | 177 | ||
@@ -214,7 +214,7 @@ static int nvgpu_init_pmu_setup_sw(struct gk20a *g) | |||
214 | pmu->mutex_cnt = g->ops.pmu.pmu_mutex_size(); | 214 | pmu->mutex_cnt = g->ops.pmu.pmu_mutex_size(); |
215 | pmu->mutex = nvgpu_kzalloc(g, pmu->mutex_cnt * | 215 | pmu->mutex = nvgpu_kzalloc(g, pmu->mutex_cnt * |
216 | sizeof(struct pmu_mutex)); | 216 | sizeof(struct pmu_mutex)); |
217 | if (!pmu->mutex) { | 217 | if (pmu->mutex == NULL) { |
218 | err = -ENOMEM; | 218 | err = -ENOMEM; |
219 | goto err; | 219 | goto err; |
220 | } | 220 | } |
@@ -226,7 +226,7 @@ static int nvgpu_init_pmu_setup_sw(struct gk20a *g) | |||
226 | 226 | ||
227 | pmu->seq = nvgpu_kzalloc(g, PMU_MAX_NUM_SEQUENCES * | 227 | pmu->seq = nvgpu_kzalloc(g, PMU_MAX_NUM_SEQUENCES * |
228 | sizeof(struct pmu_sequence)); | 228 | sizeof(struct pmu_sequence)); |
229 | if (!pmu->seq) { | 229 | if (pmu->seq == NULL) { |
230 | err = -ENOMEM; | 230 | err = -ENOMEM; |
231 | goto err_free_mutex; | 231 | goto err_free_mutex; |
232 | } | 232 | } |