summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/clk/clk_fll.c
diff options
context:
space:
mode:
authorPhilip Elcan <pelcan@nvidia.com>2018-08-29 15:46:12 -0400
committermobile promotions <svcmobile_promotions@nvidia.com>2018-09-07 00:33:50 -0400
commit7f8226887c28267d3c2351692d4429ead1e17695 (patch)
treeaa09c45e496b058044c9d9a94c94d9922c572285 /drivers/gpu/nvgpu/clk/clk_fll.c
parent0e58ebaae13dd59b6aba5297f898e7c89fcd2742 (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/clk/clk_fll.c')
-rw-r--r--drivers/gpu/nvgpu/clk/clk_fll.c30
1 files changed, 15 insertions, 15 deletions
diff --git a/drivers/gpu/nvgpu/clk/clk_fll.c b/drivers/gpu/nvgpu/clk/clk_fll.c
index 0fd9c33f..700aeb2d 100644
--- a/drivers/gpu/nvgpu/clk/clk_fll.c
+++ b/drivers/gpu/nvgpu/clk/clk_fll.c
@@ -31,15 +31,15 @@
31#include "ctrl/ctrlclk.h" 31#include "ctrl/ctrlclk.h"
32#include "ctrl/ctrlvolt.h" 32#include "ctrl/ctrlvolt.h"
33 33
34static u32 devinit_get_fll_device_table(struct gk20a *g, 34static int devinit_get_fll_device_table(struct gk20a *g,
35 struct avfsfllobjs *pfllobjs); 35 struct avfsfllobjs *pfllobjs);
36static struct fll_device *construct_fll_device(struct gk20a *g, 36static struct fll_device *construct_fll_device(struct gk20a *g,
37 void *pargs); 37 void *pargs);
38static u32 fll_device_init_pmudata_super(struct gk20a *g, 38static int fll_device_init_pmudata_super(struct gk20a *g,
39 struct boardobj *board_obj_ptr, 39 struct boardobj *board_obj_ptr,
40 struct nv_pmu_boardobj *ppmudata); 40 struct nv_pmu_boardobj *ppmudata);
41 41
42static u32 _clk_fll_devgrp_pmudatainit_super(struct gk20a *g, 42static int _clk_fll_devgrp_pmudatainit_super(struct gk20a *g,
43 struct boardobjgrp *pboardobjgrp, 43 struct boardobjgrp *pboardobjgrp,
44 struct nv_pmu_boardobjgrp_super *pboardobjgrppmu) 44 struct nv_pmu_boardobjgrp_super *pboardobjgrppmu)
45{ 45{
@@ -48,7 +48,7 @@ static u32 _clk_fll_devgrp_pmudatainit_super(struct gk20a *g,
48 pboardobjgrppmu; 48 pboardobjgrppmu;
49 struct avfsfllobjs *pfll_objs = (struct avfsfllobjs *) 49 struct avfsfllobjs *pfll_objs = (struct avfsfllobjs *)
50 pboardobjgrp; 50 pboardobjgrp;
51 u32 status = 0; 51 int status = 0;
52 52
53 nvgpu_log_info(g, " "); 53 nvgpu_log_info(g, " ");
54 54
@@ -71,7 +71,7 @@ static u32 _clk_fll_devgrp_pmudatainit_super(struct gk20a *g,
71 return status; 71 return status;
72} 72}
73 73
74static u32 _clk_fll_devgrp_pmudata_instget(struct gk20a *g, 74static int _clk_fll_devgrp_pmudata_instget(struct gk20a *g,
75 struct nv_pmu_boardobjgrp *pmuboardobjgrp, 75 struct nv_pmu_boardobjgrp *pmuboardobjgrp,
76 struct nv_pmu_boardobj **ppboardobjpmudata, 76 struct nv_pmu_boardobj **ppboardobjpmudata,
77 u8 idx) 77 u8 idx)
@@ -94,7 +94,7 @@ static u32 _clk_fll_devgrp_pmudata_instget(struct gk20a *g,
94 return 0; 94 return 0;
95} 95}
96 96
97static u32 _clk_fll_devgrp_pmustatus_instget(struct gk20a *g, 97static int _clk_fll_devgrp_pmustatus_instget(struct gk20a *g,
98 void *pboardobjgrppmu, 98 void *pboardobjgrppmu,
99 struct nv_pmu_boardobj_query **ppboardobjpmustatus, 99 struct nv_pmu_boardobj_query **ppboardobjpmustatus,
100 u8 idx) 100 u8 idx)
@@ -114,9 +114,9 @@ static u32 _clk_fll_devgrp_pmustatus_instget(struct gk20a *g,
114 return 0; 114 return 0;
115} 115}
116 116
117u32 clk_fll_sw_setup(struct gk20a *g) 117int clk_fll_sw_setup(struct gk20a *g)
118{ 118{
119 u32 status; 119 int status;
120 struct boardobjgrp *pboardobjgrp = NULL; 120 struct boardobjgrp *pboardobjgrp = NULL;
121 struct avfsfllobjs *pfllobjs; 121 struct avfsfllobjs *pfllobjs;
122 struct fll_device *pfll; 122 struct fll_device *pfll;
@@ -209,9 +209,9 @@ done:
209 return status; 209 return status;
210} 210}
211 211
212u32 clk_fll_pmu_setup(struct gk20a *g) 212int clk_fll_pmu_setup(struct gk20a *g)
213{ 213{
214 u32 status; 214 int status;
215 struct boardobjgrp *pboardobjgrp = NULL; 215 struct boardobjgrp *pboardobjgrp = NULL;
216 216
217 nvgpu_log_info(g, " "); 217 nvgpu_log_info(g, " ");
@@ -228,10 +228,10 @@ u32 clk_fll_pmu_setup(struct gk20a *g)
228 return status; 228 return status;
229} 229}
230 230
231static u32 devinit_get_fll_device_table(struct gk20a *g, 231static int devinit_get_fll_device_table(struct gk20a *g,
232 struct avfsfllobjs *pfllobjs) 232 struct avfsfllobjs *pfllobjs)
233{ 233{
234 u32 status = 0; 234 int status = 0;
235 u8 *fll_table_ptr = NULL; 235 u8 *fll_table_ptr = NULL;
236 struct fll_descriptor_header fll_desc_table_header_sz = { 0 }; 236 struct fll_descriptor_header fll_desc_table_header_sz = { 0 };
237 struct fll_descriptor_header_10 fll_desc_table_header = { 0 }; 237 struct fll_descriptor_header_10 fll_desc_table_header = { 0 };
@@ -411,7 +411,7 @@ static struct fll_device *construct_fll_device(struct gk20a *g,
411 struct boardobj *board_obj_ptr = NULL; 411 struct boardobj *board_obj_ptr = NULL;
412 struct fll_device *pfll_dev; 412 struct fll_device *pfll_dev;
413 struct fll_device *board_obj_fll_ptr = NULL; 413 struct fll_device *board_obj_fll_ptr = NULL;
414 u32 status; 414 int status;
415 415
416 nvgpu_log_info(g, " "); 416 nvgpu_log_info(g, " ");
417 status = boardobj_construct_super(g, &board_obj_ptr, 417 status = boardobj_construct_super(g, &board_obj_ptr,
@@ -449,11 +449,11 @@ static struct fll_device *construct_fll_device(struct gk20a *g,
449 return (struct fll_device *)board_obj_ptr; 449 return (struct fll_device *)board_obj_ptr;
450} 450}
451 451
452static u32 fll_device_init_pmudata_super(struct gk20a *g, 452static int fll_device_init_pmudata_super(struct gk20a *g,
453 struct boardobj *board_obj_ptr, 453 struct boardobj *board_obj_ptr,
454 struct nv_pmu_boardobj *ppmudata) 454 struct nv_pmu_boardobj *ppmudata)
455{ 455{
456 u32 status = 0; 456 int status = 0;
457 struct fll_device *pfll_dev; 457 struct fll_device *pfll_dev;
458 struct nv_pmu_clk_clk_fll_device_boardobj_set *perf_pmu_data; 458 struct nv_pmu_clk_clk_fll_device_boardobj_set *perf_pmu_data;
459 459