bfa: remove unused functions and misc cleanups
Subsystems (2)
PATCH 7/7 bfa: remove unused functions and misc cleanups
Remove unused functions and fix checkpatch errors. Misc cleanups in comment and formatting.
Signed-off-by Maggie Zhang <[email protected]>
Signed-off-by Jing Huang <[email protected]>
--- drivers/scsi/bfa/bfa_core.c | 2 +- drivers/scsi/bfa/bfa_fc.h | 2 +- drivers/scsi/bfa/bfa_fcbuild.c | 7 +- drivers/scsi/bfa/bfa_fcpim.c | 362 ++++++-------------------------------- drivers/scsi/bfa/bfa_fcpim.h | 158 ++++++----------- drivers/scsi/bfa/bfa_fcs_lport.c | 3 +- drivers/scsi/bfa/bfa_fcs_rport.c | 3 +- drivers/scsi/bfa/bfa_ioc.c | 18 +-- drivers/scsi/bfa/bfa_svc.c | 42 +---- drivers/scsi/bfa/bfad_debugfs.c | 8 +- 10 files changed, 129 insertions(+), 476 deletions(-)
drivers/scsi/bfa/bfa_core.c +1 -1
@@ -342,7 +342,7 @@ bfa_msix_lpu_err(struct bfa_s *bfa, int vec) intr =readl (bfa->iocfc.bfa_regs.intr_status);if (intr & (__HFN_INT_MBOX_LPU0 | __HFN_INT_MBOX_LPU1)) -bfa_ioc_mbox_isr (&bfa->ioc); +bfa_ioc_mbox_isr (&bfa->ioc); intr &= (__HFN_INT_ERR_EMC | __HFN_INT_ERR_LPU0 | __HFN_INT_ERR_LPU1 | __HFN_INT_ERR_PSS | __HFN_INT_LL_HALT);
drivers/scsi/bfa/bfa_fc.h +1 -1
@@ -1089,7 +1089,7 @@ struct fc_rpsc2_port_info_s {struct fc_rpsc2_acc_s {u8 els_cmd;u8 resvd; -__be16 num_pids;/* Number of pids in the request */ +__be16 num_pids;/* Number of pids in the request */ struct fc_rpsc2_port_info_s port_info[1 ];/* port information */ };
drivers/scsi/bfa/bfa_fcbuild.c +1 -6
@@ -456,7 +456,7 @@ fc_logo_build(struct fchs_s *fchs, struct fc_logo_s *logo, u32 d_id, u32 s_id,return sizeof (struct fc_logo_s ); } -static u16 +static u16 fc_adisc_x_build (struct fchs_s *fchs,struct fc_adisc_s *adisc,u32 d_id,u32 s_id,__be16 ox_id,wwn_t port_name,wwn_t node_name,u8 els_code)
@@ -807,11 +807,6 @@ fc_rpsc_acc_build(struct fchs_s *fchs, struct fc_rpsc_acc_s *rpsc_acc,return sizeof (struct fc_rpsc_acc_s ); } -/* -* TBD - -* . get rid of unnecessary memsets -*/ -u16 fc_logo_rsp_parse (struct fchs_s *fchs,int len) {
drivers/scsi/bfa/bfa_fcpim.c +57 -305
718 lines not on this page · raw message
drivers/scsi/bfa/bfa_fcpim.h +57 -101
271 lines not on this page · raw message
drivers/scsi/bfa/bfa_fcs_lport.c +2 -1
@@ -883,7 +883,8 @@ bfa_fcs_lport_get_attr(if (port->fabric) { port_attr->port_type = port->fabric->oper_type; - port_attr->loopback =bfa_sm_cmp_state (port->fabric, bfa_fcs_fabric_sm_loopback); + port_attr->loopback =bfa_sm_cmp_state (port->fabric, + bfa_fcs_fabric_sm_loopback); port_attr->authfail =bfa_sm_cmp_state (port->fabric, bfa_fcs_fabric_sm_auth_failed);
drivers/scsi/bfa/bfa_fcs_rport.c +2 -1
@@ -1974,7 +1974,8 @@ bfa_fcs_rport_alloc(struct bfa_fcs_lport_s *port, wwn_t pwwn, u32 rpid) rport->itnim =bfa_fcs_itnim_create (rport);if (!rport->itnim) {bfa_trc (fcs, rpid); -bfa_sm_send_event (rport->bfa_rport,BFA_RPORT_SM_DELETE ); +bfa_sm_send_event (rport->bfa_rport, +BFA_RPORT_SM_DELETE );kfree (rport_drv);return NULL ; }
drivers/scsi/bfa/bfa_ioc.c +1 -17
@@ -586,13 +586,10 @@ bfa_ioc_sm_fail(struct bfa_ioc_s *ioc, enum ioc_event event) } } - -/* * IOCPF State Machine */ -/* * Reset entry actions -- initialize state machine */
@@ -754,7 +751,6 @@ bfa_iocpf_sm_semwait(struct bfa_iocpf_s *iocpf, enum iocpf_event event) } } -static void bfa_iocpf_sm_hwinit_entry (struct bfa_iocpf_s *iocpf) {
@@ -811,7 +807,6 @@ bfa_iocpf_sm_hwinit(struct bfa_iocpf_s *iocpf, enum iocpf_event event) } } -static void bfa_iocpf_sm_enabling_entry (struct bfa_iocpf_s *iocpf) {
@@ -873,8 +868,6 @@ bfa_iocpf_sm_enabling(struct bfa_iocpf_s *iocpf, enum iocpf_event event) } } - -static void bfa_iocpf_sm_ready_entry (struct bfa_iocpf_s *iocpf) {
@@ -915,7 +908,6 @@ bfa_iocpf_sm_ready(struct bfa_iocpf_s *iocpf, enum iocpf_event event) } } -static void bfa_iocpf_sm_disabling_entry (struct bfa_iocpf_s *iocpf) {
@@ -965,7 +957,7 @@ bfa_iocpf_sm_disabling(struct bfa_iocpf_s *iocpf, enum iocpf_event event)static void bfa_iocpf_sm_disabled_entry (struct bfa_iocpf_s *iocpf) { -bfa_fsm_send_event (iocpf->ioc,IOC_E_DISABLED ); +bfa_fsm_send_event (iocpf->ioc,IOC_E_DISABLED ); } static void
@@ -990,7 +982,6 @@ bfa_iocpf_sm_disabled(struct bfa_iocpf_s *iocpf, enum iocpf_event event) } } -static void bfa_iocpf_sm_initfail_entry (struct bfa_iocpf_s *iocpf) {
@@ -1028,7 +1019,6 @@ bfa_iocpf_sm_initfail(struct bfa_iocpf_s *iocpf, enum iocpf_event event) } } -static void bfa_iocpf_sm_fail_entry (struct bfa_iocpf_s *iocpf) {
@@ -1078,8 +1068,6 @@ bfa_iocpf_sm_fail(struct bfa_iocpf_s *iocpf, enum iocpf_event event) } } - -/* * BFA IOC private functions */
@@ -1123,7 +1111,6 @@ bfa_ioc_sem_get(void __iomem *sem_reg)return BFA_FALSE ; } -static void bfa_ioc_hw_sem_get (struct bfa_ioc_s *ioc) {
@@ -1305,7 +1292,6 @@ bfa_ioc_msgflush(struct bfa_ioc_s *ioc)writel (1 , ioc->ioc_regs.lpu_mbox_cmd); } -static void bfa_ioc_hwinit (struct bfa_ioc_s *ioc,bfa_boolean_t force) {
@@ -1738,7 +1724,6 @@ bfa_ioc_smem_clr(struct bfa_ioc_s *ioc, u32 soff, u32 sz)return BFA_STATUS_OK ; } -static void bfa_ioc_pf_fwmismatch (struct bfa_ioc_s *ioc) {
@@ -1752,7 +1737,6 @@ bfa_ioc_pf_fwmismatch(struct bfa_ioc_s *ioc) "with the driver version\n"); } -bfa_status_t bfa_ioc_pll_init (struct bfa_ioc_s *ioc) {
drivers/scsi/bfa/bfa_svc.c +3 -39
108 lines not on this page · raw message
drivers/scsi/bfa/bfad_debugfs.c +4 -4
@@ -290,9 +290,9 @@ bfad_debugfs_write_regrd(struct file *file, const char __user *buf, }if (copy_from_user (kern_buf, (void __user *)buf, nbytes)) { -kfree (kern_buf); +kfree (kern_buf);return -ENOMEM ; - } + } rc =sscanf (kern_buf,"%x:%x" , &addr, &len);if (rc <2 ) {
@@ -366,9 +366,9 @@ bfad_debugfs_write_regwr(struct file *file, const char __user *buf, }if (copy_from_user (kern_buf, (void __user *)buf, nbytes)) { -kfree (kern_buf); +kfree (kern_buf);return -ENOMEM ; - } + } rc =sscanf (kern_buf,"%x:%x" , &addr, &val);if (rc <2 ) {
Signature · 1 line
1.7.2.1