From patchwork Sun Sep 4 06:52:21 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Baoyou Xie X-Patchwork-Id: 75347 Delivered-To: patch@linaro.org Received: by 10.140.29.8 with SMTP id a8csp1671313qga; Sun, 4 Sep 2016 00:00:08 -0700 (PDT) X-Received: by 10.98.106.65 with SMTP id f62mr51656776pfc.107.1472972407969; Sun, 04 Sep 2016 00:00:07 -0700 (PDT) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id rc13si21809682pac.262.2016.09.04.00.00.07 for ; Sun, 04 Sep 2016 00:00:07 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-scsi-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org; spf=pass (google.com: best guess record for domain of linux-scsi-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-scsi-owner@vger.kernel.org; dmarc=fail (p=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751495AbcIDHAH (ORCPT ); Sun, 4 Sep 2016 03:00:07 -0400 Received: from mail-pf0-f173.google.com ([209.85.192.173]:35485 "EHLO mail-pf0-f173.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750770AbcIDHAG (ORCPT ); Sun, 4 Sep 2016 03:00:06 -0400 Received: by mail-pf0-f173.google.com with SMTP id x72so55197585pfd.2 for ; Sat, 03 Sep 2016 23:59:32 -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=XvCrDUfUe9xu1QQXq/Wo5lgzOYHgzm8SuBzZ6WgeUFA=; b=JZ//hwePd11TVYQoOfLfhrY7JnrDjcwTs9HQe5Hl69OhtgZ26H8tnW6DmNbsu4UB0l eQCTVr0ux10seDiYsdLVx9bHJ2RuoXCFX4jsKbpbGJVJ3j2NPXsfmd0quFsjCv4Ox0AB gzPidqr8A++uJNBhygcDYWFFhJSwjnCB87P8I= 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=XvCrDUfUe9xu1QQXq/Wo5lgzOYHgzm8SuBzZ6WgeUFA=; b=F/dfInli+sjf4PMuZpCgEUl0TatFoqQu0cs0KHCJZlrqG+4sBRILCyVP0rehZ7NHsr Jt7Yz5zlIG5mQmVBt8ISsmk1e/RkrIoPYl9urWeHvuXgmu2RSGSWb7pGtegu2L1psP+e PgrZxgldxfxM4JQ5cFOGJng7PeLA/WpKecOgf/wnIQqNLXR2UuCeuRZjQNclHZqnNhCG dMuqHx3J0+z4nMBlmDyfvL3Hp7lW0FwBSbbriM1eGKJ2fZkv9Nv72GauoJEFuULlJzkm u8RrRh+gniItXbpcK+zXWQd0Gb0W3tfX1YzD6bDLYu+nou8oIFfU0+daAx6dFPPqir+Y mhNQ== X-Gm-Message-State: AE9vXwNo33TKYs7fXS6gBKxsqiUDtJF/VJ71o/xv9EsEPsEyX7nPCHqZnC+8IpWk6vCuBvRm X-Received: by 10.98.157.140 with SMTP id a12mr17589338pfk.75.1472971961190; Sat, 03 Sep 2016 23:52:41 -0700 (PDT) Received: from localhost.localdomain ([104.237.91.154]) by smtp.gmail.com with ESMTPSA id ah5sm25501627pad.30.2016.09.03.23.52.35 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sat, 03 Sep 2016 23:52:40 -0700 (PDT) From: Baoyou Xie To: QLogic-Storage-Upstream@qlogic.com, jejb@linux.vnet.ibm.com, martin.petersen@oracle.com Cc: linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org, arnd@arndb.de, baoyou.xie@linaro.org, xie.baoyou@zte.com.cn Subject: [PATCH] [SCSI] bnx2fc: mark symbols static where possible Date: Sun, 4 Sep 2016 14:52:21 +0800 Message-Id: <1472971941-4882-1-git-send-email-baoyou.xie@linaro.org> X-Mailer: git-send-email 2.7.4 Sender: linux-scsi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org We get a few warnings when building kernel with W=1: drivers/scsi/bnx2fc/bnx2fc_els.c:257:6: warning: no previous prototype for 'bnx2fc_srr_compl' [-Wmissing-prototypes] drivers/scsi/bnx2fc/bnx2fc_els.c:367:6: warning: no previous prototype for 'bnx2fc_rec_compl' [-Wmissing-prototypes] drivers/scsi/bnx2fc/bnx2fc_fcoe.c:628:5: warning: no previous prototype for 'bnx2fc_percpu_io_thread' [-Wmissing-prototypes] drivers/scsi/bnx2fc/bnx2fc_fcoe.c:1413:26: warning: no previous prototype for 'bnx2fc_interface_create' [-Wmissing-prototypes] drivers/scsi/bnx2fc/bnx2fc_hwi.c:997:21: warning: no previous prototype for 'bnx2fc_alloc_work' [-Wmissing-prototypes] drivers/scsi/bnx2fc/bnx2fc_io.c:1082:5: warning: no previous prototype for 'bnx2fc_abts_cleanup' [-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/scsi/bnx2fc/bnx2fc_els.c | 4 ++-- drivers/scsi/bnx2fc/bnx2fc_fcoe.c | 9 +++++---- drivers/scsi/bnx2fc/bnx2fc_hwi.c | 2 +- drivers/scsi/bnx2fc/bnx2fc_io.c | 2 +- 4 files changed, 9 insertions(+), 8 deletions(-) -- 2.7.4 -- To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Acked-by: Arnd Bergmann diff --git a/drivers/scsi/bnx2fc/bnx2fc_els.c b/drivers/scsi/bnx2fc/bnx2fc_els.c index 5beea77..68ca518 100644 --- a/drivers/scsi/bnx2fc/bnx2fc_els.c +++ b/drivers/scsi/bnx2fc/bnx2fc_els.c @@ -254,7 +254,7 @@ int bnx2fc_send_rls(struct bnx2fc_rport *tgt, struct fc_frame *fp) return rc; } -void bnx2fc_srr_compl(struct bnx2fc_els_cb_arg *cb_arg) +static void bnx2fc_srr_compl(struct bnx2fc_els_cb_arg *cb_arg) { struct bnx2fc_mp_req *mp_req; struct fc_frame_header *fc_hdr, *fh; @@ -364,7 +364,7 @@ srr_compl_done: kref_put(&orig_io_req->refcount, bnx2fc_cmd_release); } -void bnx2fc_rec_compl(struct bnx2fc_els_cb_arg *cb_arg) +static void bnx2fc_rec_compl(struct bnx2fc_els_cb_arg *cb_arg) { struct bnx2fc_cmd *orig_io_req, *new_io_req; struct bnx2fc_cmd *rec_req; diff --git a/drivers/scsi/bnx2fc/bnx2fc_fcoe.c b/drivers/scsi/bnx2fc/bnx2fc_fcoe.c index a5052dd..5eb38c7 100644 --- a/drivers/scsi/bnx2fc/bnx2fc_fcoe.c +++ b/drivers/scsi/bnx2fc/bnx2fc_fcoe.c @@ -625,7 +625,7 @@ static void bnx2fc_recv_frame(struct sk_buff *skb) * * @arg: ptr to bnx2fc_percpu_info structure */ -int bnx2fc_percpu_io_thread(void *arg) +static int bnx2fc_percpu_io_thread(void *arg) { struct bnx2fc_percpu_s *p = arg; struct bnx2fc_work *work, *tmp; @@ -1410,9 +1410,10 @@ bind_err: return NULL; } -struct bnx2fc_interface *bnx2fc_interface_create(struct bnx2fc_hba *hba, - struct net_device *netdev, - enum fip_state fip_mode) +static struct bnx2fc_interface * +bnx2fc_interface_create(struct bnx2fc_hba *hba, + struct net_device *netdev, + enum fip_state fip_mode) { struct fcoe_ctlr_device *ctlr_dev; struct bnx2fc_interface *interface; diff --git a/drivers/scsi/bnx2fc/bnx2fc_hwi.c b/drivers/scsi/bnx2fc/bnx2fc_hwi.c index 28c671b..5ff9f89 100644 --- a/drivers/scsi/bnx2fc/bnx2fc_hwi.c +++ b/drivers/scsi/bnx2fc/bnx2fc_hwi.c @@ -994,7 +994,7 @@ void bnx2fc_arm_cq(struct bnx2fc_rport *tgt) } -struct bnx2fc_work *bnx2fc_alloc_work(struct bnx2fc_rport *tgt, u16 wqe) +static struct bnx2fc_work *bnx2fc_alloc_work(struct bnx2fc_rport *tgt, u16 wqe) { struct bnx2fc_work *work; work = kzalloc(sizeof(struct bnx2fc_work), GFP_ATOMIC); diff --git a/drivers/scsi/bnx2fc/bnx2fc_io.c b/drivers/scsi/bnx2fc/bnx2fc_io.c index 8f24d60..f501095 100644 --- a/drivers/scsi/bnx2fc/bnx2fc_io.c +++ b/drivers/scsi/bnx2fc/bnx2fc_io.c @@ -1079,7 +1079,7 @@ int bnx2fc_eh_device_reset(struct scsi_cmnd *sc_cmd) return bnx2fc_initiate_tmf(sc_cmd, FCP_TMF_LUN_RESET); } -int bnx2fc_abts_cleanup(struct bnx2fc_cmd *io_req) +static int bnx2fc_abts_cleanup(struct bnx2fc_cmd *io_req) { struct bnx2fc_rport *tgt = io_req->tgt; int rc = SUCCESS;