diff mbox

vme: mark symbols static where possible

Message ID 1474199842-6887-1-git-send-email-baoyou.xie@linaro.org
State Superseded
Headers show

Commit Message

Baoyou Xie Sept. 18, 2016, 11:57 a.m. UTC
We get 4 warnings when building kernel with W=1:
drivers/vme/bridges/vme_fake.c:374:6: warning: no previous prototype for 'fake_lm_check' [-Wmissing-prototypes]
drivers/vme/bridges/vme_fake.c:609:6: warning: no previous prototype for 'fake_vmewrite8' [-Wmissing-prototypes]
drivers/vme/bridges/vme_fake.c:639:6: warning: no previous prototype for 'fake_vmewrite16' [-Wmissing-prototypes]
drivers/vme/bridges/vme_fake.c:669:6: warning: no previous prototype for 'fake_vmewrite32' [-Wmissing-prototypes]

In fact, these functions are only used in the file in which they are
declared and don't need a declaration, but can be made static.
so this patch marks these functions with 'static'.

Signed-off-by: Baoyou Xie <baoyou.xie@linaro.org>

---
 drivers/vme/bridges/vme_fake.c | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

-- 
2.7.4
diff mbox

Patch

diff --git a/drivers/vme/bridges/vme_fake.c b/drivers/vme/bridges/vme_fake.c
index 7ef298b..37de936 100644
--- a/drivers/vme/bridges/vme_fake.c
+++ b/drivers/vme/bridges/vme_fake.c
@@ -371,8 +371,8 @@  static int fake_master_get(struct vme_master_resource *image, int *enabled,
 }
 
 
-void fake_lm_check(struct fake_driver *bridge, unsigned long long addr,
-		u32 aspace, u32 cycle)
+static void fake_lm_check(struct fake_driver *bridge, unsigned long long addr,
+			  u32 aspace, u32 cycle)
 {
 	struct vme_bridge *fake_bridge;
 	unsigned long long lm_base;
@@ -606,8 +606,8 @@  out:
 	return retval;
 }
 
-void fake_vmewrite8(struct fake_driver *bridge, u8 *buf,
-		 unsigned long long addr, u32 aspace, u32 cycle)
+static void fake_vmewrite8(struct fake_driver *bridge, u8 *buf,
+			   unsigned long long addr, u32 aspace, u32 cycle)
 {
 	int i;
 	unsigned long long start, end, offset;
@@ -636,8 +636,8 @@  void fake_vmewrite8(struct fake_driver *bridge, u8 *buf,
 
 }
 
-void fake_vmewrite16(struct fake_driver *bridge, u16 *buf,
-		unsigned long long addr, u32 aspace, u32 cycle)
+static void fake_vmewrite16(struct fake_driver *bridge, u16 *buf,
+			    unsigned long long addr, u32 aspace, u32 cycle)
 {
 	int i;
 	unsigned long long start, end, offset;
@@ -666,8 +666,8 @@  void fake_vmewrite16(struct fake_driver *bridge, u16 *buf,
 
 }
 
-void fake_vmewrite32(struct fake_driver *bridge, u32 *buf,
-		unsigned long long addr, u32 aspace, u32 cycle)
+static void fake_vmewrite32(struct fake_driver *bridge, u32 *buf,
+			    unsigned long long addr, u32 aspace, u32 cycle)
 {
 	int i;
 	unsigned long long start, end, offset;