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_policy.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_policy.c')
-rw-r--r-- | drivers/gpu/nvgpu/volt/volt_policy.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/gpu/nvgpu/volt/volt_policy.c b/drivers/gpu/nvgpu/volt/volt_policy.c index 4f9d7ad8..cc60730d 100644 --- a/drivers/gpu/nvgpu/volt/volt_policy.c +++ b/drivers/gpu/nvgpu/volt/volt_policy.c | |||
@@ -382,7 +382,7 @@ static int _volt_policy_devgrp_pmudata_instget(struct gk20a *g, | |||
382 | 382 | ||
383 | /*check whether pmuboardobjgrp has a valid boardobj in index*/ | 383 | /*check whether pmuboardobjgrp has a valid boardobj in index*/ |
384 | if (((u32)BIT(idx) & | 384 | if (((u32)BIT(idx) & |
385 | pgrp_set->hdr.data.super.obj_mask.super.data[0]) == 0) { | 385 | pgrp_set->hdr.data.super.obj_mask.super.data[0]) == 0U) { |
386 | return -EINVAL; | 386 | return -EINVAL; |
387 | } | 387 | } |
388 | 388 | ||
@@ -402,7 +402,7 @@ static int _volt_policy_devgrp_pmustatus_instget(struct gk20a *g, | |||
402 | 402 | ||
403 | /*check whether pmuboardobjgrp has a valid boardobj in index*/ | 403 | /*check whether pmuboardobjgrp has a valid boardobj in index*/ |
404 | if (((u32)BIT(idx) & | 404 | if (((u32)BIT(idx) & |
405 | p_get_status->hdr.data.super.obj_mask.super.data[0]) == 0) { | 405 | p_get_status->hdr.data.super.obj_mask.super.data[0]) == 0U) { |
406 | return -EINVAL; | 406 | return -EINVAL; |
407 | } | 407 | } |
408 | 408 | ||