From patchwork Sun Sep 18 08:35:29 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Baoyou Xie X-Patchwork-Id: 76449 Delivered-To: patch@linaro.org Received: by 10.140.106.72 with SMTP id d66csp443859qgf; Sun, 18 Sep 2016 01:35:51 -0700 (PDT) X-Received: by 10.98.61.27 with SMTP id k27mr36745268pfa.27.1474187751814; Sun, 18 Sep 2016 01:35:51 -0700 (PDT) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id r63si34392392pfi.132.2016.09.18.01.35.51; Sun, 18 Sep 2016 01:35:51 -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 S1755580AbcIRIft (ORCPT + 27 others); Sun, 18 Sep 2016 04:35:49 -0400 Received: from mail-pf0-f177.google.com ([209.85.192.177]:36080 "EHLO mail-pf0-f177.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754093AbcIRIfj (ORCPT ); Sun, 18 Sep 2016 04:35:39 -0400 Received: by mail-pf0-f177.google.com with SMTP id q2so20636008pfj.3 for ; Sun, 18 Sep 2016 01:35:39 -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=4McCZ5tMQctP77ozuTjYG9e4P2Izf+trZf0zi650vAU=; b=Ym3su3k0MOPkzl9H+13tfK/mvwWLbMZbyLyHtxQLS7Yff8kF7QpfjFuIC0fHQXd8NG sdMh5VWjMFvx0kDHIhxbgyNjuWb0auor7BJKH3Y8EUxhJHEwiYVqQmTdz3DdPOnf1h2E hP28BL1RAHAcyl+3ubl2FYzwi6wdVNlyR/Kz8= 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=4McCZ5tMQctP77ozuTjYG9e4P2Izf+trZf0zi650vAU=; b=Vq3qoQTKM4z7QlTuRqrZBsYQi92CoqWNpHaFWQv9W9aC0wK43z7mEkiuPHGndQaKf5 0Y+8jKSIdm4rtzHEfcXukceqEC110YkR6OI/UhUfohfBpadZyyxGRJOq5giHR1DQThJm btgGaTLStiHeW2PsTujvP3Exf1wHXAyZIFfnZ/3rMdXUm4ImWwPRZN20P+e/1oA0RluE zfaCwxbNXGShYPqkdF29ktn2VXmDVOrbEfdRQNKCynr6zTigAQZaMSx8GTn2cXfJL/6b 9Cr7PlO+2EdQjMTW4bweFdGssTuwiM+L+GP/FhlQWhztmVvZnyZ4nIEgifkoI3/5iSRJ X1Wg== X-Gm-Message-State: AE9vXwM7pd2DxgfS/HFTQ71CQiTjIfFZYXvxOoq8gsVZ0zXGx4XomT888991s2KMRxHiyzbh X-Received: by 10.98.156.81 with SMTP id f78mr4370056pfe.139.1474187738830; Sun, 18 Sep 2016 01:35:38 -0700 (PDT) Received: from localhost.localdomain ([104.237.91.27]) by smtp.gmail.com with ESMTPSA id d4sm10677040paz.20.2016.09.18.01.35.35 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sun, 18 Sep 2016 01:35:38 -0700 (PDT) From: Baoyou Xie To: sathya.perla@broadcom.com, ajit.khaparde@broadcom.com, sriharsha.basavapatna@broadcom.com, somnath.kotur@broadcom.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] be2net: mark symbols static where possible Date: Sun, 18 Sep 2016 16:35:29 +0800 Message-Id: <1474187729-25326-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/net/ethernet/emulex/benet/be_main.c:4368:6: warning: no previous prototype for 'be_calculate_pf_pool_rss_tables' [-Wmissing-prototypes] drivers/net/ethernet/emulex/benet/be_cmds.c:4385:5: warning: no previous prototype for 'be_get_nic_pf_num_list' [-Wmissing-prototypes] drivers/net/ethernet/emulex/benet/be_cmds.c:4537:6: warning: no previous prototype for 'be_reset_nic_desc' [-Wmissing-prototypes] drivers/net/ethernet/emulex/benet/be_cmds.c:4910:5: warning: no previous prototype for '__be_cmd_set_logical_link_config' [-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/emulex/benet/be_cmds.c | 9 +++++---- drivers/net/ethernet/emulex/benet/be_main.c | 2 +- 2 files changed, 6 insertions(+), 5 deletions(-) -- 2.7.4 diff --git a/drivers/net/ethernet/emulex/benet/be_cmds.c b/drivers/net/ethernet/emulex/benet/be_cmds.c index 15d02da..9cffe48 100644 --- a/drivers/net/ethernet/emulex/benet/be_cmds.c +++ b/drivers/net/ethernet/emulex/benet/be_cmds.c @@ -4382,7 +4382,7 @@ err: } /* This routine returns a list of all the NIC PF_nums in the adapter */ -u16 be_get_nic_pf_num_list(u8 *buf, u32 desc_count, u16 *nic_pf_nums) +static u16 be_get_nic_pf_num_list(u8 *buf, u32 desc_count, u16 *nic_pf_nums) { struct be_res_desc_hdr *hdr = (struct be_res_desc_hdr *)buf; struct be_pcie_res_desc *pcie = NULL; @@ -4534,7 +4534,7 @@ static int be_cmd_set_profile_config(struct be_adapter *adapter, void *desc, } /* Mark all fields invalid */ -void be_reset_nic_desc(struct be_nic_res_desc *nic) +static void be_reset_nic_desc(struct be_nic_res_desc *nic) { memset(nic, 0, sizeof(*nic)); nic->unicast_mac_count = 0xFFFF; @@ -4907,8 +4907,9 @@ err: return status; } -int __be_cmd_set_logical_link_config(struct be_adapter *adapter, - int link_state, int version, u8 domain) +static int +__be_cmd_set_logical_link_config(struct be_adapter *adapter, + int link_state, int version, u8 domain) { struct be_mcc_wrb *wrb; struct be_cmd_req_set_ll_link *req; diff --git a/drivers/net/ethernet/emulex/benet/be_main.c b/drivers/net/ethernet/emulex/benet/be_main.c index 34f63ef..9a94840 100644 --- a/drivers/net/ethernet/emulex/benet/be_main.c +++ b/drivers/net/ethernet/emulex/benet/be_main.c @@ -4365,7 +4365,7 @@ static void be_setup_init(struct be_adapter *adapter) * for distribution between the VFs. This self-imposed limit will determine the * no: of VFs for which RSS can be enabled. */ -void be_calculate_pf_pool_rss_tables(struct be_adapter *adapter) +static void be_calculate_pf_pool_rss_tables(struct be_adapter *adapter) { struct be_port_resources port_res = {0}; u8 rss_tables_on_port;