Commit 311464ec authored by James Smart's avatar James Smart Committed by James Bottomley

[SCSI] lpfc 8.2.2 : Style cleanups

- Clean up all instances of mixed tab-space indentation
- Clean up sparse build errors
- Add appropriate static's
Signed-off-by: default avatarJames Smart <James.Smart@emulex.com>
Signed-off-by: default avatarJames Bottomley <James.Bottomley@SteelEye.com>
parent 51ef4c26
...@@ -430,7 +430,7 @@ lpfc_board_mode_store(struct class_device *cdev, const char *buf, size_t count) ...@@ -430,7 +430,7 @@ lpfc_board_mode_store(struct class_device *cdev, const char *buf, size_t count)
return -EIO; return -EIO;
} }
int static int
lpfc_get_hba_info(struct lpfc_hba *phba, lpfc_get_hba_info(struct lpfc_hba *phba,
uint32_t *mxri, uint32_t *axri, uint32_t *mxri, uint32_t *axri,
uint32_t *mrpi, uint32_t *arpi, uint32_t *mrpi, uint32_t *arpi,
......
...@@ -278,6 +278,7 @@ extern void lpfc_debugfs_disc_trc(struct lpfc_vport *, int, char *, uint32_t, ...@@ -278,6 +278,7 @@ extern void lpfc_debugfs_disc_trc(struct lpfc_vport *, int, char *, uint32_t,
uint32_t, uint32_t); uint32_t, uint32_t);
extern void lpfc_debugfs_slow_ring_trc(struct lpfc_hba *, char *, uint32_t, extern void lpfc_debugfs_slow_ring_trc(struct lpfc_hba *, char *, uint32_t,
uint32_t, uint32_t); uint32_t, uint32_t);
extern struct lpfc_hbq_init *lpfc_hbq_defs[];
/* Interface exported by fabric iocb scheduler */ /* Interface exported by fabric iocb scheduler */
int lpfc_issue_fabric_iocb(struct lpfc_hba *, struct lpfc_iocbq *); int lpfc_issue_fabric_iocb(struct lpfc_hba *, struct lpfc_iocbq *);
......
...@@ -688,7 +688,7 @@ out: ...@@ -688,7 +688,7 @@ out:
return; return;
} }
void static void
lpfc_cmpl_ct_cmd_gff_id(struct lpfc_hba *phba, struct lpfc_iocbq *cmdiocb, lpfc_cmpl_ct_cmd_gff_id(struct lpfc_hba *phba, struct lpfc_iocbq *cmdiocb,
struct lpfc_iocbq *rspiocb) struct lpfc_iocbq *rspiocb)
{ {
...@@ -885,7 +885,7 @@ lpfc_cmpl_ct_cmd_rff_id(struct lpfc_hba *phba, struct lpfc_iocbq *cmdiocb, ...@@ -885,7 +885,7 @@ lpfc_cmpl_ct_cmd_rff_id(struct lpfc_hba *phba, struct lpfc_iocbq *cmdiocb,
return; return;
} }
int static int
lpfc_vport_symbolic_port_name(struct lpfc_vport *vport, char *symbol, lpfc_vport_symbolic_port_name(struct lpfc_vport *vport, char *symbol,
size_t size) size_t size)
{ {
......
...@@ -112,10 +112,8 @@ struct lpfc_debug { ...@@ -112,10 +112,8 @@ struct lpfc_debug {
int len; int len;
}; };
extern struct lpfc_hbq_init *lpfc_hbq_defs[]; static atomic_t lpfc_debugfs_seq_trc_cnt = ATOMIC_INIT(0);
static unsigned long lpfc_debugfs_start_time = 0L;
atomic_t lpfc_debugfs_seq_trc_cnt = ATOMIC_INIT(0);
unsigned long lpfc_debugfs_start_time = 0L;
static int static int
lpfc_debugfs_disc_trc_data(struct lpfc_vport *vport, char *buf, int size) lpfc_debugfs_disc_trc_data(struct lpfc_vport *vport, char *buf, int size)
...@@ -201,7 +199,7 @@ lpfc_debugfs_slow_ring_trc_data(struct lpfc_hba *phba, char *buf, int size) ...@@ -201,7 +199,7 @@ lpfc_debugfs_slow_ring_trc_data(struct lpfc_hba *phba, char *buf, int size)
return len; return len;
} }
int lpfc_debugfs_last_hbq = -1; static int lpfc_debugfs_last_hbq = -1;
static int static int
lpfc_debugfs_hbqinfo_data(struct lpfc_hba *phba, char *buf, int size) lpfc_debugfs_hbqinfo_data(struct lpfc_hba *phba, char *buf, int size)
......
...@@ -349,7 +349,7 @@ lpfc_work_list_done(struct lpfc_hba *phba) ...@@ -349,7 +349,7 @@ lpfc_work_list_done(struct lpfc_hba *phba)
} }
void static void
lpfc_work_done(struct lpfc_hba *phba) lpfc_work_done(struct lpfc_hba *phba)
{ {
struct lpfc_sli_ring *pring; struct lpfc_sli_ring *pring;
...@@ -1591,7 +1591,7 @@ lpfc_nlp_state_name(char *buffer, size_t size, int state) ...@@ -1591,7 +1591,7 @@ lpfc_nlp_state_name(char *buffer, size_t size, int state)
[NLP_STE_NPR_NODE] = "NPR", [NLP_STE_NPR_NODE] = "NPR",
}; };
if (state < ARRAY_SIZE(states) && states[state]) if (state < NLP_STE_MAX_STATE && states[state])
strlcpy(buffer, states[state], size); strlcpy(buffer, states[state], size);
else else
snprintf(buffer, size, "unknown (%d)", state); snprintf(buffer, size, "unknown (%d)", state);
...@@ -2814,32 +2814,6 @@ lpfc_findnode_wwpn(struct lpfc_vport *vport, struct lpfc_name *wwpn) ...@@ -2814,32 +2814,6 @@ lpfc_findnode_wwpn(struct lpfc_vport *vport, struct lpfc_name *wwpn)
return ndlp; return ndlp;
} }
void
lpfc_dev_loss_delay(unsigned long ptr)
{
struct lpfc_nodelist *ndlp = (struct lpfc_nodelist *) ptr;
struct lpfc_vport *vport = ndlp->vport;
struct lpfc_hba *phba = vport->phba;
struct lpfc_work_evt *evtp = &ndlp->dev_loss_evt;
unsigned long flags;
evtp = &ndlp->dev_loss_evt;
spin_lock_irqsave(&phba->hbalock, flags);
if (!list_empty(&evtp->evt_listp)) {
spin_unlock_irqrestore(&phba->hbalock, flags);
return;
}
evtp->evt_arg1 = ndlp;
evtp->evt = LPFC_EVT_DEV_LOSS_DELAY;
list_add_tail(&evtp->evt_listp, &phba->work_list);
if (phba->work_wait)
lpfc_worker_wake_up(phba);
spin_unlock_irqrestore(&phba->hbalock, flags);
return;
}
void void
lpfc_nlp_init(struct lpfc_vport *vport, struct lpfc_nodelist *ndlp, lpfc_nlp_init(struct lpfc_vport *vport, struct lpfc_nodelist *ndlp,
uint32_t did) uint32_t did)
...@@ -2863,7 +2837,7 @@ lpfc_nlp_init(struct lpfc_vport *vport, struct lpfc_nodelist *ndlp, ...@@ -2863,7 +2837,7 @@ lpfc_nlp_init(struct lpfc_vport *vport, struct lpfc_nodelist *ndlp,
return; return;
} }
void static void
lpfc_nlp_release(struct kref *kref) lpfc_nlp_release(struct kref *kref)
{ {
struct lpfc_nodelist *ndlp = container_of(kref, struct lpfc_nodelist, struct lpfc_nodelist *ndlp = container_of(kref, struct lpfc_nodelist,
......
...@@ -53,10 +53,6 @@ static struct scsi_transport_template *lpfc_transport_template = NULL; ...@@ -53,10 +53,6 @@ static struct scsi_transport_template *lpfc_transport_template = NULL;
static struct scsi_transport_template *lpfc_vport_transport_template = NULL; static struct scsi_transport_template *lpfc_vport_transport_template = NULL;
static DEFINE_IDR(lpfc_hba_index); static DEFINE_IDR(lpfc_hba_index);
extern struct lpfc_hbq_init *lpfc_hbq_defs[];
/************************************************************************/ /************************************************************************/
/* */ /* */
/* lpfc_config_port_prep */ /* lpfc_config_port_prep */
......
...@@ -623,7 +623,7 @@ struct lpfc_hbq_init *lpfc_hbq_defs[] = { ...@@ -623,7 +623,7 @@ struct lpfc_hbq_init *lpfc_hbq_defs[] = {
&lpfc_extra_hbq, &lpfc_extra_hbq,
}; };
int static int
lpfc_sli_hbqbuf_fill_hbqs(struct lpfc_hba *phba, uint32_t hbqno, uint32_t count) lpfc_sli_hbqbuf_fill_hbqs(struct lpfc_hba *phba, uint32_t hbqno, uint32_t count)
{ {
uint32_t i, start, end; uint32_t i, start, end;
......
...@@ -331,7 +331,7 @@ error_out: ...@@ -331,7 +331,7 @@ error_out:
return rc; return rc;
} }
int static int
disable_vport(struct fc_vport *fc_vport) disable_vport(struct fc_vport *fc_vport)
{ {
struct lpfc_vport *vport = *(struct lpfc_vport **)fc_vport->dd_data; struct lpfc_vport *vport = *(struct lpfc_vport **)fc_vport->dd_data;
...@@ -376,7 +376,7 @@ disable_vport(struct fc_vport *fc_vport) ...@@ -376,7 +376,7 @@ disable_vport(struct fc_vport *fc_vport)
return VPORT_OK; return VPORT_OK;
} }
int static int
enable_vport(struct fc_vport *fc_vport) enable_vport(struct fc_vport *fc_vport)
{ {
struct lpfc_vport *vport = *(struct lpfc_vport **)fc_vport->dd_data; struct lpfc_vport *vport = *(struct lpfc_vport **)fc_vport->dd_data;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment