Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1485780

[PATCH] vme: mark symbols static where possible

Path csiph.com!news.redatomik.org!aioe.org!bofh.it!news.nic.it!robomod
From Baoyou Xie <baoyou.xie@linaro.org>
Newsgroups linux.kernel
Subject [PATCH] vme: mark symbols static where possible
Date Sun, 18 Sep 2016 14:00:01 +0200
Message-ID <siIVj-7Dy-9@gated-at.bofh.it> (permalink)
X-Original-To martyn@welchs.me.uk, manohar.vanga@gmail.com, gregkh@linuxfoundation.org, arnd@arndb.de
Dkim-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id; bh=PcOHYGd6mwtJy3qJzB6JickxjyvPEv8M6QLjyvhmlD0=; b=dVnZSIbRsPRWk6G/acjLQKXDSI6S+0b/Ym5onlcu2GPsdbprk2y3ndKyLGsW1D5vQK WusdeGVtsYGEykLHpYbfFHlbMyIhaq7ELObY7zUoNW9aV90dvLbD0z2wCHOcsrhzBO0k 1wJpeVAU1MC5YxniO21ByxYm/9j5utGoCQ7KI=
X-Google-Dkim-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=PcOHYGd6mwtJy3qJzB6JickxjyvPEv8M6QLjyvhmlD0=; b=DBGfW8J6geqdsrZznHo+8/1T9UAXLv4qMIa56pGwwq1UYyhhJDXjMn1iHffRXPDxGj Cm813LqmRd1aeNE/VAyqFtZ/E9GFcfK1CIvej4GLBVxU728Lt8vpTzetbJM7y19V46y1 ShRSWmp0pIaF56zjMzpx8bSBj+S53o7kV2YPztAXr0gYTXZoHP5XUDVg7EvhsrVgxedn Tl8AMPQw608J8vEYFYKu1We0dJFoh08hrxTNAn3zFIQFRi3abrkOw3hG8tXhbp+2IO7Q uAVyQ0QFd461wobUoKg7xV78E3dQb3eHc07RojvkVah5iL9D0d0MbDUJPPeWLVXW0EXz j1CQ==
X-Gm-Message-State AE9vXwOnDDNQwrgt2lcXPKngr6IsO0fuzaniby2cvzyeV4PiuNGwUtcdJdkQcgMbg9DEG315
X-Received by 10.66.16.38 with SMTP id c6mr37827975pad.64.1474199924365; Sun, 18 Sep 2016 04:58:44 -0700 (PDT)
X-Mailer git-send-email 2.7.4
Sender robomod@news.nic.it
List-ID <linux-kernel.vger.kernel.org>
X-Mailing-List linux-kernel@vger.kernel.org
Approved robomod@news.nic.it
Lines 65
Organization linux.* mail to news gateway
X-Original-Cc devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org, baoyou.xie@linaro.org, xie.baoyou@zte.com.cn
X-Original-Date Sun, 18 Sep 2016 19:57:22 +0800
X-Original-Message-ID <1474199842-6887-1-git-send-email-baoyou.xie@linaro.org>
X-Original-Sender linux-kernel-owner@vger.kernel.org
Xref csiph.com linux.kernel:1485780

Show key headers only | View raw


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(-)

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;
-- 
2.7.4

Back to linux.kernel | Previous | Next | Find similar | Unroll thread


Thread

[PATCH] vme: mark symbols static where possible Baoyou Xie <baoyou.xie@linaro.org> - 2016-09-18 14:00 +0200

csiph-web