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/clk/clk_domain.h | |
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/clk/clk_domain.h')
-rw-r--r-- | drivers/gpu/nvgpu/clk/clk_domain.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/gpu/nvgpu/clk/clk_domain.h b/drivers/gpu/nvgpu/clk/clk_domain.h index 4441e7a1..d0170339 100644 --- a/drivers/gpu/nvgpu/clk/clk_domain.h +++ b/drivers/gpu/nvgpu/clk/clk_domain.h | |||
@@ -38,10 +38,10 @@ struct clk_domain; | |||
38 | enum nv_pmu_clk_clkwhich; | 38 | enum nv_pmu_clk_clkwhich; |
39 | 39 | ||
40 | /*data and function definition to talk to driver*/ | 40 | /*data and function definition to talk to driver*/ |
41 | u32 clk_domain_sw_setup(struct gk20a *g); | 41 | int clk_domain_sw_setup(struct gk20a *g); |
42 | u32 clk_domain_pmu_setup(struct gk20a *g); | 42 | int clk_domain_pmu_setup(struct gk20a *g); |
43 | 43 | ||
44 | typedef u32 clkproglink(struct gk20a *g, struct clk_pmupstate *pclk, | 44 | typedef int clkproglink(struct gk20a *g, struct clk_pmupstate *pclk, |
45 | struct clk_domain *pdomain); | 45 | struct clk_domain *pdomain); |
46 | 46 | ||
47 | typedef int clkvfsearch(struct gk20a *g, struct clk_pmupstate *pclk, | 47 | typedef int clkvfsearch(struct gk20a *g, struct clk_pmupstate *pclk, |
@@ -123,7 +123,7 @@ struct clk_domain_3x_slave { | |||
123 | clkgetslaveclk *clkdomainclkgetslaveclk; | 123 | clkgetslaveclk *clkdomainclkgetslaveclk; |
124 | }; | 124 | }; |
125 | 125 | ||
126 | u32 clk_domain_clk_prog_link(struct gk20a *g, struct clk_pmupstate *pclk); | 126 | int clk_domain_clk_prog_link(struct gk20a *g, struct clk_pmupstate *pclk); |
127 | 127 | ||
128 | #define CLK_CLK_DOMAIN_GET(pclk, idx) \ | 128 | #define CLK_CLK_DOMAIN_GET(pclk, idx) \ |
129 | ((struct clk_domain *)BOARDOBJGRP_OBJ_GET_BY_IDX( \ | 129 | ((struct clk_domain *)BOARDOBJGRP_OBJ_GET_BY_IDX( \ |