Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

[SCSI] bfa: remove inactive functions

This patch removes some inactive functions and macros.

Signed-off-by: Jing Huang <huangj@brocade.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>

authored by

Jing Huang and committed by
James Bottomley
2f2f40a4 d4b671c5

-74
-2
drivers/scsi/bfa/Makefile
··· 4 4 bfa-y += bfa_ioc.o bfa_ioc_cb.o bfa_ioc_ct.o bfa_hw_cb.o bfa_hw_ct.o 5 5 bfa-y += bfa_fcs.o bfa_fcs_lport.o bfa_fcs_rport.o bfa_fcs_fcpim.o bfa_fcbuild.o 6 6 bfa-y += bfa_port.o bfa_fcpim.o bfa_core.o bfa_svc.o 7 - 8 - ccflags-y := -DBFA_PERF_BUILD
-8
drivers/scsi/bfa/bfa_core.c
··· 296 296 u32 pi, ci; 297 297 struct list_head *waitq; 298 298 299 - bfa_trc_fp(bfa, qid); 300 - 301 299 qid &= (BFI_IOC_MAX_CQS - 1); 302 300 303 301 bfa->iocfc.hwif.hw_rspq_ack(bfa, qid); ··· 303 305 ci = bfa_rspq_ci(bfa, qid); 304 306 pi = bfa_rspq_pi(bfa, qid); 305 307 306 - bfa_trc_fp(bfa, ci); 307 - bfa_trc_fp(bfa, pi); 308 - 309 308 if (bfa->rme_process) { 310 309 while (ci != pi) { 311 310 m = bfa_rspq_elem(bfa, qid, ci); 312 - bfa_assert_fp(m->mhdr.msg_class < BFI_MC_MAX); 313 - 314 311 bfa_isrs[m->mhdr.msg_class] (bfa, m); 315 - 316 312 CQ_INCR(ci, bfa->iocfc.cfg.drvcfg.num_rspq_elems); 317 313 } 318 314 }
-35
drivers/scsi/bfa/bfa_cs.h
··· 107 107 trcm->stopped = 1; 108 108 } 109 109 110 - #ifdef FWTRC 111 - extern void dc_flush(void *data); 112 - #else 113 - #define dc_flush(data) 114 - #endif 115 - 116 - 117 110 static inline void 118 111 __bfa_trc(struct bfa_trc_mod_s *trcm, int fileno, int line, u64 data) 119 112 { ··· 120 127 trc->line = (u16) line; 121 128 trc->data.u64 = data; 122 129 trc->timestamp = BFA_TRC_TS(trcm); 123 - dc_flush(trc); 124 130 125 131 trcm->tail = (trcm->tail + 1) & (BFA_TRC_MAX - 1); 126 132 if (trcm->tail == trcm->head) 127 133 trcm->head = (trcm->head + 1) & (BFA_TRC_MAX - 1); 128 - dc_flush(trcm); 129 134 } 130 135 131 136 ··· 140 149 trc->line = (u16) line; 141 150 trc->data.u32.u32 = data; 142 151 trc->timestamp = BFA_TRC_TS(trcm); 143 - dc_flush(trc); 144 152 145 153 trcm->tail = (trcm->tail + 1) & (BFA_TRC_MAX - 1); 146 154 if (trcm->tail == trcm->head) 147 155 trcm->head = (trcm->head + 1) & (BFA_TRC_MAX - 1); 148 - dc_flush(trcm); 149 156 } 150 - 151 - #ifndef BFA_PERF_BUILD 152 - #define bfa_trc_fp(_trcp, _data) bfa_trc(_trcp, _data) 153 - #else 154 - #define bfa_trc_fp(_trcp, _data) 155 - #endif 156 157 157 158 #define bfa_sm_fault(__mod, __event) do { \ 158 159 bfa_trc(__mod, (((u32)0xDEAD << 16) | __event)); \ 159 160 printk(KERN_ERR "Assertion failure: %s:%d: %d", \ 160 161 __FILE__, __LINE__, (__event)); \ 161 162 } while (0) 162 - 163 - #ifndef BFA_PERF_BUILD 164 - #define bfa_assert_fp(__cond) bfa_assert(__cond) 165 - #else 166 - #define bfa_assert_fp(__cond) 167 - #endif 168 163 169 164 /* BFA queue definitions */ 170 165 #define bfa_q_first(_q) ((void *)(((struct list_head *) (_q))->next)) ··· 174 197 bfa_q_prev(bfa_q_next(*((struct list_head **) _qe))) = \ 175 198 (struct list_head *) (_q); \ 176 199 bfa_q_next(_q) = bfa_q_next(*((struct list_head **) _qe));\ 177 - BFA_Q_DBG_INIT(*((struct list_head **) _qe)); \ 178 200 } else { \ 179 201 *((struct list_head **) (_qe)) = (struct list_head *) NULL;\ 180 202 } \ ··· 188 212 bfa_q_next(bfa_q_prev(*((struct list_head **) _qe))) = \ 189 213 (struct list_head *) (_q); \ 190 214 bfa_q_prev(_q) = bfa_q_prev(*(struct list_head **) _qe);\ 191 - BFA_Q_DBG_INIT(*((struct list_head **) _qe)); \ 192 215 } else { \ 193 216 *((struct list_head **) (_qe)) = (struct list_head *) NULL;\ 194 217 } \ ··· 208 233 } 209 234 return 0; 210 235 } 211 - 212 - /* 213 - * #ifdef BFA_DEBUG (Using bfa_assert to check for debug_build is not 214 - * consistent across modules) 215 - */ 216 - #ifndef BFA_PERF_BUILD 217 - #define BFA_Q_DBG_INIT(_qe) bfa_q_qe_init(_qe) 218 - #else 219 - #define BFA_Q_DBG_INIT(_qe) 220 - #endif 221 236 222 237 #define bfa_q_is_on_q(_q, _qe) \ 223 238 bfa_q_is_on_q_func(_q, (struct list_head *)(_qe))
-23
drivers/scsi/bfa/bfa_fcpim.c
··· 1367 1367 static void 1368 1368 bfa_ioim_sm_uninit(struct bfa_ioim_s *ioim, enum bfa_ioim_event event) 1369 1369 { 1370 - bfa_trc_fp(ioim->bfa, ioim->iotag); 1371 - bfa_trc_fp(ioim->bfa, event); 1372 - 1373 1370 switch (event) { 1374 1371 case BFA_IOIM_SM_START: 1375 1372 if (!bfa_itnim_is_online(ioim->itnim)) { ··· 1476 1479 static void 1477 1480 bfa_ioim_sm_active(struct bfa_ioim_s *ioim, enum bfa_ioim_event event) 1478 1481 { 1479 - bfa_trc_fp(ioim->bfa, ioim->iotag); 1480 - bfa_trc_fp(ioim->bfa, event); 1481 - 1482 1482 switch (event) { 1483 1483 case BFA_IOIM_SM_COMP_GOOD: 1484 1484 bfa_sm_set_state(ioim, bfa_ioim_sm_hcb); ··· 1557 1563 static void 1558 1564 bfa_ioim_sm_cmnd_retry(struct bfa_ioim_s *ioim, enum bfa_ioim_event event) 1559 1565 { 1560 - bfa_trc_fp(ioim->bfa, ioim->iotag); 1561 - bfa_trc_fp(ioim->bfa, event); 1562 - 1563 1566 switch (event) { 1564 1567 case BFA_IOIM_SM_FREE: 1565 1568 /* abts and rrq done. Now retry the IO with new tag */ ··· 1877 1886 static void 1878 1887 bfa_ioim_sm_hcb(struct bfa_ioim_s *ioim, enum bfa_ioim_event event) 1879 1888 { 1880 - bfa_trc_fp(ioim->bfa, ioim->iotag); 1881 - bfa_trc_fp(ioim->bfa, event); 1882 - 1883 1889 switch (event) { 1884 1890 case BFA_IOIM_SM_HCB: 1885 1891 bfa_sm_set_state(ioim, bfa_ioim_sm_uninit); ··· 2517 2529 ioim = BFA_IOIM_FROM_TAG(fcpim, iotag); 2518 2530 WARN_ON(BFA_IOIM_TAG_2_ID(ioim->iotag) != iotag); 2519 2531 2520 - bfa_trc_fp(ioim->bfa, ioim->iotag); 2521 2532 bfa_ioim_cb_profile_comp(fcpim, ioim); 2522 - 2523 2533 bfa_sm_send_event(ioim, BFA_IOIM_SM_COMP_GOOD); 2524 2534 } 2525 2535 ··· 2594 2608 fcpim->ios_active++; 2595 2609 2596 2610 list_add_tail(&ioim->qe, &itnim->io_q); 2597 - bfa_trc_fp(ioim->bfa, ioim->iotag); 2598 2611 2599 2612 return ioim; 2600 2613 } ··· 2602 2617 bfa_ioim_free(struct bfa_ioim_s *ioim) 2603 2618 { 2604 2619 struct bfa_fcpim_mod_s *fcpim = ioim->fcpim; 2605 - 2606 - bfa_trc_fp(ioim->bfa, ioim->iotag); 2607 - bfa_assert_fp(bfa_sm_cmp_state(ioim, bfa_ioim_sm_uninit)); 2608 - 2609 - bfa_assert_fp(list_empty(&ioim->sgpg_q) || 2610 - (ioim->nsges > BFI_SGE_INLINE)); 2611 2620 2612 2621 if (ioim->nsgpgs > 0) 2613 2622 bfa_sgpg_mfree(ioim->bfa, &ioim->sgpg_q, ioim->nsgpgs); ··· 2617 2638 void 2618 2639 bfa_ioim_start(struct bfa_ioim_s *ioim) 2619 2640 { 2620 - bfa_trc_fp(ioim->bfa, ioim->iotag); 2621 - 2622 2641 bfa_ioim_cb_profile_start(ioim->fcpim, ioim); 2623 2642 2624 2643 /*
-4
drivers/scsi/bfa/bfa_svc.c
··· 4670 4670 struct bfa_sgpg_s *hsgpg; 4671 4671 int i; 4672 4672 4673 - bfa_trc_fp(bfa, nsgpgs); 4674 - 4675 4673 if (mod->free_sgpgs < nsgpgs) 4676 4674 return BFA_STATUS_ENOMEM; 4677 4675 ··· 4688 4690 { 4689 4691 struct bfa_sgpg_mod_s *mod = BFA_SGPG_MOD(bfa); 4690 4692 struct bfa_sgpg_wqe_s *wqe; 4691 - 4692 - bfa_trc_fp(bfa, nsgpg); 4693 4693 4694 4694 mod->free_sgpgs += nsgpg; 4695 4695 WARN_ON(mod->free_sgpgs > mod->num_sgpgs);
-1
drivers/scsi/bfa/bfad.c
··· 1166 1166 spin_lock_irqsave(&bfad->bfad_lock, flags); 1167 1167 bfa_comp_free(&bfad->bfa, &doneq); 1168 1168 spin_unlock_irqrestore(&bfad->bfad_lock, flags); 1169 - bfa_trc_fp(bfad, irq); 1170 1169 } 1171 1170 1172 1171 return IRQ_HANDLED;
-1
drivers/scsi/bfa/bfad_im.c
··· 1174 1174 } 1175 1175 1176 1176 cmnd->host_scribble = (char *)hal_io; 1177 - bfa_trc_fp(bfad, hal_io->iotag); 1178 1177 bfa_ioim_start(hal_io); 1179 1178 spin_unlock_irqrestore(&bfad->bfad_lock, flags); 1180 1179