提交 c6b21c93 编写于 作者: B Bart Van Assche 提交者: James Bottomley

[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: NBart Van Assche <bvanassche@acm.org>
Reviewed-by: NYi Zou <yi.zou@intel.com>
Signed-off-by: NRobert Love <robert.w.love@intel.com>
Signed-off-by: NJames Bottomley <JBottomley@Parallels.com>
上级 a762dce4
...@@ -61,7 +61,7 @@ static void fc_disc_restart(struct fc_disc *); ...@@ -61,7 +61,7 @@ static void fc_disc_restart(struct fc_disc *);
* Locking Note: This function expects that the lport mutex is locked before * Locking Note: This function expects that the lport mutex is locked before
* calling it. * calling it.
*/ */
void fc_disc_stop_rports(struct fc_disc *disc) static void fc_disc_stop_rports(struct fc_disc *disc)
{ {
struct fc_lport *lport; struct fc_lport *lport;
struct fc_rport_priv *rdata; struct fc_rport_priv *rdata;
...@@ -682,7 +682,7 @@ static int fc_disc_single(struct fc_lport *lport, struct fc_disc_port *dp) ...@@ -682,7 +682,7 @@ static int fc_disc_single(struct fc_lport *lport, struct fc_disc_port *dp)
* fc_disc_stop() - Stop discovery for a given lport * fc_disc_stop() - Stop discovery for a given lport
* @lport: The local port that discovery should stop on * @lport: The local port that discovery should stop on
*/ */
void fc_disc_stop(struct fc_lport *lport) static void fc_disc_stop(struct fc_lport *lport)
{ {
struct fc_disc *disc = &lport->disc; struct fc_disc *disc = &lport->disc;
...@@ -698,7 +698,7 @@ void fc_disc_stop(struct fc_lport *lport) ...@@ -698,7 +698,7 @@ void fc_disc_stop(struct fc_lport *lport)
* This function will block until discovery has been * This function will block until discovery has been
* completely stopped and all rports have been deleted. * completely stopped and all rports have been deleted.
*/ */
void fc_disc_stop_final(struct fc_lport *lport) static void fc_disc_stop_final(struct fc_lport *lport)
{ {
fc_disc_stop(lport); fc_disc_stop(lport);
lport->tt.rport_flush_queue(); lport->tt.rport_flush_queue();
......
...@@ -28,6 +28,7 @@ ...@@ -28,6 +28,7 @@
#include <scsi/fc/fc_els.h> #include <scsi/fc/fc_els.h>
#include <scsi/libfc.h> #include <scsi/libfc.h>
#include <scsi/fc_encode.h> #include <scsi/fc_encode.h>
#include "fc_libfc.h"
/** /**
* fc_elsct_send() - Send an ELS or CT frame * fc_elsct_send() - Send an ELS or CT frame
......
...@@ -91,7 +91,7 @@ struct fc_exch_pool { ...@@ -91,7 +91,7 @@ struct fc_exch_pool {
* It manages the allocation of exchange IDs. * It manages the allocation of exchange IDs.
*/ */
struct fc_exch_mgr { struct fc_exch_mgr {
struct fc_exch_pool *pool; struct fc_exch_pool __percpu *pool;
mempool_t *ep_pool; mempool_t *ep_pool;
enum fc_class class; enum fc_class class;
struct kref kref; struct kref kref;
......
...@@ -677,7 +677,8 @@ EXPORT_SYMBOL(fc_set_mfs); ...@@ -677,7 +677,8 @@ EXPORT_SYMBOL(fc_set_mfs);
* @lport: The local port receiving the event * @lport: The local port receiving the event
* @event: The discovery event * @event: The discovery event
*/ */
void fc_lport_disc_callback(struct fc_lport *lport, enum fc_disc_event event) static void fc_lport_disc_callback(struct fc_lport *lport,
enum fc_disc_event event)
{ {
switch (event) { switch (event) {
case DISC_EV_SUCCESS: case DISC_EV_SUCCESS:
...@@ -1568,7 +1569,7 @@ EXPORT_SYMBOL(fc_lport_flogi_resp); ...@@ -1568,7 +1569,7 @@ EXPORT_SYMBOL(fc_lport_flogi_resp);
* Locking Note: The lport lock is expected to be held before calling * Locking Note: The lport lock is expected to be held before calling
* this routine. * this routine.
*/ */
void fc_lport_enter_flogi(struct fc_lport *lport) static void fc_lport_enter_flogi(struct fc_lport *lport)
{ {
struct fc_frame *fp; struct fc_frame *fp;
......
...@@ -391,7 +391,7 @@ static void fc_rport_work(struct work_struct *work) ...@@ -391,7 +391,7 @@ static void fc_rport_work(struct work_struct *work)
* If it appears we are already logged in, ADISC is used to verify * If it appears we are already logged in, ADISC is used to verify
* the setup. * the setup.
*/ */
int fc_rport_login(struct fc_rport_priv *rdata) static int fc_rport_login(struct fc_rport_priv *rdata)
{ {
mutex_lock(&rdata->rp_mutex); mutex_lock(&rdata->rp_mutex);
...@@ -451,7 +451,7 @@ static void fc_rport_enter_delete(struct fc_rport_priv *rdata, ...@@ -451,7 +451,7 @@ static void fc_rport_enter_delete(struct fc_rport_priv *rdata,
* function will hold the rport lock, call an _enter_* * function will hold the rport lock, call an _enter_*
* function and then unlock the rport. * function and then unlock the rport.
*/ */
int fc_rport_logoff(struct fc_rport_priv *rdata) static int fc_rport_logoff(struct fc_rport_priv *rdata)
{ {
mutex_lock(&rdata->rp_mutex); mutex_lock(&rdata->rp_mutex);
...@@ -653,8 +653,8 @@ static int fc_rport_login_complete(struct fc_rport_priv *rdata, ...@@ -653,8 +653,8 @@ static int fc_rport_login_complete(struct fc_rport_priv *rdata,
* @fp: The FLOGI response frame * @fp: The FLOGI response frame
* @rp_arg: The remote port that received the FLOGI response * @rp_arg: The remote port that received the FLOGI response
*/ */
void fc_rport_flogi_resp(struct fc_seq *sp, struct fc_frame *fp, static void fc_rport_flogi_resp(struct fc_seq *sp, struct fc_frame *fp,
void *rp_arg) void *rp_arg)
{ {
struct fc_rport_priv *rdata = rp_arg; struct fc_rport_priv *rdata = rp_arg;
struct fc_lport *lport = rdata->local_port; struct fc_lport *lport = rdata->local_port;
...@@ -1520,7 +1520,7 @@ static void fc_rport_recv_els_req(struct fc_lport *lport, struct fc_frame *fp) ...@@ -1520,7 +1520,7 @@ static void fc_rport_recv_els_req(struct fc_lport *lport, struct fc_frame *fp)
* *
* Locking Note: Called with the lport lock held. * Locking Note: Called with the lport lock held.
*/ */
void fc_rport_recv_req(struct fc_lport *lport, struct fc_frame *fp) static void fc_rport_recv_req(struct fc_lport *lport, struct fc_frame *fp)
{ {
struct fc_seq_els_data els_data; struct fc_seq_els_data els_data;
......
...@@ -857,7 +857,7 @@ struct fc_lport { ...@@ -857,7 +857,7 @@ struct fc_lport {
enum fc_lport_state state; enum fc_lport_state state;
unsigned long boot_time; unsigned long boot_time;
struct fc_host_statistics host_stats; struct fc_host_statistics host_stats;
struct fcoe_dev_stats *dev_stats; struct fcoe_dev_stats __percpu *dev_stats;
u8 retry_count; u8 retry_count;
/* Fabric information */ /* Fabric information */
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册