Skip to content

Commit 2f2f40a

Browse files
Jing HuangJames Bottomley
authored andcommitted
[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>
1 parent d4b671c commit 2f2f40a

7 files changed

Lines changed: 0 additions & 74 deletions

File tree

‎drivers/scsi/bfa/Makefile‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,3 @@ bfa-y := bfad.o bfad_im.o bfad_attr.o bfad_debugfs.o
44
bfa-y += bfa_ioc.o bfa_ioc_cb.o bfa_ioc_ct.o bfa_hw_cb.o bfa_hw_ct.o
55
bfa-y += bfa_fcs.o bfa_fcs_lport.o bfa_fcs_rport.o bfa_fcs_fcpim.o bfa_fcbuild.o
66
bfa-y += bfa_port.o bfa_fcpim.o bfa_core.o bfa_svc.o
7-
8-
ccflags-y := -DBFA_PERF_BUILD

‎drivers/scsi/bfa/bfa_core.c‎

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -296,25 +296,17 @@ bfa_msix_rspq(struct bfa_s *bfa, int qid)
296296
u32 pi, ci;
297297
struct list_head *waitq;
298298

299-
bfa_trc_fp(bfa, qid);
300-
301299
qid &= (BFI_IOC_MAX_CQS - 1);
302300

303301
bfa->iocfc.hwif.hw_rspq_ack(bfa, qid);
304302

305303
ci = bfa_rspq_ci(bfa, qid);
306304
pi = bfa_rspq_pi(bfa, qid);
307305

308-
bfa_trc_fp(bfa, ci);
309-
bfa_trc_fp(bfa, pi);
310-
311306
if (bfa->rme_process) {
312307
while (ci != pi) {
313308
m = bfa_rspq_elem(bfa, qid, ci);
314-
bfa_assert_fp(m->mhdr.msg_class < BFI_MC_MAX);
315-
316309
bfa_isrs[m->mhdr.msg_class] (bfa, m);
317-
318310
CQ_INCR(ci, bfa->iocfc.cfg.drvcfg.num_rspq_elems);
319311
}
320312
}

‎drivers/scsi/bfa/bfa_cs.h‎

Lines changed: 0 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -107,13 +107,6 @@ bfa_trc_stop(struct bfa_trc_mod_s *trcm)
107107
trcm->stopped = 1;
108108
}
109109

110-
#ifdef FWTRC
111-
extern void dc_flush(void *data);
112-
#else
113-
#define dc_flush(data)
114-
#endif
115-
116-
117110
static inline void
118111
__bfa_trc(struct bfa_trc_mod_s *trcm, int fileno, int line, u64 data)
119112
{
@@ -127,12 +120,10 @@ __bfa_trc(struct bfa_trc_mod_s *trcm, int fileno, int line, u64 data)
127120
trc->line = (u16) line;
128121
trc->data.u64 = data;
129122
trc->timestamp = BFA_TRC_TS(trcm);
130-
dc_flush(trc);
131123

132124
trcm->tail = (trcm->tail + 1) & (BFA_TRC_MAX - 1);
133125
if (trcm->tail == trcm->head)
134126
trcm->head = (trcm->head + 1) & (BFA_TRC_MAX - 1);
135-
dc_flush(trcm);
136127
}
137128

138129

@@ -149,32 +140,18 @@ __bfa_trc32(struct bfa_trc_mod_s *trcm, int fileno, int line, u32 data)
149140
trc->line = (u16) line;
150141
trc->data.u32.u32 = data;
151142
trc->timestamp = BFA_TRC_TS(trcm);
152-
dc_flush(trc);
153143

154144
trcm->tail = (trcm->tail + 1) & (BFA_TRC_MAX - 1);
155145
if (trcm->tail == trcm->head)
156146
trcm->head = (trcm->head + 1) & (BFA_TRC_MAX - 1);
157-
dc_flush(trcm);
158147
}
159148

160-
#ifndef BFA_PERF_BUILD
161-
#define bfa_trc_fp(_trcp, _data) bfa_trc(_trcp, _data)
162-
#else
163-
#define bfa_trc_fp(_trcp, _data)
164-
#endif
165-
166149
#define bfa_sm_fault(__mod, __event) do { \
167150
bfa_trc(__mod, (((u32)0xDEAD << 16) | __event)); \
168151
printk(KERN_ERR "Assertion failure: %s:%d: %d", \
169152
__FILE__, __LINE__, (__event)); \
170153
} while (0)
171154

172-
#ifndef BFA_PERF_BUILD
173-
#define bfa_assert_fp(__cond) bfa_assert(__cond)
174-
#else
175-
#define bfa_assert_fp(__cond)
176-
#endif
177-
178155
/* BFA queue definitions */
179156
#define bfa_q_first(_q) ((void *)(((struct list_head *) (_q))->next))
180157
#define bfa_q_next(_qe) (((struct list_head *) (_qe))->next)
@@ -197,7 +174,6 @@ __bfa_trc32(struct bfa_trc_mod_s *trcm, int fileno, int line, u32 data)
197174
bfa_q_prev(bfa_q_next(*((struct list_head **) _qe))) = \
198175
(struct list_head *) (_q); \
199176
bfa_q_next(_q) = bfa_q_next(*((struct list_head **) _qe));\
200-
BFA_Q_DBG_INIT(*((struct list_head **) _qe)); \
201177
} else { \
202178
*((struct list_head **) (_qe)) = (struct list_head *) NULL;\
203179
} \
@@ -212,7 +188,6 @@ __bfa_trc32(struct bfa_trc_mod_s *trcm, int fileno, int line, u32 data)
212188
bfa_q_next(bfa_q_prev(*((struct list_head **) _qe))) = \
213189
(struct list_head *) (_q); \
214190
bfa_q_prev(_q) = bfa_q_prev(*(struct list_head **) _qe);\
215-
BFA_Q_DBG_INIT(*((struct list_head **) _qe)); \
216191
} else { \
217192
*((struct list_head **) (_qe)) = (struct list_head *) NULL;\
218193
} \
@@ -234,16 +209,6 @@ bfa_q_is_on_q_func(struct list_head *q, struct list_head *qe)
234209
return 0;
235210
}
236211

237-
/*
238-
* #ifdef BFA_DEBUG (Using bfa_assert to check for debug_build is not
239-
* consistent across modules)
240-
*/
241-
#ifndef BFA_PERF_BUILD
242-
#define BFA_Q_DBG_INIT(_qe) bfa_q_qe_init(_qe)
243-
#else
244-
#define BFA_Q_DBG_INIT(_qe)
245-
#endif
246-
247212
#define bfa_q_is_on_q(_q, _qe) \
248213
bfa_q_is_on_q_func(_q, (struct list_head *)(_qe))
249214

‎drivers/scsi/bfa/bfa_fcpim.c‎

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1367,9 +1367,6 @@ bfa_itnim_clear_stats(struct bfa_itnim_s *itnim)
13671367
static void
13681368
bfa_ioim_sm_uninit(struct bfa_ioim_s *ioim, enum bfa_ioim_event event)
13691369
{
1370-
bfa_trc_fp(ioim->bfa, ioim->iotag);
1371-
bfa_trc_fp(ioim->bfa, event);
1372-
13731370
switch (event) {
13741371
case BFA_IOIM_SM_START:
13751372
if (!bfa_itnim_is_online(ioim->itnim)) {
@@ -1479,9 +1476,6 @@ bfa_ioim_sm_sgalloc(struct bfa_ioim_s *ioim, enum bfa_ioim_event event)
14791476
static void
14801477
bfa_ioim_sm_active(struct bfa_ioim_s *ioim, enum bfa_ioim_event event)
14811478
{
1482-
bfa_trc_fp(ioim->bfa, ioim->iotag);
1483-
bfa_trc_fp(ioim->bfa, event);
1484-
14851479
switch (event) {
14861480
case BFA_IOIM_SM_COMP_GOOD:
14871481
bfa_sm_set_state(ioim, bfa_ioim_sm_hcb);
@@ -1563,9 +1557,6 @@ bfa_ioim_sm_active(struct bfa_ioim_s *ioim, enum bfa_ioim_event event)
15631557
static void
15641558
bfa_ioim_sm_cmnd_retry(struct bfa_ioim_s *ioim, enum bfa_ioim_event event)
15651559
{
1566-
bfa_trc_fp(ioim->bfa, ioim->iotag);
1567-
bfa_trc_fp(ioim->bfa, event);
1568-
15691560
switch (event) {
15701561
case BFA_IOIM_SM_FREE:
15711562
/* abts and rrq done. Now retry the IO with new tag */
@@ -1886,9 +1877,6 @@ bfa_ioim_sm_cleanup_qfull(struct bfa_ioim_s *ioim, enum bfa_ioim_event event)
18861877
static void
18871878
bfa_ioim_sm_hcb(struct bfa_ioim_s *ioim, enum bfa_ioim_event event)
18881879
{
1889-
bfa_trc_fp(ioim->bfa, ioim->iotag);
1890-
bfa_trc_fp(ioim->bfa, event);
1891-
18921880
switch (event) {
18931881
case BFA_IOIM_SM_HCB:
18941882
bfa_sm_set_state(ioim, bfa_ioim_sm_uninit);
@@ -2529,9 +2517,7 @@ bfa_ioim_good_comp_isr(struct bfa_s *bfa, struct bfi_msg_s *m)
25292517
ioim = BFA_IOIM_FROM_TAG(fcpim, iotag);
25302518
WARN_ON(BFA_IOIM_TAG_2_ID(ioim->iotag) != iotag);
25312519

2532-
bfa_trc_fp(ioim->bfa, ioim->iotag);
25332520
bfa_ioim_cb_profile_comp(fcpim, ioim);
2534-
25352521
bfa_sm_send_event(ioim, BFA_IOIM_SM_COMP_GOOD);
25362522
}
25372523

@@ -2608,7 +2594,6 @@ bfa_ioim_alloc(struct bfa_s *bfa, struct bfad_ioim_s *dio,
26082594
fcpim->ios_active++;
26092595

26102596
list_add_tail(&ioim->qe, &itnim->io_q);
2611-
bfa_trc_fp(ioim->bfa, ioim->iotag);
26122597

26132598
return ioim;
26142599
}
@@ -2618,12 +2603,6 @@ bfa_ioim_free(struct bfa_ioim_s *ioim)
26182603
{
26192604
struct bfa_fcpim_mod_s *fcpim = ioim->fcpim;
26202605

2621-
bfa_trc_fp(ioim->bfa, ioim->iotag);
2622-
bfa_assert_fp(bfa_sm_cmp_state(ioim, bfa_ioim_sm_uninit));
2623-
2624-
bfa_assert_fp(list_empty(&ioim->sgpg_q) ||
2625-
(ioim->nsges > BFI_SGE_INLINE));
2626-
26272606
if (ioim->nsgpgs > 0)
26282607
bfa_sgpg_mfree(ioim->bfa, &ioim->sgpg_q, ioim->nsgpgs);
26292608

@@ -2638,8 +2617,6 @@ bfa_ioim_free(struct bfa_ioim_s *ioim)
26382617
void
26392618
bfa_ioim_start(struct bfa_ioim_s *ioim)
26402619
{
2641-
bfa_trc_fp(ioim->bfa, ioim->iotag);
2642-
26432620
bfa_ioim_cb_profile_start(ioim->fcpim, ioim);
26442621

26452622
/*

‎drivers/scsi/bfa/bfa_svc.c‎

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4670,8 +4670,6 @@ bfa_sgpg_malloc(struct bfa_s *bfa, struct list_head *sgpg_q, int nsgpgs)
46704670
struct bfa_sgpg_s *hsgpg;
46714671
int i;
46724672

4673-
bfa_trc_fp(bfa, nsgpgs);
4674-
46754673
if (mod->free_sgpgs < nsgpgs)
46764674
return BFA_STATUS_ENOMEM;
46774675

@@ -4691,8 +4689,6 @@ bfa_sgpg_mfree(struct bfa_s *bfa, struct list_head *sgpg_q, int nsgpg)
46914689
struct bfa_sgpg_mod_s *mod = BFA_SGPG_MOD(bfa);
46924690
struct bfa_sgpg_wqe_s *wqe;
46934691

4694-
bfa_trc_fp(bfa, nsgpg);
4695-
46964692
mod->free_sgpgs += nsgpg;
46974693
WARN_ON(mod->free_sgpgs > mod->num_sgpgs);
46984694

‎drivers/scsi/bfa/bfad.c‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1166,7 +1166,6 @@ bfad_intx(int irq, void *dev_id)
11661166
spin_lock_irqsave(&bfad->bfad_lock, flags);
11671167
bfa_comp_free(&bfad->bfa, &doneq);
11681168
spin_unlock_irqrestore(&bfad->bfad_lock, flags);
1169-
bfa_trc_fp(bfad, irq);
11701169
}
11711170

11721171
return IRQ_HANDLED;

‎drivers/scsi/bfa/bfad_im.c‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1174,7 +1174,6 @@ bfad_im_queuecommand_lck(struct scsi_cmnd *cmnd, void (*done) (struct scsi_cmnd
11741174
}
11751175

11761176
cmnd->host_scribble = (char *)hal_io;
1177-
bfa_trc_fp(bfad, hal_io->iotag);
11781177
bfa_ioim_start(hal_io);
11791178
spin_unlock_irqrestore(&bfad->bfad_lock, flags);
11801179

0 commit comments

Comments
 (0)