From patchwork Mon Aug 29 12:50:42 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Baoyou Xie X-Patchwork-Id: 74907 Delivered-To: patch@linaro.org Received: by 10.140.29.52 with SMTP id a49csp1616700qga; Mon, 29 Aug 2016 05:52:16 -0700 (PDT) X-Received: by 10.98.13.157 with SMTP id 29mr32190276pfn.105.1472475136728; Mon, 29 Aug 2016 05:52:16 -0700 (PDT) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e11si39086456pal.229.2016.08.29.05.52.16; Mon, 29 Aug 2016 05:52:16 -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 S932994AbcH2MwN (ORCPT + 27 others); Mon, 29 Aug 2016 08:52:13 -0400 Received: from mail-pa0-f41.google.com ([209.85.220.41]:34471 "EHLO mail-pa0-f41.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756632AbcH2MwL (ORCPT ); Mon, 29 Aug 2016 08:52:11 -0400 Received: by mail-pa0-f41.google.com with SMTP id fi15so49493912pac.1 for ; Mon, 29 Aug 2016 05:52:11 -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=PbSqCPwcF7bH1OgMQCyGhyR3inXAcKwioK2uh7/l/mk=; b=CBCInnWBzpe6jx/oPeqSiIkbIruiwkmu1vpM83FtCjfGRR67FoAO3J71h8pemnqq3u sGbwQ+qGu0W928ZrqKOKp9sgc9DTBM9YStxedSrhYWX7O8VE/gNa1+XihYAcqdIQssi2 RZa4GEXXC0VSSiApXErGwtlLNrduo3elRtVbc= 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=PbSqCPwcF7bH1OgMQCyGhyR3inXAcKwioK2uh7/l/mk=; b=UvkwlNCJGbKa48I9Vu8pXtfRdJKZYxgTM4iDE5jVIMFGUFezpIvpgaNYdm6Tpd3LcR LRqVvlSENU57mRCuHRf8lq4yDxhcBMvfmMo+Ov4pzMvx04IuWu4LxNfBbRiDfxth0pNl 5nttOXbFwWgQy4du0G01g9wjXaF14rJUw57LJ+htwZ6hwNXPyEfmSxYJsWTqn4g9ZC4y /3bulYnJoOvh1BYyIW90gVPEe/9yl6Qp1PL1RWMHrHmM3kxZa+NaAhth/ihNWWQReKC1 KCPGPDL8kKdpz/stS5eb0r+3lkdXSMEYB/YJ0hwUmwdzgGx+pnVZUAyaqBtJF++4LnZi PT1A== X-Gm-Message-State: AE9vXwMJ0krsRJqF6h8InCdSn8pBafoSzM89ysGEDBqc3ScqvAdGKrmJeI0uvh0FfKFC4sdN X-Received: by 10.66.138.74 with SMTP id qo10mr32019753pab.135.1472475131063; Mon, 29 Aug 2016 05:52:11 -0700 (PDT) Received: from localhost.localdomain ([45.56.152.36]) by smtp.gmail.com with ESMTPSA id y2sm49389920pan.31.2016.08.29.05.52.06 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 29 Aug 2016 05:52:10 -0700 (PDT) From: Baoyou Xie To: isdn@linux-pingi.de Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, arnd@arndb.de, baoyou.xie@linaro.org, xie.baoyou@zte.com.cn Subject: [PATCH v2] mISDN: mark symbols static where possible Date: Mon, 29 Aug 2016 20:50:42 +0800 Message-Id: <1472475042-30072-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 12 warnings when build kernel with W=1: drivers/isdn/hardware/mISDN/hfcmulti.c:568:1: warning: no previous declaration for 'enablepcibridge' [-Wmissing-declarations] drivers/isdn/hardware/mISDN/hfcmulti.c:574:1: warning: no previous declaration for 'disablepcibridge' [-Wmissing-declarations] drivers/isdn/hardware/mISDN/hfcmulti.c:580:1: warning: no previous declaration for 'readpcibridge' [-Wmissing-declarations] drivers/isdn/hardware/mISDN/hfcmulti.c:608:1: warning: no previous declaration for 'writepcibridge' [-Wmissing-declarations] drivers/isdn/hardware/mISDN/hfcmulti.c:638:1: warning: no previous declaration for 'cpld_set_reg' [-Wmissing-declarations] drivers/isdn/hardware/mISDN/hfcmulti.c:645:1: warning: no previous declaration for 'cpld_write_reg' [-Wmissing-declarations] drivers/isdn/hardware/mISDN/hfcmulti.c:657:1: warning: no previous declaration for 'cpld_read_reg' [-Wmissing-declarations] drivers/isdn/hardware/mISDN/hfcmulti.c:674:1: warning: no previous declaration for 'vpm_write_address' [-Wmissing-declarations] drivers/isdn/hardware/mISDN/hfcmulti.c:681:1: warning: no previous declaration for 'vpm_read_address' [-Wmissing-declarations] drivers/isdn/hardware/mISDN/hfcmulti.c:695:1: warning: no previous declaration for 'vpm_in' [-Wmissing-declarations] drivers/isdn/hardware/mISDN/hfcmulti.c:716:1: warning: no previous declaration for 'vpm_out' [-Wmissing-declarations] drivers/isdn/hardware/mISDN/hfcmulti.c:1028:1: warning: no previous declaration for 'plxsd_checksync' [-Wmissing-declarations] 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/isdn/hardware/mISDN/hfcmulti.c | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) -- 2.7.4 diff --git a/drivers/isdn/hardware/mISDN/hfcmulti.c b/drivers/isdn/hardware/mISDN/hfcmulti.c index 28543d7..480c2d7 100644 --- a/drivers/isdn/hardware/mISDN/hfcmulti.c +++ b/drivers/isdn/hardware/mISDN/hfcmulti.c @@ -564,19 +564,19 @@ disable_hwirq(struct hfc_multi *hc) #define MAX_TDM_CHAN 32 -inline void +static inline void enablepcibridge(struct hfc_multi *c) { HFC_outb(c, R_BRG_PCM_CFG, (0x0 << 6) | 0x3); /* was _io before */ } -inline void +static inline void disablepcibridge(struct hfc_multi *c) { HFC_outb(c, R_BRG_PCM_CFG, (0x0 << 6) | 0x2); /* was _io before */ } -inline unsigned char +static inline unsigned char readpcibridge(struct hfc_multi *hc, unsigned char address) { unsigned short cipv; @@ -604,7 +604,7 @@ readpcibridge(struct hfc_multi *hc, unsigned char address) return data; } -inline void +static inline void writepcibridge(struct hfc_multi *hc, unsigned char address, unsigned char data) { unsigned short cipv; @@ -634,14 +634,14 @@ writepcibridge(struct hfc_multi *hc, unsigned char address, unsigned char data) outl(datav, hc->pci_iobase); } -inline void +static inline void cpld_set_reg(struct hfc_multi *hc, unsigned char reg) { /* Do data pin read low byte */ HFC_outb(hc, R_GPIO_OUT1, reg); } -inline void +static inline void cpld_write_reg(struct hfc_multi *hc, unsigned char reg, unsigned char val) { cpld_set_reg(hc, reg); @@ -653,7 +653,7 @@ cpld_write_reg(struct hfc_multi *hc, unsigned char reg, unsigned char val) return; } -inline unsigned char +static inline unsigned char cpld_read_reg(struct hfc_multi *hc, unsigned char reg) { unsigned char bytein; @@ -670,14 +670,14 @@ cpld_read_reg(struct hfc_multi *hc, unsigned char reg) return bytein; } -inline void +static inline void vpm_write_address(struct hfc_multi *hc, unsigned short addr) { cpld_write_reg(hc, 0, 0xff & addr); cpld_write_reg(hc, 1, 0x01 & (addr >> 8)); } -inline unsigned short +static inline unsigned short vpm_read_address(struct hfc_multi *c) { unsigned short addr; @@ -691,7 +691,7 @@ vpm_read_address(struct hfc_multi *c) return addr & 0x1ff; } -inline unsigned char +static inline unsigned char vpm_in(struct hfc_multi *c, int which, unsigned short addr) { unsigned char res; @@ -712,7 +712,7 @@ vpm_in(struct hfc_multi *c, int which, unsigned short addr) return res; } -inline void +static inline void vpm_out(struct hfc_multi *c, int which, unsigned short addr, unsigned char data) { @@ -1024,7 +1024,7 @@ hfcmulti_resync(struct hfc_multi *locked, struct hfc_multi *newmaster, int rm) } /* This must be called AND hc must be locked irqsave!!! */ -inline void +static inline void plxsd_checksync(struct hfc_multi *hc, int rm) { if (hc->syncronized) {