From patchwork Sun Sep 18 09:18:23 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Baoyou Xie X-Patchwork-Id: 76456 Delivered-To: patch@linaro.org Received: by 10.140.106.72 with SMTP id d66csp454117qgf; Sun, 18 Sep 2016 02:18:47 -0700 (PDT) X-Received: by 10.98.204.207 with SMTP id j76mr10938699pfk.6.1474190327788; Sun, 18 Sep 2016 02:18:47 -0700 (PDT) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d1si21852551pas.279.2016.09.18.02.18.47; Sun, 18 Sep 2016 02:18:47 -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 S1755918AbcIRJSo (ORCPT + 27 others); Sun, 18 Sep 2016 05:18:44 -0400 Received: from mail-pa0-f48.google.com ([209.85.220.48]:35570 "EHLO mail-pa0-f48.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753976AbcIRJSh (ORCPT ); Sun, 18 Sep 2016 05:18:37 -0400 Received: by mail-pa0-f48.google.com with SMTP id oz2so34489023pac.2 for ; Sun, 18 Sep 2016 02:18:37 -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=9+swbGS3EJEhoC2dgZ/w20Q0oTOIKODiLvFM9VT16as=; b=h+ERr8wfplpzn7ecVy5kR1yNgDBUt9MbZg5hoJ571cUOnj/tFYsD+K8NIBGQKbXqjA pJniz1+eJYNbKZOSJZuHZQckPRrwOn1vKmLesJDVleBBcjrgZyeVKNTyiHhTwyTcKujO gKILuD30Xc5tekGKPYW6M4lLuOxFluEDmu9Ys= 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=9+swbGS3EJEhoC2dgZ/w20Q0oTOIKODiLvFM9VT16as=; b=WAVbnOJCH63QjkBlCMcbjhu487TsZHr4fCwBLr2xk5EcmCyK69R/xQOS5Tm+XLSIse CT1sGb+EWRvyB4fhKkdYUAOkMV8Wdl07Vct0hOw2B8r2Uc+oMdpO94R/akRQvYU+2HY/ /D98Cs/DENV0RGiLg9pP4nTTyNytqEfOhRACB8njfUdN7ZNEURLe/tJ43JVWFWb/82g4 b7IfVwH+j/HXK0TnskThAT1P6V4khkiiQSr43QW+PvB7T2CG7JSIZ0kS3pPpO/k+/sAJ FkJqvxMRfhQL9E/gs+SNnZjVgWlAK4tYY9kOC0Z6sJ9Ovq7aJrwKr/KG/HrQ7+urIfbo HXGw== X-Gm-Message-State: AE9vXwMknv7t7r7EdVx8O4/e97qAbyfoGpcVGQI10mWHy5g9Vcq4GcM/1FRJ/vvzujbGhVY6 X-Received: by 10.66.22.70 with SMTP id b6mr15532978paf.94.1474190316845; Sun, 18 Sep 2016 02:18:36 -0700 (PDT) Received: from localhost.localdomain ([104.237.91.27]) by smtp.gmail.com with ESMTPSA id tw2sm23373892pac.41.2016.09.18.02.18.33 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sun, 18 Sep 2016 02:18:36 -0700 (PDT) From: Baoyou Xie To: hariprasad@chelsio.com Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, arnd@arndb.de, baoyou.xie@linaro.org, xie.baoyou@zte.com.cn Subject: [PATCH] cxgb4: mark symbols static where possible Date: Sun, 18 Sep 2016 17:18:23 +0800 Message-Id: <1474190303-14976-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 a few warnings when building kernel with W=1: drivers/net/ethernet/chelsio/cxgb4/cxgb4_uld.c:178:5: warning: no previous prototype for 'setup_sge_queues_uld' [-Wmissing-prototypes] drivers/net/ethernet/chelsio/cxgb4/cxgb4_uld.c:205:6: warning: no previous prototype for 'free_sge_queues_uld' [-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/net/ethernet/chelsio/cxgb4/cxgb4_uld.c | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) -- 2.7.4 diff --git a/drivers/net/ethernet/chelsio/cxgb4/cxgb4_uld.c b/drivers/net/ethernet/chelsio/cxgb4/cxgb4_uld.c index 5d402ba..fb40ddb 100644 --- a/drivers/net/ethernet/chelsio/cxgb4/cxgb4_uld.c +++ b/drivers/net/ethernet/chelsio/cxgb4/cxgb4_uld.c @@ -175,7 +175,8 @@ freeout: return err; } -int setup_sge_queues_uld(struct adapter *adap, unsigned int uld_type, bool lro) +static int +setup_sge_queues_uld(struct adapter *adap, unsigned int uld_type, bool lro) { struct sge_uld_rxq_info *rxq_info = adap->sge.uld_rxq_info[uld_type]; @@ -202,7 +203,7 @@ static void t4_free_uld_rxqs(struct adapter *adap, int n, } } -void free_sge_queues_uld(struct adapter *adap, unsigned int uld_type) +static void free_sge_queues_uld(struct adapter *adap, unsigned int uld_type) { struct sge_uld_rxq_info *rxq_info = adap->sge.uld_rxq_info[uld_type]; @@ -214,8 +215,8 @@ void free_sge_queues_uld(struct adapter *adap, unsigned int uld_type) kfree(rxq_info->msix_tbl); } -int cfg_queues_uld(struct adapter *adap, unsigned int uld_type, - const struct cxgb4_pci_uld_info *uld_info) +static int cfg_queues_uld(struct adapter *adap, unsigned int uld_type, + const struct cxgb4_pci_uld_info *uld_info) { struct sge *s = &adap->sge; struct sge_uld_rxq_info *rxq_info; @@ -273,7 +274,7 @@ int cfg_queues_uld(struct adapter *adap, unsigned int uld_type, return 0; } -void free_queues_uld(struct adapter *adap, unsigned int uld_type) +static void free_queues_uld(struct adapter *adap, unsigned int uld_type) { struct sge_uld_rxq_info *rxq_info = adap->sge.uld_rxq_info[uld_type]; @@ -282,7 +283,8 @@ void free_queues_uld(struct adapter *adap, unsigned int uld_type) kfree(rxq_info); } -int request_msix_queue_irqs_uld(struct adapter *adap, unsigned int uld_type) +static int +request_msix_queue_irqs_uld(struct adapter *adap, unsigned int uld_type) { struct sge_uld_rxq_info *rxq_info = adap->sge.uld_rxq_info[uld_type]; int idx, bmap_idx, err = 0; @@ -307,7 +309,8 @@ unwind: return err; } -void free_msix_queue_irqs_uld(struct adapter *adap, unsigned int uld_type) +static void +free_msix_queue_irqs_uld(struct adapter *adap, unsigned int uld_type) { struct sge_uld_rxq_info *rxq_info = adap->sge.uld_rxq_info[uld_type]; int idx; @@ -321,7 +324,7 @@ void free_msix_queue_irqs_uld(struct adapter *adap, unsigned int uld_type) } } -void name_msix_vecs_uld(struct adapter *adap, unsigned int uld_type) +static void name_msix_vecs_uld(struct adapter *adap, unsigned int uld_type) { struct sge_uld_rxq_info *rxq_info = adap->sge.uld_rxq_info[uld_type]; int n = sizeof(adap->msix_info_ulds[0].desc); @@ -361,7 +364,7 @@ static void quiesce_rx(struct adapter *adap, struct sge_rspq *q) } } -void enable_rx_uld(struct adapter *adap, unsigned int uld_type) +static void enable_rx_uld(struct adapter *adap, unsigned int uld_type) { struct sge_uld_rxq_info *rxq_info = adap->sge.uld_rxq_info[uld_type]; int idx; @@ -370,7 +373,7 @@ void enable_rx_uld(struct adapter *adap, unsigned int uld_type) enable_rx(adap, &rxq_info->uldrxq[idx].rspq); } -void quiesce_rx_uld(struct adapter *adap, unsigned int uld_type) +static void quiesce_rx_uld(struct adapter *adap, unsigned int uld_type) { struct sge_uld_rxq_info *rxq_info = adap->sge.uld_rxq_info[uld_type]; int idx;