mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-25 02:52:51 +03:00
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>
This commit is contained in:
committed by
mobile promotions
parent
34732a14b2
commit
d77785800b
@@ -35,8 +35,8 @@
|
||||
|
||||
#include "volt.h"
|
||||
|
||||
#define VOLT_DEV_PWM_VOLTAGE_STEPS_INVALID 0
|
||||
#define VOLT_DEV_PWM_VOLTAGE_STEPS_DEFAULT 1
|
||||
#define VOLT_DEV_PWM_VOLTAGE_STEPS_INVALID 0U
|
||||
#define VOLT_DEV_PWM_VOLTAGE_STEPS_DEFAULT 1U
|
||||
|
||||
static int volt_device_pmu_data_init_super(struct gk20a *g,
|
||||
struct boardobj *pboard_obj, struct nv_pmu_boardobj *ppmudata)
|
||||
@@ -425,7 +425,7 @@ static int _volt_device_devgrp_pmudata_instget(struct gk20a *g,
|
||||
|
||||
/*check whether pmuboardobjgrp has a valid boardobj in index*/
|
||||
if (((u32)BIT(idx) &
|
||||
pgrp_set->hdr.data.super.obj_mask.super.data[0]) == 0) {
|
||||
pgrp_set->hdr.data.super.obj_mask.super.data[0]) == 0U) {
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
@@ -445,7 +445,7 @@ static int _volt_device_devgrp_pmustatus_instget(struct gk20a *g,
|
||||
|
||||
/*check whether pmuboardobjgrp has a valid boardobj in index*/
|
||||
if (((u32)BIT(idx) &
|
||||
pgrp_get_status->hdr.data.super.obj_mask.super.data[0]) == 0) {
|
||||
pgrp_get_status->hdr.data.super.obj_mask.super.data[0]) == 0U) {
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user