
13 Sep
2012
13 Sep
'12
9:01 p.m.
On Thu, 13 Sep 2012 10:26:31 -0700 Tom Rini trini@ti.com wrote:
} else {
if (debug_level > 0)
serial_printf("ERROR : %s %d"
" no space "
"in rcv "
"buffer\n",
__func__,
ep);
}
that's pretty bad.
strings are allowed to exceed the 80 column limit, for grep purposes.
also, if the conditional logic is reversed, one can regain some of that horizontal space, i.e.:
if (!(peri_rxcsr & MUSB_RXCSR_RXPKTRDY)) { if (debug_level > 0) serial_printf("ERROR : %s %d with nothing to do\n", __PRETTY_FUNCTION__, ep); return; } peri_rxcount = readw(&musbr->ep[ep].epN.rxcount); if (!peri_rxcount) if (debug_level > 0) { serial_printf("ERROR : %s %d problem with endpoint\n", __PRETTY_FUNCTION__, ep); serial_printf("ERROR : %s %d with nothing to do\n", __func__, ep); return; }
...and so on.
Kim