diff options
author | Sai Nikhil <snikhil@nvidia.com> | 2018-08-30 04:05:00 -0400 |
---|---|---|
committer | mobile promotions <svcmobile_promotions@nvidia.com> | 2018-09-27 02:35:29 -0400 |
commit | d77785800b2ae4c27354500305303c395a18acf4 (patch) | |
tree | 1adc96ba310572d8b63dd2284fb801439616a4c1 /drivers/gpu/nvgpu/volt/volt_dev.c | |
parent | 34732a14b22f09d8f9d52f756612178f0313f120 (diff) |
gpu: nvgpu: volt: fix MISRA Rule 10.4 Violations
MISRA Rule 10.4 only allows the usage of arithmetic operations on
operands of the same essential type category.
Adding "U" at the end of the integer literals to have same type of
operands when an arithmetic operation is performed.
This fixes violation where an arithmetic operation is performed on
signed and unsigned int types.
JIRA NVGPU-992
Change-Id: Ic9a911beb6d161df950ca85eb4813547603a8743
Signed-off-by: Sai Nikhil <snikhil@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1809751
Reviewed-by: svc-misra-checker <svc-misra-checker@nvidia.com>
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>
Diffstat (limited to 'drivers/gpu/nvgpu/volt/volt_dev.c')
-rw-r--r-- | drivers/gpu/nvgpu/volt/volt_dev.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/gpu/nvgpu/volt/volt_dev.c b/drivers/gpu/nvgpu/volt/volt_dev.c index fccd3b03..bb5d1821 100644 --- a/drivers/gpu/nvgpu/volt/volt_dev.c +++ b/drivers/gpu/nvgpu/volt/volt_dev.c | |||
@@ -35,8 +35,8 @@ | |||
35 | 35 | ||
36 | #include "volt.h" | 36 | #include "volt.h" |
37 | 37 | ||
38 | #define VOLT_DEV_PWM_VOLTAGE_STEPS_INVALID 0 | 38 | #define VOLT_DEV_PWM_VOLTAGE_STEPS_INVALID 0U |
39 | #define VOLT_DEV_PWM_VOLTAGE_STEPS_DEFAULT 1 | 39 | #define VOLT_DEV_PWM_VOLTAGE_STEPS_DEFAULT 1U |
40 | 40 | ||
41 | static int volt_device_pmu_data_init_super(struct gk20a *g, | 41 | static int volt_device_pmu_data_init_super(struct gk20a *g, |
42 | struct boardobj *pboard_obj, struct nv_pmu_boardobj *ppmudata) | 42 | struct boardobj *pboard_obj, struct nv_pmu_boardobj *ppmudata) |
@@ -425,7 +425,7 @@ static int _volt_device_devgrp_pmudata_instget(struct gk20a *g, | |||
425 | 425 | ||
426 | /*check whether pmuboardobjgrp has a valid boardobj in index*/ | 426 | /*check whether pmuboardobjgrp has a valid boardobj in index*/ |
427 | if (((u32)BIT(idx) & | 427 | if (((u32)BIT(idx) & |
428 | pgrp_set->hdr.data.super.obj_mask.super.data[0]) == 0) { | 428 | pgrp_set->hdr.data.super.obj_mask.super.data[0]) == 0U) { |
429 | return -EINVAL; | 429 | return -EINVAL; |
430 | } | 430 | } |
431 | 431 | ||
@@ -445,7 +445,7 @@ static int _volt_device_devgrp_pmustatus_instget(struct gk20a *g, | |||
445 | 445 | ||
446 | /*check whether pmuboardobjgrp has a valid boardobj in index*/ | 446 | /*check whether pmuboardobjgrp has a valid boardobj in index*/ |
447 | if (((u32)BIT(idx) & | 447 | if (((u32)BIT(idx) & |
448 | pgrp_get_status->hdr.data.super.obj_mask.super.data[0]) == 0) { | 448 | pgrp_get_status->hdr.data.super.obj_mask.super.data[0]) == 0U) { |
449 | return -EINVAL; | 449 | return -EINVAL; |
450 | } | 450 | } |
451 | 451 | ||