From patchwork Mon Aug 29 11:49:15 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Baoyou Xie X-Patchwork-Id: 74899 Delivered-To: patch@linaro.org Received: by 10.140.29.52 with SMTP id a49csp1589188qga; Mon, 29 Aug 2016 04:50:33 -0700 (PDT) X-Received: by 10.66.251.65 with SMTP id zi1mr31850252pac.93.1472471432929; Mon, 29 Aug 2016 04:50:32 -0700 (PDT) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id wv6si38824030pab.263.2016.08.29.04.50.32; Mon, 29 Aug 2016 04:50:32 -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 S1757065AbcH2LuQ (ORCPT + 27 others); Mon, 29 Aug 2016 07:50:16 -0400 Received: from mail-pf0-f173.google.com ([209.85.192.173]:34531 "EHLO mail-pf0-f173.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932766AbcH2LuO (ORCPT ); Mon, 29 Aug 2016 07:50:14 -0400 Received: by mail-pf0-f173.google.com with SMTP id p64so51569863pfb.1 for ; Mon, 29 Aug 2016 04:49:45 -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=RT05if6hGoaAkxmjdfUJXloQCpMZ7SpEvpwSTxCuijc=; b=Qppbw+QSr43ACp8mw7YgUkzSmO8jUKsVu7QmickrvpSD43syLmF+ilZJmVtBiPfpEE ItMwQAdZ9sZYoJK2MGxCGEj3jIez5Rm8vDIvrv215W/KAKs1Tdnp5/v9VqMU+7wx12Zc z8McHoxaA4qB5r7bHB5GKfy7yV3ZGw+pFhTQU= 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=RT05if6hGoaAkxmjdfUJXloQCpMZ7SpEvpwSTxCuijc=; b=WwvKOJFHoPHDyvVFiEI7RqrVBQXKRi7PJbnp2YMmrSs+m70V1vicHlAd5zaLRO1Qv6 /dXLr8AD5UJWjjxg2rA2qX3vT9UMMsyS7WvaPCcCwNYniY36H+QsqKknlPqP7b7zwCca IxdjpfIXdk9bAiJgZYAdNRDA1GQ+Au5PGprjlHaJEEs4EcKTyYcmkIsI+tZfsaTSIgOA LQ7h6yfI8zNQKhtEZl0Vluf3KhwK+TMGlne9C8K58Nc/Fy9khTxm5ZyXTdVGPf1nneBw IvHub2Ouu/eGSQIl26js2n247rwmTu90d50EV/esSwyKoSyL3Ync2KeAYN+0wZKmUDoF b1Hw== X-Gm-Message-State: AE9vXwNBTOCHpts43pmQMyIUdvvoLw9vF18qOyOVNiZVZf8o464xbSpMjtzA67C82pZ3sa44 X-Received: by 10.98.111.133 with SMTP id k127mr31747100pfc.90.1472471385160; Mon, 29 Aug 2016 04:49:45 -0700 (PDT) Received: from localhost.localdomain ([45.56.152.36]) by smtp.gmail.com with ESMTPSA id w64sm48798942pfb.93.2016.08.29.04.49.40 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 29 Aug 2016 04:49:44 -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] mISDN: mark symbols static where possible Date: Mon, 29 Aug 2016 19:49:15 +0800 Message-Id: <1472471355-30191-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 biuld 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) {