Commit 79cefa55 authored by Daeseok Youn's avatar Daeseok Youn Committed by Greg Kroah-Hartman

staging: cxt1e1: remove redundant curly braces in musycc.c

Signed-off-by: default avatarDaeseok Youn <daeseok.youn@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent b7923d22
......@@ -73,6 +73,10 @@ musycc_dump_rxbuffer_ring(mch_t *ch, int lockit)
u_int32_t status;
int n;
#ifdef RLD_DUMP_BUFDATA
u_int32_t *dp;
int len = 0;
#endif
if (lockit)
spin_lock_irqsave(&ch->ch_rxlock, flags);
if (ch->rxd_num == 0)
......@@ -82,7 +86,6 @@ musycc_dump_rxbuffer_ring(mch_t *ch, int lockit)
m = &ch->mdr[ch->rxix_irq_srv];
for (n = ch->rxd_num; n; n--) {
status = le32_to_cpu(m->status);
{
pr_info("%c %08lx[%2d]: sts %08x (%c%c%c%c:%d.) Data [%08x] Next [%08x]\n",
(m == &ch->mdr[ch->rxix_irq_srv]) ? 'F' : ' ',
(unsigned long) m, n,
......@@ -94,9 +97,7 @@ musycc_dump_rxbuffer_ring(mch_t *ch, int lockit)
status & LENGTH_MASK,
le32_to_cpu(m->data), le32_to_cpu(m->next));
#ifdef RLD_DUMP_BUFDATA
{
u_int32_t *dp;
int len = status & LENGTH_MASK;
len = status & LENGTH_MASK;
#if 1
if (m->data && (status & HOST_RX_OWNED))
......@@ -115,12 +116,10 @@ musycc_dump_rxbuffer_ring(mch_t *ch, int lockit)
else
pr_info(" %x[%x]: %08X\n", (u_int32_t) dp, len, *dp);
}
}
#endif
}
m = m->snext;
}
} /* -for- */
}
pr_info("\n");
if (lockit)
......@@ -135,6 +134,10 @@ musycc_dump_txbuffer_ring(mch_t *ch, int lockit)
unsigned long flags = 0;
u_int32_t status;
int n;
#ifdef RLD_DUMP_BUFDATA
u_int32_t *dp;
int len = 0;
#endif
if (lockit)
spin_lock_irqsave(&ch->ch_txlock, flags);
......@@ -145,7 +148,6 @@ musycc_dump_txbuffer_ring(mch_t *ch, int lockit)
m = ch->txd_irq_srv;
for (n = ch->txd_num; n; n--) {
status = le32_to_cpu(m->status);
{
pr_info("%c%c %08lx[%2d]: sts %08x (%c%c%c%c:%d.) Data [%08x] Next [%08x]\n",
(m == ch->txd_usr_add) ? 'F' : ' ',
(m == ch->txd_irq_srv) ? 'L' : ' ',
......@@ -158,9 +160,7 @@ musycc_dump_txbuffer_ring(mch_t *ch, int lockit)
status & LENGTH_MASK,
le32_to_cpu(m->data), le32_to_cpu(m->next));
#ifdef RLD_DUMP_BUFDATA
{
u_int32_t *dp;
int len = status & LENGTH_MASK;
len = status & LENGTH_MASK;
if (m->data) {
dp = (u_int32_t *) OS_phystov((void *) (le32_to_cpu(m->data)));
......@@ -173,9 +173,7 @@ musycc_dump_txbuffer_ring(mch_t *ch, int lockit)
else
pr_info(" %x[%x]: %08X\n", (u_int32_t) dp, len, *dp);
}
}
#endif
}
m = m->snext;
}
} /* -for- */
......@@ -195,11 +193,10 @@ status_t
musycc_dump_ring(ci_t *ci, unsigned int chan)
{
mch_t *ch;
int bh;
if (chan >= MAX_CHANS_USED)
return SBE_DRVR_FAIL; /* E2BIG */
{
int bh;
bh = atomic_read(&ci->bh_pending);
pr_info(">> bh_pend %d [%d] ihead %d itail %d [%d] th_cnt %d bh_cnt %d wdcnt %d note %d\n",
......@@ -209,7 +206,6 @@ musycc_dump_ring(ci_t *ci, unsigned int chan)
ci->wdcount, ci->wd_notify);
max_bh = 0; /* reset counter */
max_intcnt = 0; /* reset counter */
}
ch = sd_find_chan(dummy, chan);
if (!ch) {
......@@ -336,6 +332,10 @@ musycc_wq_chan_restart(void *arg) /* channel private structure */
mpi_t *pi;
struct mdesc *md;
#if defined(RLD_TRANS_DEBUG) || defined(RLD_RXACT_DEBUG)
static int hereb4 = 7;
#endif
ch = container_of(arg, struct c4_chan_info, ch_work);
pi = ch->up;
......@@ -353,9 +353,6 @@ musycc_wq_chan_restart(void *arg) /* channel private structure */
ch->ch_start_rx = 0;
#if defined(RLD_TRANS_DEBUG) || defined(RLD_RXACT_DEBUG)
{
static int hereb4 = 7;
if (hereb4) { /* RLD DEBUG */
hereb4--;
#ifdef RLD_TRANS_DEBUG
......@@ -371,7 +368,6 @@ musycc_wq_chan_restart(void *arg) /* channel private structure */
musycc_dump_rxbuffer_ring(ch, 1); /* RLD DEBUG */
#endif
}
}
#endif
musycc_serv_req(pi, SR_CHANNEL_ACTIVATE | SR_RX_DIRECTION | ch->gchan);
}
......@@ -877,6 +873,9 @@ musycc_bh_tx_eom(mpi_t *pi, int gchan)
md->data = 0;
if (md->mem_token) {
#ifdef CONFIG_SBE_WAN256T3_NCOMM
int hdlcnum = 0;
#endif
/* upcount channel */
atomic_sub(OS_mem_token_tlen(md->mem_token), &ch->tx_pending);
/* upcount card */
......@@ -888,15 +887,13 @@ musycc_bh_tx_eom(mpi_t *pi, int gchan)
#ifdef CONFIG_SBE_WAN256T3_NCOMM
/* callback that our packet was sent */
{
int hdlcnum = (pi->portnum * 32 + gchan);
hdlcnum = (pi->portnum * 32 + gchan);
if (hdlcnum >= 228) {
if (nciProcess_TX_complete)
(*nciProcess_TX_complete) (hdlcnum,
getuserbychan(gchan));
}
}
#endif /*** CONFIG_SBE_WAN256T3_NCOMM ***/
OS_mem_token_free_irq(md->mem_token);
......@@ -1361,7 +1358,6 @@ musycc_intr_bh_tasklet(ci_t *ci)
*/
ch->ch_start_tx = CH_START_TX_ONR;
{
#ifdef RLD_TRANS_DEBUG
if (1 || cxt1e1_log_level >= LOG_MONITOR)
#else
......@@ -1381,7 +1377,6 @@ musycc_intr_bh_tasklet(ci_t *ci)
}
#endif
}
}
} else { /* RX buffer overrun */
/*
* Per MUSYCC manual, Section 6.4.8.4 [Receive Errors],
......
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