gpu: nvgpu: MISRA 14.4 bitwise operation as boolean

MISRA rule 14.4 doesn't allow the usage of integer types as booleans
in the controlling expression of an if statement or an iteration
statement.

Fix violations where the result of a bitwise operation is used as a
boolean in the controlling expression of if and loop statements.

JIRA NVGPU-1020

Change-Id: I6a756ee1bbb45d43f424d2251eebbc26278db417
Signed-off-by: Amurthyreddy <amurthyreddy@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1936334
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
Amurthyreddy
2018-11-12 12:38:40 +05:30
committed by mobile promotions
parent b68e465fab
commit 23f35e1b2f
37 changed files with 123 additions and 114 deletions

View File

@@ -103,7 +103,7 @@ static int get_lpwr_gr_table(struct gk20a *g)
sizeof(struct nvgpu_bios_lpwr_gr_table_1x_entry));
if (BIOS_GET_FIELD(entry.feautre_mask,
NV_VBIOS_LPWR_MS_FEATURE_MASK_MS)) {
NV_VBIOS_LPWR_MS_FEATURE_MASK_MS) != 0U) {
pgr_data->entry[idx].gr_enabled = true;
pgr_data->entry[idx].feature_mask =
@@ -157,7 +157,7 @@ static int get_lpwr_ms_table(struct gk20a *g)
sizeof(struct nvgpu_bios_lpwr_ms_table_1x_entry));
if (BIOS_GET_FIELD(entry.feautre_mask,
NV_VBIOS_LPWR_MS_FEATURE_MASK_MS)) {
NV_VBIOS_LPWR_MS_FEATURE_MASK_MS) != 0U) {
pms_data->entry[idx].ms_enabled = true;
pms_data->entry[idx].feature_mask =