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>
This commit is contained in:
Sachin Nikam
2017-05-15 15:52:19 +05:30
committed by mobile promotions
parent 326ed94d7a
commit 4f0436de19
13 changed files with 18 additions and 6 deletions

View File

@@ -809,7 +809,7 @@ static const struct dev_pm_ops gk20a_pm_ops = {
};
#endif
int gk20a_pm_init(struct device *dev)
static int gk20a_pm_init(struct device *dev)
{
struct gk20a *g = get_gk20a(dev);
int err = 0;

View File

@@ -19,6 +19,7 @@
#include <nvgpu/soc.h>
#include "gk20a.h"
#include "bus_gk20a.h"
#include <nvgpu/hw/gk20a/hw_bus_gk20a.h>
#include <nvgpu/hw/gk20a/hw_mc_gk20a.h>

View File

@@ -1,7 +1,7 @@
/*
* GK20A memory interface
*
* Copyright (c) 2014-2015, NVIDIA CORPORATION. All rights reserved.
* Copyright (c) 2014-2017, NVIDIA CORPORATION. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify it
* 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)
return SZ_64K;
}
bool gk20a_fb_debug_mode_enabled(struct gk20a *g)
static bool gk20a_fb_debug_mode_enabled(struct gk20a *g)
{
u32 debug_ctrl = gk20a_readl(g, fb_mmu_debug_ctrl_r());
return fb_mmu_debug_ctrl_debug_v(debug_ctrl) ==

View File

@@ -22,6 +22,7 @@
#include <nvgpu/bug.h>
#include "gk20a.h"
#include "ltc_gk20a.h"
#include <nvgpu/hw/gk20a/hw_ltc_gk20a.h>

View File

@@ -162,7 +162,7 @@ static int gm20b_fb_vpr_info_fetch_wait(struct gk20a *g,
return -ETIMEDOUT;
}
int gm20b_fb_vpr_info_fetch(struct gk20a *g)
static int gm20b_fb_vpr_info_fetch(struct gk20a *g)
{
if (gm20b_fb_vpr_info_fetch_wait(g, VPR_INFO_FETCH_WAIT)) {
return -ETIME;

View File

@@ -36,6 +36,7 @@
#include "debug_gm20b.h"
#include "cde_gm20b.h"
#include "therm_gm20b.h"
#include "hal_gm20b.h"
#include <nvgpu/bug.h>

View File

@@ -26,6 +26,7 @@
#include <nvgpu/hw/gm20b/hw_pri_ringmaster_gm20b.h>
#include "gk20a/ltc_common.c"
#include "ltc_gm20b.h"
static int gm20b_ltc_init_comptags(struct gk20a *g, struct gr_gk20a *gr)
{

View File

@@ -1,5 +1,5 @@
/*
* Copyright (c) 2016, NVIDIA CORPORATION. All rights reserved.
* Copyright (c) 2016-2017, NVIDIA CORPORATION. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify it
* under the terms and conditions of the GNU General Public License,
@@ -14,6 +14,8 @@
#include "gk20a/gk20a.h"
#include "gp10b/fb_gp10b.h"
#include "fb_gp106.h"
#include <nvgpu/hw/gp106/hw_fb_gp106.h>
#define HW_SCRUB_TIMEOUT_DEFAULT 100 /* usec */

View File

@@ -51,6 +51,8 @@
#include "gp106/fb_gp106.h"
#include "gp106/gp106_gating_reglist.h"
#include "hal_gp106.h"
#include <nvgpu/bug.h>
#include <nvgpu/hw/gp106/hw_proj_gp106.h>

View File

@@ -1,7 +1,7 @@
/*
* GP10B FB
*
* Copyright (c) 2014, NVIDIA CORPORATION. All rights reserved.
* Copyright (c) 2014-2017, NVIDIA CORPORATION. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify it
* under the terms and conditions of the GNU General Public License,
@@ -16,6 +16,7 @@
#include "gk20a/gk20a.h"
#include "gm20b/fb_gm20b.h"
#include "gk20a/kind_gk20a.h"
#include "fb_gp10b.h"
#include <nvgpu/hw/gp10b/hw_gmmu_gp10b.h>

View File

@@ -42,6 +42,7 @@
#include "gm20b/clk_gm20b.h"
#include "gp10b.h"
#include "hal_gp10b.h"
#include <nvgpu/bug.h>

View File

@@ -24,6 +24,7 @@
#include <nvgpu/hw/gp10b/hw_ltc_gp10b.h>
#include "gk20a/ltc_common.c"
#include "ltc_gp10b.h"
static int gp10b_determine_L2_size_bytes(struct gk20a *g)
{

View File

@@ -18,6 +18,7 @@
#include <linux/clk.h>
#include "clk.h"
#include "gk20a/gk20a.h"
static unsigned long nvgpu_linux_clk_get_rate(struct gk20a *g, u32 api_domain)