diff options
author | Philip Elcan <pelcan@nvidia.com> | 2018-08-29 15:46:12 -0400 |
---|---|---|
committer | mobile promotions <svcmobile_promotions@nvidia.com> | 2018-09-07 00:33:50 -0400 |
commit | 7f8226887c28267d3c2351692d4429ead1e17695 (patch) | |
tree | aa09c45e496b058044c9d9a94c94d9922c572285 /drivers/gpu/nvgpu/therm/thrmchannel.c | |
parent | 0e58ebaae13dd59b6aba5297f898e7c89fcd2742 (diff) |
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 <pelcan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1810743
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/therm/thrmchannel.c')
-rw-r--r-- | drivers/gpu/nvgpu/therm/thrmchannel.c | 16 |
1 files changed, 8 insertions, 8 deletions
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 @@ | |||
29 | #include "boardobj/boardobjgrp_e32.h" | 29 | #include "boardobj/boardobjgrp_e32.h" |
30 | #include "gp106/bios_gp106.h" | 30 | #include "gp106/bios_gp106.h" |
31 | 31 | ||
32 | static u32 _therm_channel_pmudatainit_device(struct gk20a *g, | 32 | static int _therm_channel_pmudatainit_device(struct gk20a *g, |
33 | struct boardobj *board_obj_ptr, | 33 | struct boardobj *board_obj_ptr, |
34 | struct nv_pmu_boardobj *ppmudata) | 34 | struct nv_pmu_boardobj *ppmudata) |
35 | { | 35 | { |
36 | u32 status = 0; | 36 | int status = 0; |
37 | struct therm_channel *pchannel; | 37 | struct therm_channel *pchannel; |
38 | struct therm_channel_device *ptherm_channel; | 38 | struct therm_channel_device *ptherm_channel; |
39 | struct nv_pmu_therm_therm_channel_device_boardobj_set *pset; | 39 | struct nv_pmu_therm_therm_channel_device_boardobj_set *pset; |
@@ -68,7 +68,7 @@ static struct boardobj *construct_channel_device(struct gk20a *g, | |||
68 | struct boardobj *board_obj_ptr = NULL; | 68 | struct boardobj *board_obj_ptr = NULL; |
69 | struct therm_channel *pchannel; | 69 | struct therm_channel *pchannel; |
70 | struct therm_channel_device *pchannel_device; | 70 | struct therm_channel_device *pchannel_device; |
71 | u32 status; | 71 | int status; |
72 | struct therm_channel_device *therm_device = (struct therm_channel_device*)pargs; | 72 | struct therm_channel_device *therm_device = (struct therm_channel_device*)pargs; |
73 | 73 | ||
74 | status = boardobj_construct_super(g, &board_obj_ptr, | 74 | status = boardobj_construct_super(g, &board_obj_ptr, |
@@ -95,7 +95,7 @@ static struct boardobj *construct_channel_device(struct gk20a *g, | |||
95 | return board_obj_ptr; | 95 | return board_obj_ptr; |
96 | } | 96 | } |
97 | 97 | ||
98 | static u32 _therm_channel_pmudata_instget(struct gk20a *g, | 98 | static int _therm_channel_pmudata_instget(struct gk20a *g, |
99 | struct nv_pmu_boardobjgrp *pmuboardobjgrp, | 99 | struct nv_pmu_boardobjgrp *pmuboardobjgrp, |
100 | struct nv_pmu_boardobj **ppboardobjpmudata, | 100 | struct nv_pmu_boardobj **ppboardobjpmudata, |
101 | u8 idx) | 101 | u8 idx) |
@@ -119,10 +119,10 @@ static u32 _therm_channel_pmudata_instget(struct gk20a *g, | |||
119 | return 0; | 119 | return 0; |
120 | } | 120 | } |
121 | 121 | ||
122 | static u32 devinit_get_therm_channel_table(struct gk20a *g, | 122 | static int devinit_get_therm_channel_table(struct gk20a *g, |
123 | struct therm_channels *pthermchannelobjs) | 123 | struct therm_channels *pthermchannelobjs) |
124 | { | 124 | { |
125 | u32 status = 0; | 125 | int status = 0; |
126 | u8 *therm_channel_table_ptr = NULL; | 126 | u8 *therm_channel_table_ptr = NULL; |
127 | u8 *curr_therm_channel_table_ptr = NULL; | 127 | u8 *curr_therm_channel_table_ptr = NULL; |
128 | struct boardobj *boardobj; | 128 | struct boardobj *boardobj; |
@@ -210,9 +210,9 @@ done: | |||
210 | return status; | 210 | return status; |
211 | } | 211 | } |
212 | 212 | ||
213 | u32 therm_channel_sw_setup(struct gk20a *g) | 213 | int therm_channel_sw_setup(struct gk20a *g) |
214 | { | 214 | { |
215 | u32 status; | 215 | int status; |
216 | struct boardobjgrp *pboardobjgrp = NULL; | 216 | struct boardobjgrp *pboardobjgrp = NULL; |
217 | struct therm_channels *pthermchannelobjs; | 217 | struct therm_channels *pthermchannelobjs; |
218 | 218 | ||