aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBaoyou Xie <baoyou.xie@linaro.org>2016-09-04 02:52:21 -0400
committerMartin K. Petersen <martin.petersen@oracle.com>2016-09-09 07:11:07 -0400
commit3f7d67da2f3a2770a817d87c25c7cb9f0c09a671 (patch)
treedd2e0247284d8586cb7ddbbe0269d5f825daf020
parenta44199eee7fdd2791b39da88938e6de6f5058632 (diff)
scsi: bnx2fc: Mark symbols static where possible
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 <baoyou.xie@linaro.org> Acked-by: Arnd Bergmann <arnd@arndb.de> Acked-by: Chad Dupuis <chad.dupuis@qlogic.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
-rw-r--r--drivers/scsi/bnx2fc/bnx2fc_els.c4
-rw-r--r--drivers/scsi/bnx2fc/bnx2fc_fcoe.c9
-rw-r--r--drivers/scsi/bnx2fc/bnx2fc_hwi.c2
-rw-r--r--drivers/scsi/bnx2fc/bnx2fc_io.c2
4 files changed, 9 insertions, 8 deletions
diff --git a/drivers/scsi/bnx2fc/bnx2fc_els.c b/drivers/scsi/bnx2fc/bnx2fc_els.c
index 5beea776b9f5..68ca518d34b0 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)
254 return rc; 254 return rc;
255} 255}
256 256
257void bnx2fc_srr_compl(struct bnx2fc_els_cb_arg *cb_arg) 257static void bnx2fc_srr_compl(struct bnx2fc_els_cb_arg *cb_arg)
258{ 258{
259 struct bnx2fc_mp_req *mp_req; 259 struct bnx2fc_mp_req *mp_req;
260 struct fc_frame_header *fc_hdr, *fh; 260 struct fc_frame_header *fc_hdr, *fh;
@@ -364,7 +364,7 @@ srr_compl_done:
364 kref_put(&orig_io_req->refcount, bnx2fc_cmd_release); 364 kref_put(&orig_io_req->refcount, bnx2fc_cmd_release);
365} 365}
366 366
367void bnx2fc_rec_compl(struct bnx2fc_els_cb_arg *cb_arg) 367static void bnx2fc_rec_compl(struct bnx2fc_els_cb_arg *cb_arg)
368{ 368{
369 struct bnx2fc_cmd *orig_io_req, *new_io_req; 369 struct bnx2fc_cmd *orig_io_req, *new_io_req;
370 struct bnx2fc_cmd *rec_req; 370 struct bnx2fc_cmd *rec_req;
diff --git a/drivers/scsi/bnx2fc/bnx2fc_fcoe.c b/drivers/scsi/bnx2fc/bnx2fc_fcoe.c
index 88be12a02764..f9ddb6156f14 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)
625 * 625 *
626 * @arg: ptr to bnx2fc_percpu_info structure 626 * @arg: ptr to bnx2fc_percpu_info structure
627 */ 627 */
628int bnx2fc_percpu_io_thread(void *arg) 628static int bnx2fc_percpu_io_thread(void *arg)
629{ 629{
630 struct bnx2fc_percpu_s *p = arg; 630 struct bnx2fc_percpu_s *p = arg;
631 struct bnx2fc_work *work, *tmp; 631 struct bnx2fc_work *work, *tmp;
@@ -1410,9 +1410,10 @@ bind_err:
1410 return NULL; 1410 return NULL;
1411} 1411}
1412 1412
1413struct bnx2fc_interface *bnx2fc_interface_create(struct bnx2fc_hba *hba, 1413static struct bnx2fc_interface *
1414 struct net_device *netdev, 1414bnx2fc_interface_create(struct bnx2fc_hba *hba,
1415 enum fip_state fip_mode) 1415 struct net_device *netdev,
1416 enum fip_state fip_mode)
1416{ 1417{
1417 struct fcoe_ctlr_device *ctlr_dev; 1418 struct fcoe_ctlr_device *ctlr_dev;
1418 struct bnx2fc_interface *interface; 1419 struct bnx2fc_interface *interface;
diff --git a/drivers/scsi/bnx2fc/bnx2fc_hwi.c b/drivers/scsi/bnx2fc/bnx2fc_hwi.c
index 28c671b609b2..5ff9f89c17c7 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)
994 994
995} 995}
996 996
997struct bnx2fc_work *bnx2fc_alloc_work(struct bnx2fc_rport *tgt, u16 wqe) 997static struct bnx2fc_work *bnx2fc_alloc_work(struct bnx2fc_rport *tgt, u16 wqe)
998{ 998{
999 struct bnx2fc_work *work; 999 struct bnx2fc_work *work;
1000 work = kzalloc(sizeof(struct bnx2fc_work), GFP_ATOMIC); 1000 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 8f24d60f09d7..f501095f91ac 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)
1079 return bnx2fc_initiate_tmf(sc_cmd, FCP_TMF_LUN_RESET); 1079 return bnx2fc_initiate_tmf(sc_cmd, FCP_TMF_LUN_RESET);
1080} 1080}
1081 1081
1082int bnx2fc_abts_cleanup(struct bnx2fc_cmd *io_req) 1082static int bnx2fc_abts_cleanup(struct bnx2fc_cmd *io_req)
1083{ 1083{
1084 struct bnx2fc_rport *tgt = io_req->tgt; 1084 struct bnx2fc_rport *tgt = io_req->tgt;
1085 int rc = SUCCESS; 1085 int rc = SUCCESS;