diff options
author | Sai Nikhil <snikhil@nvidia.com> | 2018-09-11 01:08:54 -0400 |
---|---|---|
committer | mobile promotions <svcmobile_promotions@nvidia.com> | 2018-09-27 02:35:37 -0400 |
commit | c6cfb12d91accc759ed80985573014df89d9cdaa (patch) | |
tree | 0bc9f467e0f52732a9d5916cb804b12b8f00134b /drivers/gpu/nvgpu/pmgr/pwrpolicy.h | |
parent | c18c8b5b28b839ac20ae2c4b1003e9b44199016a (diff) |
gpu: nvgpu: pmgr: 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: Id3b2c8ea1af1807087468c6978abfbfc85bee2ec
Signed-off-by: Sai Nikhil <snikhil@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1809757
Reviewed-by: svc-misra-checker <svc-misra-checker@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Automatic_Commit_Validation_User
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/pmgr/pwrpolicy.h')
-rw-r--r-- | drivers/gpu/nvgpu/pmgr/pwrpolicy.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/nvgpu/pmgr/pwrpolicy.h b/drivers/gpu/nvgpu/pmgr/pwrpolicy.h index 868bc2cb..74f4937d 100644 --- a/drivers/gpu/nvgpu/pmgr/pwrpolicy.h +++ b/drivers/gpu/nvgpu/pmgr/pwrpolicy.h | |||
@@ -29,7 +29,7 @@ | |||
29 | #include "boardobj/boardobj.h" | 29 | #include "boardobj/boardobj.h" |
30 | #include "ctrl/ctrlpmgr.h" | 30 | #include "ctrl/ctrlpmgr.h" |
31 | 31 | ||
32 | #define PWR_POLICY_EXT_POWER_STATE_ID_COUNT 0x4 | 32 | #define PWR_POLICY_EXT_POWER_STATE_ID_COUNT 0x4U |
33 | 33 | ||
34 | enum pwr_policy_limit_id { | 34 | enum pwr_policy_limit_id { |
35 | PWR_POLICY_LIMIT_ID_MIN = 0x00000000, | 35 | PWR_POLICY_LIMIT_ID_MIN = 0x00000000, |