diff options
author | Sachin Nikam <snikam@nvidia.com> | 2017-05-16 04:55:38 -0400 |
---|---|---|
committer | mobile promotions <svcmobile_promotions@nvidia.com> | 2017-05-17 05:15:46 -0400 |
commit | 8a036c83ce953cb71bfa47b1596daa34ed2860b1 (patch) | |
tree | 14c885f66ba1b00495f937468e4b9d17436707e0 | |
parent | 80a6291c9c5e373a3a534ba100b616b6789fb568 (diff) |
gpu: nvgpu: fix static sparse warnings
Fix below sparse warnings by making function
static or including right header:
- $TOP/kernel/nvgpu/drivers/gpu/nvgpu/gp10b/fecs_trace_gp10b.c:45:6: warning: symbol 'gp10b_init_fecs_trace_ops' was not declared. Should it be static?
- $TOP/kernel/nvgpu/drivers/gpu/nvgpu/gp106/hal_gp106.c:195:5: warning: symbol 'gp106_init_gpu_characteristics' was not declared. Should it be static?
- $TOP/kernel/nvgpu/drivers/gpu/nvgpu/pstate/pstate.c:175:5: warning: symbol 'pstate_construct_super' was not declared. Should it be static?
- $TOP/kernel/nvgpu/drivers/gpu/nvgpu/pstate/pstate.c:195:5: warning: symbol 'pstate_construct_3x' was not declared. Should it be static?
- $TOP/kernel/nvgpu/drivers/gpu/nvgpu/pstate/pstate.c:204:15: warning: symbol 'pstate_construct' was not declared. Should it be static?
- $TOP/kernel/nvgpu/drivers/gpu/nvgpu/pstate/pstate.c:218:5: warning: symbol 'pstate_insert' was not declared. Should it be static?
- $TOP/kernel/nvgpu/drivers/gpu/nvgpu/clk/clk_arb.c:1457:6: warning: symbol 'nvgpu_clk_arb_ioctl_event_dev' was not declared. Should it be static?
- $TOP/kernel/nvgpu/drivers/gpu/nvgpu/pmgr/pmgr.c:68:5: warning: symbol 'pmgr_pwr_devices_get_power_u64' was not declared. Should it be static?
- $TOP/kernel/nvgpu/drivers/gpu/nvgpu/pmgr/pmgr.c:80:5: warning: symbol 'pmgr_pwr_devices_get_current_u64' was not declared. Should it be static?
- $TOP/kernel/nvgpu/drivers/gpu/nvgpu/pmgr/pmgr.c:92:5: warning: symbol 'pmgr_pwr_devices_get_voltage_u64' was not declared. Should it be static?
Bug 200299572
Change-Id: I0112ba3af5b858d2ce2a37a8366dcb6be1eb688d
Signed-off-by: Sachin Nikam <snikam@nvidia.com>
Reviewed-on: http://git-master/r/1482866
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
-rw-r--r-- | drivers/gpu/nvgpu/clk/clk_arb.c | 2 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/gp106/hal_gp106.c | 2 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/gp10b/fecs_trace_gp10b.c | 4 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/gp10b/fecs_trace_gp10b.h | 4 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/pmgr/pmgr.c | 6 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/pstate/pstate.c | 8 |
6 files changed, 14 insertions, 12 deletions
diff --git a/drivers/gpu/nvgpu/clk/clk_arb.c b/drivers/gpu/nvgpu/clk/clk_arb.c index 22dc6fb7..15439817 100644 --- a/drivers/gpu/nvgpu/clk/clk_arb.c +++ b/drivers/gpu/nvgpu/clk/clk_arb.c | |||
@@ -1454,7 +1454,7 @@ static int nvgpu_clk_arb_set_event_filter(struct nvgpu_clk_dev *dev, | |||
1454 | return 0; | 1454 | return 0; |
1455 | } | 1455 | } |
1456 | 1456 | ||
1457 | long nvgpu_clk_arb_ioctl_event_dev(struct file *filp, unsigned int cmd, | 1457 | static long nvgpu_clk_arb_ioctl_event_dev(struct file *filp, unsigned int cmd, |
1458 | unsigned long arg) | 1458 | unsigned long arg) |
1459 | { | 1459 | { |
1460 | struct nvgpu_clk_dev *dev = filp->private_data; | 1460 | struct nvgpu_clk_dev *dev = filp->private_data; |
diff --git a/drivers/gpu/nvgpu/gp106/hal_gp106.c b/drivers/gpu/nvgpu/gp106/hal_gp106.c index eeb1bdd6..f28ff45f 100644 --- a/drivers/gpu/nvgpu/gp106/hal_gp106.c +++ b/drivers/gpu/nvgpu/gp106/hal_gp106.c | |||
@@ -194,7 +194,7 @@ static int gp106_get_litter_value(struct gk20a *g, int value) | |||
194 | return ret; | 194 | return ret; |
195 | } | 195 | } |
196 | 196 | ||
197 | int gp106_init_gpu_characteristics(struct gk20a *g) | 197 | static int gp106_init_gpu_characteristics(struct gk20a *g) |
198 | { | 198 | { |
199 | struct nvgpu_gpu_characteristics *gpu = &g->gpu_characteristics; | 199 | struct nvgpu_gpu_characteristics *gpu = &g->gpu_characteristics; |
200 | 200 | ||
diff --git a/drivers/gpu/nvgpu/gp10b/fecs_trace_gp10b.c b/drivers/gpu/nvgpu/gp10b/fecs_trace_gp10b.c index af06b8a6..723da1a2 100644 --- a/drivers/gpu/nvgpu/gp10b/fecs_trace_gp10b.c +++ b/drivers/gpu/nvgpu/gp10b/fecs_trace_gp10b.c | |||
@@ -1,7 +1,7 @@ | |||
1 | /* | 1 | /* |
2 | * GP10B GPU FECS traces | 2 | * GP10B GPU FECS traces |
3 | * | 3 | * |
4 | * Copyright (c) 2016, NVIDIA CORPORATION. All rights reserved. | 4 | * Copyright (c) 2016-2017, NVIDIA CORPORATION. All rights reserved. |
5 | * | 5 | * |
6 | * This program is free software; you can redistribute it and/or modify it | 6 | * This program is free software; you can redistribute it and/or modify it |
7 | * under the terms and conditions of the GNU General Public License, | 7 | * under the terms and conditions of the GNU General Public License, |
@@ -16,6 +16,8 @@ | |||
16 | #include "gk20a/gk20a.h" | 16 | #include "gk20a/gk20a.h" |
17 | #include "gk20a/fecs_trace_gk20a.h" | 17 | #include "gk20a/fecs_trace_gk20a.h" |
18 | 18 | ||
19 | #include "fecs_trace_gp10b.h" | ||
20 | |||
19 | #include <nvgpu/hw/gp10b/hw_ctxsw_prog_gp10b.h> | 21 | #include <nvgpu/hw/gp10b/hw_ctxsw_prog_gp10b.h> |
20 | #include <nvgpu/hw/gp10b/hw_gr_gp10b.h> | 22 | #include <nvgpu/hw/gp10b/hw_gr_gp10b.h> |
21 | 23 | ||
diff --git a/drivers/gpu/nvgpu/gp10b/fecs_trace_gp10b.h b/drivers/gpu/nvgpu/gp10b/fecs_trace_gp10b.h index 2a25f4f6..656bc551 100644 --- a/drivers/gpu/nvgpu/gp10b/fecs_trace_gp10b.h +++ b/drivers/gpu/nvgpu/gp10b/fecs_trace_gp10b.h | |||
@@ -1,7 +1,7 @@ | |||
1 | /* | 1 | /* |
2 | * GP10B GPU FECS traces | 2 | * GP10B GPU FECS traces |
3 | * | 3 | * |
4 | * Copyright (c) 2016, NVIDIA CORPORATION. All rights reserved. | 4 | * Copyright (c) 2016-2017, NVIDIA CORPORATION. All rights reserved. |
5 | * | 5 | * |
6 | * This program is free software; you can redistribute it and/or modify it | 6 | * This program is free software; you can redistribute it and/or modify it |
7 | * under the terms and conditions of the GNU General Public License, | 7 | * under the terms and conditions of the GNU General Public License, |
@@ -18,6 +18,6 @@ | |||
18 | 18 | ||
19 | struct gpu_ops; | 19 | struct gpu_ops; |
20 | 20 | ||
21 | int gp10b_init_fecs_trace_ops(struct gpu_ops *); | 21 | void gp10b_init_fecs_trace_ops(struct gpu_ops *); |
22 | 22 | ||
23 | #endif | 23 | #endif |
diff --git a/drivers/gpu/nvgpu/pmgr/pmgr.c b/drivers/gpu/nvgpu/pmgr/pmgr.c index f4fe984c..41c69dbd 100644 --- a/drivers/gpu/nvgpu/pmgr/pmgr.c +++ b/drivers/gpu/nvgpu/pmgr/pmgr.c | |||
@@ -65,7 +65,7 @@ int pmgr_pwr_devices_get_voltage(struct gk20a *g, u32 *val) | |||
65 | } | 65 | } |
66 | 66 | ||
67 | #ifdef CONFIG_DEBUG_FS | 67 | #ifdef CONFIG_DEBUG_FS |
68 | int pmgr_pwr_devices_get_power_u64(void *data, u64 *p) | 68 | static int pmgr_pwr_devices_get_power_u64(void *data, u64 *p) |
69 | { | 69 | { |
70 | struct gk20a *g = (struct gk20a *)data; | 70 | struct gk20a *g = (struct gk20a *)data; |
71 | int err; | 71 | int err; |
@@ -77,7 +77,7 @@ int pmgr_pwr_devices_get_power_u64(void *data, u64 *p) | |||
77 | return err; | 77 | return err; |
78 | } | 78 | } |
79 | 79 | ||
80 | int pmgr_pwr_devices_get_current_u64(void *data, u64 *p) | 80 | static int pmgr_pwr_devices_get_current_u64(void *data, u64 *p) |
81 | { | 81 | { |
82 | struct gk20a *g = (struct gk20a *)data; | 82 | struct gk20a *g = (struct gk20a *)data; |
83 | int err; | 83 | int err; |
@@ -89,7 +89,7 @@ int pmgr_pwr_devices_get_current_u64(void *data, u64 *p) | |||
89 | return err; | 89 | return err; |
90 | } | 90 | } |
91 | 91 | ||
92 | int pmgr_pwr_devices_get_voltage_u64(void *data, u64 *p) | 92 | static int pmgr_pwr_devices_get_voltage_u64(void *data, u64 *p) |
93 | { | 93 | { |
94 | struct gk20a *g = (struct gk20a *)data; | 94 | struct gk20a *g = (struct gk20a *)data; |
95 | int err; | 95 | int err; |
diff --git a/drivers/gpu/nvgpu/pstate/pstate.c b/drivers/gpu/nvgpu/pstate/pstate.c index 3110239a..791832cb 100644 --- a/drivers/gpu/nvgpu/pstate/pstate.c +++ b/drivers/gpu/nvgpu/pstate/pstate.c | |||
@@ -172,7 +172,7 @@ int gk20a_init_pstate_pmu_support(struct gk20a *g) | |||
172 | return err; | 172 | return err; |
173 | } | 173 | } |
174 | 174 | ||
175 | int pstate_construct_super(struct gk20a *g, struct boardobj **ppboardobj, | 175 | static int pstate_construct_super(struct gk20a *g, struct boardobj **ppboardobj, |
176 | u16 size, void *args) | 176 | u16 size, void *args) |
177 | { | 177 | { |
178 | struct pstate *ptmppstate = (struct pstate *)args; | 178 | struct pstate *ptmppstate = (struct pstate *)args; |
@@ -192,7 +192,7 @@ int pstate_construct_super(struct gk20a *g, struct boardobj **ppboardobj, | |||
192 | return 0; | 192 | return 0; |
193 | } | 193 | } |
194 | 194 | ||
195 | int pstate_construct_3x(struct gk20a *g, struct boardobj **ppboardobj, | 195 | static int pstate_construct_3x(struct gk20a *g, struct boardobj **ppboardobj, |
196 | u16 size, void *args) | 196 | u16 size, void *args) |
197 | { | 197 | { |
198 | struct boardobj *ptmpobj = (struct boardobj *)args; | 198 | struct boardobj *ptmpobj = (struct boardobj *)args; |
@@ -201,7 +201,7 @@ int pstate_construct_3x(struct gk20a *g, struct boardobj **ppboardobj, | |||
201 | return pstate_construct_super(g, ppboardobj, size, args); | 201 | return pstate_construct_super(g, ppboardobj, size, args); |
202 | } | 202 | } |
203 | 203 | ||
204 | struct pstate *pstate_construct(struct gk20a *g, void *args) | 204 | static struct pstate *pstate_construct(struct gk20a *g, void *args) |
205 | { | 205 | { |
206 | struct pstate *pstate = NULL; | 206 | struct pstate *pstate = NULL; |
207 | struct pstate *tmp = (struct pstate *)args; | 207 | struct pstate *tmp = (struct pstate *)args; |
@@ -215,7 +215,7 @@ struct pstate *pstate_construct(struct gk20a *g, void *args) | |||
215 | return pstate; | 215 | return pstate; |
216 | } | 216 | } |
217 | 217 | ||
218 | int pstate_insert(struct gk20a *g, struct pstate *pstate, int index) | 218 | static int pstate_insert(struct gk20a *g, struct pstate *pstate, int index) |
219 | { | 219 | { |
220 | struct pstates *pstates = &(g->perf_pmu.pstatesobjs); | 220 | struct pstates *pstates = &(g->perf_pmu.pstatesobjs); |
221 | int err; | 221 | int err; |