gpu: nvgpu: MISRA 10.3 conversion to/from char

s8 is defined as signed char. The char values can not be assigned
directly to s8 variables, as MISRA considers signed char as an
essentially signed integer type. So assign the s8 variables with integer
literals instead of chars.

JIRA NVGPU-1010

Change-Id: I5f10fb2360d3327615e19afa12d585a414fd9ff8
Signed-off-by: Sai Nikhil <snikhil@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1959098
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
Reviewed-by: svc-misra-checker <svc-misra-checker@nvidia.com>
Reviewed-by: Alex Waterman <alexw@nvidia.com>
Reviewed-by: Automatic_Commit_Validation_User
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:
Sai Nikhil
2018-11-27 11:51:06 +05:30
committed by mobile promotions
parent 1e78d47f15
commit 6be2dc76e0

View File

@@ -98,8 +98,8 @@ int clk_avfs_get_vin_cal_fuse_v20(struct gk20a *g,
if (pvinobjs->calibration_rev_vbios == g->ops.fuse.read_vin_cal_fuse_rev(g)) {
BOARDOBJGRP_FOR_EACH(&(pvinobjs->super.super),
struct vin_device_v20 *, pvindev, i) {
gain = '\0';
offset = '\0';
gain = 0;
offset = 0;
pvindev = (struct vin_device_v20 *)CLK_GET_VIN_DEVICE(pvinobjs, i);
status = g->ops.fuse.read_vin_cal_gain_offset_fuse(g,
pvindev->super.id, &gain, &offset);
@@ -266,7 +266,7 @@ static int devinit_get_vin_device_table(struct gk20a *g,
u8 *vin_tbl_entry_ptr = NULL;
u32 index = 0;
u32 slope=0, intercept=0;
s8 offset='\0', gain='\0';
s8 offset = 0, gain = 0;
struct vin_device *pvin_dev;
u32 cal_type;