summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNicolin Chen <nicolinc@nvidia.com>2018-10-17 18:05:11 -0400
committermobile promotions <svcmobile_promotions@nvidia.com>2018-10-25 06:53:54 -0400
commite1c52e46ea383dd280f9d65a4e34422fd9f3637a (patch)
tree57a629ce00776d910f35c84dc130ddb2755a3d24
parentdb8324ff9838a0d0fee349f8c21ea5406177353a (diff)
gpu: nvgpu: Define functions static if DEBUG_FS=n
When turning off CONFIG_DEBUG_FS, there are build errors: drivers/gpu/nvgpu/os/linux/os_ops_gp106.o: In function `nvgpu_fecs_trace_init_debugfs': os_ops_gp106.c:(.text+0x8): multiple definition of `nvgpu_fecs_trace_init_debugfs' drivers/gpu/nvgpu/os/linux/os_ops_gp10b.o:os_ops_gp10b.c:(.text+0x0): first defined here drivers/gpu/nvgpu/os/linux/os_ops_gv100.o: In function `gp106_therm_init_debugfs': os_ops_gv100.c:(.text+0x0): multiple definition of `gp106_therm_init_debugfs' drivers/gpu/nvgpu/os/linux/os_ops_gp106.o:os_ops_gp106.c:(.text+0x0): first defined here drivers/gpu/nvgpu/os/linux/os_ops_tu104.o: In function `gv100_clk_init_debugfs': os_ops_tu104.c:(.text+0x0): multiple definition of `gv100_clk_init_debugfs' drivers/gpu/nvgpu/os/linux/os_ops_gv100.o:os_ops_gv100.c:(.text+0x10): first defined here This is because those functions aren't marked as static. So this patch just simply fixes the bug. Bug 2284925 Change-Id: I1da39345c653dfb50c509adb0c822b4657646c56 Signed-off-by: Nicolin Chen <nicolinc@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/1929355 (cherry picked from commit 0fd9c84f870731705d6fdbf83d8e94519ff9d3bd) Reviewed-on: https://git-master.nvidia.com/r/1933889 GVS: Gerrit_Virtual_Submit Reviewed-by: Vinayak Pane <vpane@nvidia.com> Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
-rw-r--r--drivers/gpu/nvgpu/os/linux/debug_clk_gv100.h2
-rw-r--r--drivers/gpu/nvgpu/os/linux/debug_fecs_trace.h2
-rw-r--r--drivers/gpu/nvgpu/os/linux/debug_therm_gp106.h2
3 files changed, 3 insertions, 3 deletions
diff --git a/drivers/gpu/nvgpu/os/linux/debug_clk_gv100.h b/drivers/gpu/nvgpu/os/linux/debug_clk_gv100.h
index 38ba61bd..419b4abf 100644
--- a/drivers/gpu/nvgpu/os/linux/debug_clk_gv100.h
+++ b/drivers/gpu/nvgpu/os/linux/debug_clk_gv100.h
@@ -20,7 +20,7 @@
20#ifdef CONFIG_DEBUG_FS 20#ifdef CONFIG_DEBUG_FS
21int gv100_clk_init_debugfs(struct gk20a *g); 21int gv100_clk_init_debugfs(struct gk20a *g);
22#else 22#else
23inline int gv100_clk_init_debugfs(struct gk20a *g) 23static inline int gv100_clk_init_debugfs(struct gk20a *g)
24{ 24{
25 return 0; 25 return 0;
26} 26}
diff --git a/drivers/gpu/nvgpu/os/linux/debug_fecs_trace.h b/drivers/gpu/nvgpu/os/linux/debug_fecs_trace.h
index a545f2db..54ebaaf9 100644
--- a/drivers/gpu/nvgpu/os/linux/debug_fecs_trace.h
+++ b/drivers/gpu/nvgpu/os/linux/debug_fecs_trace.h
@@ -22,7 +22,7 @@ struct gk20a;
22#if defined(CONFIG_DEBUG_FS) && defined(CONFIG_GK20A_CTXSW_TRACE) 22#if defined(CONFIG_DEBUG_FS) && defined(CONFIG_GK20A_CTXSW_TRACE)
23int nvgpu_fecs_trace_init_debugfs(struct gk20a *g); 23int nvgpu_fecs_trace_init_debugfs(struct gk20a *g);
24#else 24#else
25int nvgpu_fecs_trace_init_debugfs(struct gk20a *g) 25static int nvgpu_fecs_trace_init_debugfs(struct gk20a *g)
26{ 26{
27 return 0; 27 return 0;
28} 28}
diff --git a/drivers/gpu/nvgpu/os/linux/debug_therm_gp106.h b/drivers/gpu/nvgpu/os/linux/debug_therm_gp106.h
index 6ebc9f58..3e9380df 100644
--- a/drivers/gpu/nvgpu/os/linux/debug_therm_gp106.h
+++ b/drivers/gpu/nvgpu/os/linux/debug_therm_gp106.h
@@ -20,7 +20,7 @@
20#ifdef CONFIG_DEBUG_FS 20#ifdef CONFIG_DEBUG_FS
21int gp106_therm_init_debugfs(struct gk20a *g); 21int gp106_therm_init_debugfs(struct gk20a *g);
22#else 22#else
23inline int gp106_therm_init_debugfs(struct gk20a *g) 23static inline int gp106_therm_init_debugfs(struct gk20a *g)
24{ 24{
25 return 0; 25 return 0;
26} 26}