summaryrefslogtreecommitdiffstats
path: root/drivers/gpu
diff options
context:
space:
mode:
authorSachin Nikam <snikam@nvidia.com>2017-05-15 06:22:19 -0400
committermobile promotions <svcmobile_promotions@nvidia.com>2017-05-16 05:32:35 -0400
commit4f0436de19939e7b00d4032e5c58a7095c9e7b7a (patch)
tree3386c7e2d6f3935f5f8d59c18bbd6e16d4a4a10e /drivers/gpu
parent326ed94d7ad0948cb899cbec240b14085e431b40 (diff)
nvgpu: fix static sparse warnings
Fixed below static sparse warnings by making either function as static or including right header. - $TOP/kernel/nvgpu/drivers/gpu/nvgpu/common/linux/module.c:816:5: warning: symbol 'gk20a_pm_init' was not declared. Should it be static? - $TOP/kernel/nvgpu/drivers/gpu/nvgpu/gk20a/bus_gk20a.c:28:6: warning: symbol 'gk20a_bus_init_hw' was not declared. Should it be static? - $TOP/kernel/nvgpu/drivers/gpu/nvgpu/gk20a/bus_gk20a.c:54:6: warning: symbol 'gk20a_bus_isr' was not declared. Should it be static? - $TOP/kernel/nvgpu/drivers/gpu/nvgpu/gk20a/bus_gk20a.c:90:5: warning: symbol 'gk20a_read_ptimer' was not declared. Should it be static? - $TOP/kernel/nvgpu/drivers/gpu/nvgpu/gk20a/bus_gk20a.c:147:6: warning: symbol 'gk20a_init_bus' was not declared. Should it be static? - $TOP/kernel/nvgpu/drivers/gpu/nvgpu/gk20a/ltc_gk20a.c:232:6: warning: symbol 'gk20a_init_ltc' was not declared. Should it be static? - $TOP/kernel/nvgpu/drivers/gpu/nvgpu/gk20a/fb_gk20a.c:75:6: warning: symbol 'gk20a_fb_debug_mode_enabled' was not declared. Should it be static? - $TOP/kernel/nvgpu/drivers/gpu/nvgpu/gm20b/hal_gm20b.c:184:5: warning: symbol 'gm20b_init_hal' was not declared. Should it be static? - $TOP/kernel/nvgpu/drivers/gpu/nvgpu/gm20b/fb_gm20b.c:165:5: warning: symbol 'gm20b_fb_vpr_info_fetch' was not declared. Should it be static? - $TOP/kernel/nvgpu/drivers/gpu/nvgpu/gm20b/ltc_gm20b.c:103:5: warning: symbol 'gm20b_ltc_cbc_ctrl' was not declared. Should it be static? - $TOP/kernel/nvgpu/drivers/gpu/nvgpu/gm20b/ltc_gm20b.c:168:6: warning: symbol 'gm20b_ltc_init_fs_state' was not declared. Should it be static? - $TOP/kernel/nvgpu/drivers/gpu/nvgpu/gm20b/ltc_gm20b.c:195:6: warning: symbol 'gm20b_ltc_isr' was not declared. Should it be static? - $TOP/kernel/nvgpu/drivers/gpu/nvgpu/gm20b/ltc_gm20b.c:221:5: warning: symbol 'gm20b_ltc_cbc_fix_config' was not declared. Should it be static? - $TOP/kernel/nvgpu/drivers/gpu/nvgpu/gm20b/ltc_gm20b.c:236:6: warning: symbol 'gm20b_flush_ltc' was not declared. Should it be static? - $TOP/kernel/nvgpu/drivers/gpu/nvgpu/gm20b/ltc_gm20b.c:350:6: warning: symbol 'gm20b_init_ltc' was not declared. Should it be static? - $TOP/kernel/nvgpu/drivers/gpu/nvgpu/tegra/linux/clk.c:72:6: warning: symbol 'nvgpu_linux_init_clk_support' was not declared. Should it be static? - $TOP/kernel/nvgpu/drivers/gpu/nvgpu/gp10b/ltc_gp10b.c:206:6: warning: symbol 'gp10b_init_ltc' was not declared. Should it be static? - $TOP/kernel/nvgpu/drivers/gpu/nvgpu/gp10b/fb_gp10b.c:98:6: warning: symbol 'gp10b_init_fb' was not declared. Should it be static? - $TOP/kernel/nvgpu/drivers/gpu/nvgpu/gp10b/hal_gp10b.c:190:5: warning: symbol 'gp10b_init_hal' was not declared. Should it be static? - $TOP/kernel/nvgpu/drivers/gpu/nvgpu/gp10b/priv_ring_gp10b.c:79:6: warning: symbol 'gp10b_init_priv_ring' was not declared. Should it be static? - $TOP/kernel/nvgpu/drivers/gpu/nvgpu/gp106/hal_gp106.c:222:5: warning: symbol 'gp106_init_hal' was not declared. Should it be static? - $TOP/kernel/nvgpu/drivers/gpu/nvgpu/gp106/fb_gp106.c:42:6: warning: symbol 'gp106_init_fb' was not declared. Should it be static? Bug 200299572 Change-Id: I32f9a3cb65314bd1eb1a6d93cda5796cfa64d738 Signed-off-by: Sachin Nikam <snikam@nvidia.com> Reviewed-on: http://git-master/r/1481804 Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Diffstat (limited to 'drivers/gpu')
-rw-r--r--drivers/gpu/nvgpu/common/linux/module.c2
-rw-r--r--drivers/gpu/nvgpu/gk20a/bus_gk20a.c1
-rw-r--r--drivers/gpu/nvgpu/gk20a/fb_gk20a.c4
-rw-r--r--drivers/gpu/nvgpu/gk20a/ltc_gk20a.c1
-rw-r--r--drivers/gpu/nvgpu/gm20b/fb_gm20b.c2
-rw-r--r--drivers/gpu/nvgpu/gm20b/hal_gm20b.c1
-rw-r--r--drivers/gpu/nvgpu/gm20b/ltc_gm20b.c1
-rw-r--r--drivers/gpu/nvgpu/gp106/fb_gp106.c4
-rw-r--r--drivers/gpu/nvgpu/gp106/hal_gp106.c2
-rw-r--r--drivers/gpu/nvgpu/gp10b/fb_gp10b.c3
-rw-r--r--drivers/gpu/nvgpu/gp10b/hal_gp10b.c1
-rw-r--r--drivers/gpu/nvgpu/gp10b/ltc_gp10b.c1
-rw-r--r--drivers/gpu/nvgpu/tegra/linux/clk.c1
13 files changed, 18 insertions, 6 deletions
diff --git a/drivers/gpu/nvgpu/common/linux/module.c b/drivers/gpu/nvgpu/common/linux/module.c
index 72719297..c73b4940 100644
--- a/drivers/gpu/nvgpu/common/linux/module.c
+++ b/drivers/gpu/nvgpu/common/linux/module.c
@@ -809,7 +809,7 @@ static const struct dev_pm_ops gk20a_pm_ops = {
809}; 809};
810#endif 810#endif
811 811
812int gk20a_pm_init(struct device *dev) 812static int gk20a_pm_init(struct device *dev)
813{ 813{
814 struct gk20a *g = get_gk20a(dev); 814 struct gk20a *g = get_gk20a(dev);
815 int err = 0; 815 int err = 0;
diff --git a/drivers/gpu/nvgpu/gk20a/bus_gk20a.c b/drivers/gpu/nvgpu/gk20a/bus_gk20a.c
index 5f25271f..52ef08e4 100644
--- a/drivers/gpu/nvgpu/gk20a/bus_gk20a.c
+++ b/drivers/gpu/nvgpu/gk20a/bus_gk20a.c
@@ -19,6 +19,7 @@
19#include <nvgpu/soc.h> 19#include <nvgpu/soc.h>
20 20
21#include "gk20a.h" 21#include "gk20a.h"
22#include "bus_gk20a.h"
22 23
23#include <nvgpu/hw/gk20a/hw_bus_gk20a.h> 24#include <nvgpu/hw/gk20a/hw_bus_gk20a.h>
24#include <nvgpu/hw/gk20a/hw_mc_gk20a.h> 25#include <nvgpu/hw/gk20a/hw_mc_gk20a.h>
diff --git a/drivers/gpu/nvgpu/gk20a/fb_gk20a.c b/drivers/gpu/nvgpu/gk20a/fb_gk20a.c
index 4a76bd6b..5aae14f2 100644
--- a/drivers/gpu/nvgpu/gk20a/fb_gk20a.c
+++ b/drivers/gpu/nvgpu/gk20a/fb_gk20a.c
@@ -1,7 +1,7 @@
1/* 1/*
2 * GK20A memory interface 2 * GK20A memory interface
3 * 3 *
4 * Copyright (c) 2014-2015, NVIDIA CORPORATION. All rights reserved. 4 * Copyright (c) 2014-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,
@@ -72,7 +72,7 @@ static unsigned int gk20a_fb_compressible_page_size(struct gk20a *g)
72 return SZ_64K; 72 return SZ_64K;
73} 73}
74 74
75bool gk20a_fb_debug_mode_enabled(struct gk20a *g) 75static bool gk20a_fb_debug_mode_enabled(struct gk20a *g)
76{ 76{
77 u32 debug_ctrl = gk20a_readl(g, fb_mmu_debug_ctrl_r()); 77 u32 debug_ctrl = gk20a_readl(g, fb_mmu_debug_ctrl_r());
78 return fb_mmu_debug_ctrl_debug_v(debug_ctrl) == 78 return fb_mmu_debug_ctrl_debug_v(debug_ctrl) ==
diff --git a/drivers/gpu/nvgpu/gk20a/ltc_gk20a.c b/drivers/gpu/nvgpu/gk20a/ltc_gk20a.c
index 4bd8f816..70b688f6 100644
--- a/drivers/gpu/nvgpu/gk20a/ltc_gk20a.c
+++ b/drivers/gpu/nvgpu/gk20a/ltc_gk20a.c
@@ -22,6 +22,7 @@
22#include <nvgpu/bug.h> 22#include <nvgpu/bug.h>
23 23
24#include "gk20a.h" 24#include "gk20a.h"
25#include "ltc_gk20a.h"
25 26
26#include <nvgpu/hw/gk20a/hw_ltc_gk20a.h> 27#include <nvgpu/hw/gk20a/hw_ltc_gk20a.h>
27 28
diff --git a/drivers/gpu/nvgpu/gm20b/fb_gm20b.c b/drivers/gpu/nvgpu/gm20b/fb_gm20b.c
index ae500409..8b811cbe 100644
--- a/drivers/gpu/nvgpu/gm20b/fb_gm20b.c
+++ b/drivers/gpu/nvgpu/gm20b/fb_gm20b.c
@@ -162,7 +162,7 @@ static int gm20b_fb_vpr_info_fetch_wait(struct gk20a *g,
162 return -ETIMEDOUT; 162 return -ETIMEDOUT;
163} 163}
164 164
165int gm20b_fb_vpr_info_fetch(struct gk20a *g) 165static int gm20b_fb_vpr_info_fetch(struct gk20a *g)
166{ 166{
167 if (gm20b_fb_vpr_info_fetch_wait(g, VPR_INFO_FETCH_WAIT)) { 167 if (gm20b_fb_vpr_info_fetch_wait(g, VPR_INFO_FETCH_WAIT)) {
168 return -ETIME; 168 return -ETIME;
diff --git a/drivers/gpu/nvgpu/gm20b/hal_gm20b.c b/drivers/gpu/nvgpu/gm20b/hal_gm20b.c
index fbeed3c2..33198c23 100644
--- a/drivers/gpu/nvgpu/gm20b/hal_gm20b.c
+++ b/drivers/gpu/nvgpu/gm20b/hal_gm20b.c
@@ -36,6 +36,7 @@
36#include "debug_gm20b.h" 36#include "debug_gm20b.h"
37#include "cde_gm20b.h" 37#include "cde_gm20b.h"
38#include "therm_gm20b.h" 38#include "therm_gm20b.h"
39#include "hal_gm20b.h"
39 40
40#include <nvgpu/bug.h> 41#include <nvgpu/bug.h>
41 42
diff --git a/drivers/gpu/nvgpu/gm20b/ltc_gm20b.c b/drivers/gpu/nvgpu/gm20b/ltc_gm20b.c
index 33f0c483..2127badb 100644
--- a/drivers/gpu/nvgpu/gm20b/ltc_gm20b.c
+++ b/drivers/gpu/nvgpu/gm20b/ltc_gm20b.c
@@ -26,6 +26,7 @@
26#include <nvgpu/hw/gm20b/hw_pri_ringmaster_gm20b.h> 26#include <nvgpu/hw/gm20b/hw_pri_ringmaster_gm20b.h>
27 27
28#include "gk20a/ltc_common.c" 28#include "gk20a/ltc_common.c"
29#include "ltc_gm20b.h"
29 30
30static int gm20b_ltc_init_comptags(struct gk20a *g, struct gr_gk20a *gr) 31static int gm20b_ltc_init_comptags(struct gk20a *g, struct gr_gk20a *gr)
31{ 32{
diff --git a/drivers/gpu/nvgpu/gp106/fb_gp106.c b/drivers/gpu/nvgpu/gp106/fb_gp106.c
index dcb7e545..5be7062d 100644
--- a/drivers/gpu/nvgpu/gp106/fb_gp106.c
+++ b/drivers/gpu/nvgpu/gp106/fb_gp106.c
@@ -1,5 +1,5 @@
1/* 1/*
2 * Copyright (c) 2016, NVIDIA CORPORATION. All rights reserved. 2 * Copyright (c) 2016-2017, NVIDIA CORPORATION. All rights reserved.
3 * 3 *
4 * This program is free software; you can redistribute it and/or modify it 4 * This program is free software; you can redistribute it and/or modify it
5 * under the terms and conditions of the GNU General Public License, 5 * under the terms and conditions of the GNU General Public License,
@@ -14,6 +14,8 @@
14#include "gk20a/gk20a.h" 14#include "gk20a/gk20a.h"
15#include "gp10b/fb_gp10b.h" 15#include "gp10b/fb_gp10b.h"
16 16
17#include "fb_gp106.h"
18
17#include <nvgpu/hw/gp106/hw_fb_gp106.h> 19#include <nvgpu/hw/gp106/hw_fb_gp106.h>
18 20
19#define HW_SCRUB_TIMEOUT_DEFAULT 100 /* usec */ 21#define HW_SCRUB_TIMEOUT_DEFAULT 100 /* usec */
diff --git a/drivers/gpu/nvgpu/gp106/hal_gp106.c b/drivers/gpu/nvgpu/gp106/hal_gp106.c
index 3f64283a..eeb1bdd6 100644
--- a/drivers/gpu/nvgpu/gp106/hal_gp106.c
+++ b/drivers/gpu/nvgpu/gp106/hal_gp106.c
@@ -51,6 +51,8 @@
51#include "gp106/fb_gp106.h" 51#include "gp106/fb_gp106.h"
52#include "gp106/gp106_gating_reglist.h" 52#include "gp106/gp106_gating_reglist.h"
53 53
54#include "hal_gp106.h"
55
54#include <nvgpu/bug.h> 56#include <nvgpu/bug.h>
55 57
56#include <nvgpu/hw/gp106/hw_proj_gp106.h> 58#include <nvgpu/hw/gp106/hw_proj_gp106.h>
diff --git a/drivers/gpu/nvgpu/gp10b/fb_gp10b.c b/drivers/gpu/nvgpu/gp10b/fb_gp10b.c
index aa6b543a..06cd94f2 100644
--- a/drivers/gpu/nvgpu/gp10b/fb_gp10b.c
+++ b/drivers/gpu/nvgpu/gp10b/fb_gp10b.c
@@ -1,7 +1,7 @@
1/* 1/*
2 * GP10B FB 2 * GP10B FB
3 * 3 *
4 * Copyright (c) 2014, NVIDIA CORPORATION. All rights reserved. 4 * Copyright (c) 2014-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,7 @@
16#include "gk20a/gk20a.h" 16#include "gk20a/gk20a.h"
17#include "gm20b/fb_gm20b.h" 17#include "gm20b/fb_gm20b.h"
18#include "gk20a/kind_gk20a.h" 18#include "gk20a/kind_gk20a.h"
19#include "fb_gp10b.h"
19 20
20#include <nvgpu/hw/gp10b/hw_gmmu_gp10b.h> 21#include <nvgpu/hw/gp10b/hw_gmmu_gp10b.h>
21 22
diff --git a/drivers/gpu/nvgpu/gp10b/hal_gp10b.c b/drivers/gpu/nvgpu/gp10b/hal_gp10b.c
index 1d3ad275..133582cd 100644
--- a/drivers/gpu/nvgpu/gp10b/hal_gp10b.c
+++ b/drivers/gpu/nvgpu/gp10b/hal_gp10b.c
@@ -42,6 +42,7 @@
42#include "gm20b/clk_gm20b.h" 42#include "gm20b/clk_gm20b.h"
43 43
44#include "gp10b.h" 44#include "gp10b.h"
45#include "hal_gp10b.h"
45 46
46#include <nvgpu/bug.h> 47#include <nvgpu/bug.h>
47 48
diff --git a/drivers/gpu/nvgpu/gp10b/ltc_gp10b.c b/drivers/gpu/nvgpu/gp10b/ltc_gp10b.c
index 9ca5f46e..e65e3d06 100644
--- a/drivers/gpu/nvgpu/gp10b/ltc_gp10b.c
+++ b/drivers/gpu/nvgpu/gp10b/ltc_gp10b.c
@@ -24,6 +24,7 @@
24#include <nvgpu/hw/gp10b/hw_ltc_gp10b.h> 24#include <nvgpu/hw/gp10b/hw_ltc_gp10b.h>
25 25
26#include "gk20a/ltc_common.c" 26#include "gk20a/ltc_common.c"
27#include "ltc_gp10b.h"
27 28
28static int gp10b_determine_L2_size_bytes(struct gk20a *g) 29static int gp10b_determine_L2_size_bytes(struct gk20a *g)
29{ 30{
diff --git a/drivers/gpu/nvgpu/tegra/linux/clk.c b/drivers/gpu/nvgpu/tegra/linux/clk.c
index e1d715b9..876bac91 100644
--- a/drivers/gpu/nvgpu/tegra/linux/clk.c
+++ b/drivers/gpu/nvgpu/tegra/linux/clk.c
@@ -18,6 +18,7 @@
18 18
19#include <linux/clk.h> 19#include <linux/clk.h>
20 20
21#include "clk.h"
21#include "gk20a/gk20a.h" 22#include "gk20a/gk20a.h"
22 23
23static unsigned long nvgpu_linux_clk_get_rate(struct gk20a *g, u32 api_domain) 24static unsigned long nvgpu_linux_clk_get_rate(struct gk20a *g, u32 api_domain)