From 7f8226887c28267d3c2351692d4429ead1e17695 Mon Sep 17 00:00:00 2001 From: Philip Elcan Date: Wed, 29 Aug 2018 15:46:12 -0400 Subject: gpu: nvgpu: cleanup return types for MISRA 10.3 This is a big cleanup of return types across a number of modules in the nvgpu driver. Many functions were returning u32 but using negative return codes. This is a MISRA 10.3 violation by assigning signed values to a u32. JIRA NVGPU-647 Change-Id: I59ee66706321f5b5b1a07ed8c24b81583e9ba28c Signed-off-by: Philip Elcan Reviewed-on: https://git-master.nvidia.com/r/1810743 Reviewed-by: mobile promotions Tested-by: mobile promotions --- drivers/gpu/nvgpu/therm/thrmchannel.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'drivers/gpu/nvgpu/therm/thrmchannel.c') diff --git a/drivers/gpu/nvgpu/therm/thrmchannel.c b/drivers/gpu/nvgpu/therm/thrmchannel.c index de3de62a..7d196422 100644 --- a/drivers/gpu/nvgpu/therm/thrmchannel.c +++ b/drivers/gpu/nvgpu/therm/thrmchannel.c @@ -29,11 +29,11 @@ #include "boardobj/boardobjgrp_e32.h" #include "gp106/bios_gp106.h" -static u32 _therm_channel_pmudatainit_device(struct gk20a *g, +static int _therm_channel_pmudatainit_device(struct gk20a *g, struct boardobj *board_obj_ptr, struct nv_pmu_boardobj *ppmudata) { - u32 status = 0; + int status = 0; struct therm_channel *pchannel; struct therm_channel_device *ptherm_channel; struct nv_pmu_therm_therm_channel_device_boardobj_set *pset; @@ -68,7 +68,7 @@ static struct boardobj *construct_channel_device(struct gk20a *g, struct boardobj *board_obj_ptr = NULL; struct therm_channel *pchannel; struct therm_channel_device *pchannel_device; - u32 status; + int status; struct therm_channel_device *therm_device = (struct therm_channel_device*)pargs; status = boardobj_construct_super(g, &board_obj_ptr, @@ -95,7 +95,7 @@ static struct boardobj *construct_channel_device(struct gk20a *g, return board_obj_ptr; } -static u32 _therm_channel_pmudata_instget(struct gk20a *g, +static int _therm_channel_pmudata_instget(struct gk20a *g, struct nv_pmu_boardobjgrp *pmuboardobjgrp, struct nv_pmu_boardobj **ppboardobjpmudata, u8 idx) @@ -119,10 +119,10 @@ static u32 _therm_channel_pmudata_instget(struct gk20a *g, return 0; } -static u32 devinit_get_therm_channel_table(struct gk20a *g, +static int devinit_get_therm_channel_table(struct gk20a *g, struct therm_channels *pthermchannelobjs) { - u32 status = 0; + int status = 0; u8 *therm_channel_table_ptr = NULL; u8 *curr_therm_channel_table_ptr = NULL; struct boardobj *boardobj; @@ -210,9 +210,9 @@ done: return status; } -u32 therm_channel_sw_setup(struct gk20a *g) +int therm_channel_sw_setup(struct gk20a *g) { - u32 status; + int status; struct boardobjgrp *pboardobjgrp = NULL; struct therm_channels *pthermchannelobjs; -- cgit v1.2.2