aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi
diff options
context:
space:
mode:
authorBart Van Assche <bvanassche@acm.org>2012-01-13 20:26:20 -0500
committerJames Bottomley <JBottomley@Parallels.com>2012-01-16 03:45:48 -0500
commitc6b21c93c1794113c68f3d43f321968191d87b1b (patch)
tree011ea47b03dc2628b1b210ab198e08343d3612a1 /drivers/scsi
parenta762dce41cb5742a143f6aa2d80ee1aac7e1f5eb (diff)
[SCSI] libfc: Declare local functions static
Avoid that sparse complains about missing declarations for local functions by declaring these static or by adding an #include directive. Add the __percpu annotation where it is missing. Signed-off-by: Bart Van Assche <bvanassche@acm.org> Reviewed-by: Yi Zou <yi.zou@intel.com> Signed-off-by: Robert Love <robert.w.love@intel.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
Diffstat (limited to 'drivers/scsi')
-rw-r--r--drivers/scsi/libfc/fc_disc.c6
-rw-r--r--drivers/scsi/libfc/fc_elsct.c1
-rw-r--r--drivers/scsi/libfc/fc_exch.c2
-rw-r--r--drivers/scsi/libfc/fc_lport.c5
-rw-r--r--drivers/scsi/libfc/fc_rport.c10
5 files changed, 13 insertions, 11 deletions
diff --git a/drivers/scsi/libfc/fc_disc.c b/drivers/scsi/libfc/fc_disc.c
index 7269e928824a..1d1b0c9da29b 100644
--- a/drivers/scsi/libfc/fc_disc.c
+++ b/drivers/scsi/libfc/fc_disc.c
@@ -61,7 +61,7 @@ static void fc_disc_restart(struct fc_disc *);
61 * Locking Note: This function expects that the lport mutex is locked before 61 * Locking Note: This function expects that the lport mutex is locked before
62 * calling it. 62 * calling it.
63 */ 63 */
64void fc_disc_stop_rports(struct fc_disc *disc) 64static void fc_disc_stop_rports(struct fc_disc *disc)
65{ 65{
66 struct fc_lport *lport; 66 struct fc_lport *lport;
67 struct fc_rport_priv *rdata; 67 struct fc_rport_priv *rdata;
@@ -682,7 +682,7 @@ static int fc_disc_single(struct fc_lport *lport, struct fc_disc_port *dp)
682 * fc_disc_stop() - Stop discovery for a given lport 682 * fc_disc_stop() - Stop discovery for a given lport
683 * @lport: The local port that discovery should stop on 683 * @lport: The local port that discovery should stop on
684 */ 684 */
685void fc_disc_stop(struct fc_lport *lport) 685static void fc_disc_stop(struct fc_lport *lport)
686{ 686{
687 struct fc_disc *disc = &lport->disc; 687 struct fc_disc *disc = &lport->disc;
688 688
@@ -698,7 +698,7 @@ void fc_disc_stop(struct fc_lport *lport)
698 * This function will block until discovery has been 698 * This function will block until discovery has been
699 * completely stopped and all rports have been deleted. 699 * completely stopped and all rports have been deleted.
700 */ 700 */
701void fc_disc_stop_final(struct fc_lport *lport) 701static void fc_disc_stop_final(struct fc_lport *lport)
702{ 702{
703 fc_disc_stop(lport); 703 fc_disc_stop(lport);
704 lport->tt.rport_flush_queue(); 704 lport->tt.rport_flush_queue();
diff --git a/drivers/scsi/libfc/fc_elsct.c b/drivers/scsi/libfc/fc_elsct.c
index fb9161dc4ca6..e17a28d324d0 100644
--- a/drivers/scsi/libfc/fc_elsct.c
+++ b/drivers/scsi/libfc/fc_elsct.c
@@ -28,6 +28,7 @@
28#include <scsi/fc/fc_els.h> 28#include <scsi/fc/fc_els.h>
29#include <scsi/libfc.h> 29#include <scsi/libfc.h>
30#include <scsi/fc_encode.h> 30#include <scsi/fc_encode.h>
31#include "fc_libfc.h"
31 32
32/** 33/**
33 * fc_elsct_send() - Send an ELS or CT frame 34 * fc_elsct_send() - Send an ELS or CT frame
diff --git a/drivers/scsi/libfc/fc_exch.c b/drivers/scsi/libfc/fc_exch.c
index 9de9db27e874..4d70d96fa5dc 100644
--- a/drivers/scsi/libfc/fc_exch.c
+++ b/drivers/scsi/libfc/fc_exch.c
@@ -91,7 +91,7 @@ struct fc_exch_pool {
91 * It manages the allocation of exchange IDs. 91 * It manages the allocation of exchange IDs.
92 */ 92 */
93struct fc_exch_mgr { 93struct fc_exch_mgr {
94 struct fc_exch_pool *pool; 94 struct fc_exch_pool __percpu *pool;
95 mempool_t *ep_pool; 95 mempool_t *ep_pool;
96 enum fc_class class; 96 enum fc_class class;
97 struct kref kref; 97 struct kref kref;
diff --git a/drivers/scsi/libfc/fc_lport.c b/drivers/scsi/libfc/fc_lport.c
index e77094a587ed..83750ebb527f 100644
--- a/drivers/scsi/libfc/fc_lport.c
+++ b/drivers/scsi/libfc/fc_lport.c
@@ -677,7 +677,8 @@ EXPORT_SYMBOL(fc_set_mfs);
677 * @lport: The local port receiving the event 677 * @lport: The local port receiving the event
678 * @event: The discovery event 678 * @event: The discovery event
679 */ 679 */
680void fc_lport_disc_callback(struct fc_lport *lport, enum fc_disc_event event) 680static void fc_lport_disc_callback(struct fc_lport *lport,
681 enum fc_disc_event event)
681{ 682{
682 switch (event) { 683 switch (event) {
683 case DISC_EV_SUCCESS: 684 case DISC_EV_SUCCESS:
@@ -1568,7 +1569,7 @@ EXPORT_SYMBOL(fc_lport_flogi_resp);
1568 * Locking Note: The lport lock is expected to be held before calling 1569 * Locking Note: The lport lock is expected to be held before calling
1569 * this routine. 1570 * this routine.
1570 */ 1571 */
1571void fc_lport_enter_flogi(struct fc_lport *lport) 1572static void fc_lport_enter_flogi(struct fc_lport *lport)
1572{ 1573{
1573 struct fc_frame *fp; 1574 struct fc_frame *fp;
1574 1575
diff --git a/drivers/scsi/libfc/fc_rport.c b/drivers/scsi/libfc/fc_rport.c
index b9e434844a69..83aa1efec875 100644
--- a/drivers/scsi/libfc/fc_rport.c
+++ b/drivers/scsi/libfc/fc_rport.c
@@ -391,7 +391,7 @@ static void fc_rport_work(struct work_struct *work)
391 * If it appears we are already logged in, ADISC is used to verify 391 * If it appears we are already logged in, ADISC is used to verify
392 * the setup. 392 * the setup.
393 */ 393 */
394int fc_rport_login(struct fc_rport_priv *rdata) 394static int fc_rport_login(struct fc_rport_priv *rdata)
395{ 395{
396 mutex_lock(&rdata->rp_mutex); 396 mutex_lock(&rdata->rp_mutex);
397 397
@@ -451,7 +451,7 @@ static void fc_rport_enter_delete(struct fc_rport_priv *rdata,
451 * function will hold the rport lock, call an _enter_* 451 * function will hold the rport lock, call an _enter_*
452 * function and then unlock the rport. 452 * function and then unlock the rport.
453 */ 453 */
454int fc_rport_logoff(struct fc_rport_priv *rdata) 454static int fc_rport_logoff(struct fc_rport_priv *rdata)
455{ 455{
456 mutex_lock(&rdata->rp_mutex); 456 mutex_lock(&rdata->rp_mutex);
457 457
@@ -653,8 +653,8 @@ static int fc_rport_login_complete(struct fc_rport_priv *rdata,
653 * @fp: The FLOGI response frame 653 * @fp: The FLOGI response frame
654 * @rp_arg: The remote port that received the FLOGI response 654 * @rp_arg: The remote port that received the FLOGI response
655 */ 655 */
656void fc_rport_flogi_resp(struct fc_seq *sp, struct fc_frame *fp, 656static void fc_rport_flogi_resp(struct fc_seq *sp, struct fc_frame *fp,
657 void *rp_arg) 657 void *rp_arg)
658{ 658{
659 struct fc_rport_priv *rdata = rp_arg; 659 struct fc_rport_priv *rdata = rp_arg;
660 struct fc_lport *lport = rdata->local_port; 660 struct fc_lport *lport = rdata->local_port;
@@ -1520,7 +1520,7 @@ reject:
1520 * 1520 *
1521 * Locking Note: Called with the lport lock held. 1521 * Locking Note: Called with the lport lock held.
1522 */ 1522 */
1523void fc_rport_recv_req(struct fc_lport *lport, struct fc_frame *fp) 1523static void fc_rport_recv_req(struct fc_lport *lport, struct fc_frame *fp)
1524{ 1524{
1525 struct fc_seq_els_data els_data; 1525 struct fc_seq_els_data els_data;
1526 1526