From patchwork Sun Sep 18 11:57:22 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Baoyou Xie X-Patchwork-Id: 76463 Delivered-To: patch@linaro.org Received: by 10.140.106.72 with SMTP id d66csp497147qgf; Sun, 18 Sep 2016 04:58:57 -0700 (PDT) X-Received: by 10.66.194.196 with SMTP id hy4mr38259315pac.63.1474199937894; Sun, 18 Sep 2016 04:58:57 -0700 (PDT) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f27si34117520pfj.206.2016.09.18.04.58.57; Sun, 18 Sep 2016 04:58:57 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1765180AbcIRL6y (ORCPT + 27 others); Sun, 18 Sep 2016 07:58:54 -0400 Received: from mail-pa0-f44.google.com ([209.85.220.44]:33705 "EHLO mail-pa0-f44.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753192AbcIRL6p (ORCPT ); Sun, 18 Sep 2016 07:58:45 -0400 Received: by mail-pa0-f44.google.com with SMTP id hm5so7394309pac.0 for ; Sun, 18 Sep 2016 04:58:44 -0700 (PDT) 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) Received: from localhost.localdomain ([104.237.91.27]) by smtp.gmail.com with ESMTPSA id d14sm64143770pfb.50.2016.09.18.04.58.41 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sun, 18 Sep 2016 04:58:43 -0700 (PDT) From: Baoyou Xie To: martyn@welchs.me.uk, manohar.vanga@gmail.com, gregkh@linuxfoundation.org, arnd@arndb.de Cc: devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org, baoyou.xie@linaro.org, xie.baoyou@zte.com.cn Subject: [PATCH] vme: mark symbols static where possible Date: Sun, 18 Sep 2016 19:57:22 +0800 Message-Id: <1474199842-6887-1-git-send-email-baoyou.xie@linaro.org> X-Mailer: git-send-email 2.7.4 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- drivers/vme/bridges/vme_fake.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) -- 2.7.4 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;