From 6be2dc76e0ac0e87b23c90c34ab85309e918e142 Mon Sep 17 00:00:00 2001 From: Sai Nikhil Date: Tue, 27 Nov 2018 11:51:06 +0530 Subject: [PATCH] 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 Reviewed-on: https://git-master.nvidia.com/r/1959098 Reviewed-by: svc-mobile-coverity Reviewed-by: svc-misra-checker Reviewed-by: Alex Waterman Reviewed-by: Automatic_Commit_Validation_User GVS: Gerrit_Virtual_Submit Reviewed-by: Adeel Raza Reviewed-by: mobile promotions Tested-by: mobile promotions --- drivers/gpu/nvgpu/clk/clk_vin.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/nvgpu/clk/clk_vin.c b/drivers/gpu/nvgpu/clk/clk_vin.c index 963799a7e..e26864622 100644 --- a/drivers/gpu/nvgpu/clk/clk_vin.c +++ b/drivers/gpu/nvgpu/clk/clk_vin.c @@ -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;