usb: host: ehci-dbg: add function output_buf_tds_dir()
This patch fixes a coding style issue reported by checkpatch related to too many leading tabs. This moves part of the fill_periodic_buffer() to the new function output_buf_tds_dir(). Because it's inline, the file size has not changed. Before: text data bss dec hex filename 36920 81 12 37013 9095 drivers/usb/host/ehci-hcd.o After: text data bss dec hex filename 36920 81 12 37013 9095 drivers/usb/host/ehci-hcd.o Signed-off-by: Geyslan G. Bem <geyslan@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
Родитель
cb27252176
Коммит
3fd29009f8
|
@ -652,6 +652,33 @@ static ssize_t fill_bandwidth_buffer(struct debug_buffer *buf)
|
||||||
return next - buf->output_buf;
|
return next - buf->output_buf;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static unsigned output_buf_tds_dir(char *buf, struct ehci_hcd *ehci,
|
||||||
|
struct ehci_qh_hw *hw, struct ehci_qh *qh, unsigned size)
|
||||||
|
{
|
||||||
|
u32 scratch = hc32_to_cpup(ehci, &hw->hw_info1);
|
||||||
|
struct ehci_qtd *qtd;
|
||||||
|
char *type = "";
|
||||||
|
unsigned temp = 0;
|
||||||
|
|
||||||
|
/* count tds, get ep direction */
|
||||||
|
list_for_each_entry(qtd, &qh->qtd_list, qtd_list) {
|
||||||
|
temp++;
|
||||||
|
switch ((hc32_to_cpu(ehci, qtd->hw_token) >> 8) & 0x03) {
|
||||||
|
case 0:
|
||||||
|
type = "out";
|
||||||
|
continue;
|
||||||
|
case 1:
|
||||||
|
type = "in";
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return scnprintf(buf, size, " (%c%d ep%d%s [%d/%d] q%d p%d)",
|
||||||
|
speed_char(scratch), scratch & 0x007f,
|
||||||
|
(scratch >> 8) & 0x000f, type, qh->ps.usecs,
|
||||||
|
qh->ps.c_usecs, temp, 0x7ff & (scratch >> 16));
|
||||||
|
}
|
||||||
|
|
||||||
#define DBG_SCHED_LIMIT 64
|
#define DBG_SCHED_LIMIT 64
|
||||||
static ssize_t fill_periodic_buffer(struct debug_buffer *buf)
|
static ssize_t fill_periodic_buffer(struct debug_buffer *buf)
|
||||||
{
|
{
|
||||||
|
@ -722,39 +749,8 @@ static ssize_t fill_periodic_buffer(struct debug_buffer *buf)
|
||||||
}
|
}
|
||||||
/* show more info the first time around */
|
/* show more info the first time around */
|
||||||
if (temp == seen_count) {
|
if (temp == seen_count) {
|
||||||
u32 scratch = hc32_to_cpup(ehci,
|
temp = output_buf_tds_dir(next, ehci,
|
||||||
&hw->hw_info1);
|
hw, p.qh, size);
|
||||||
struct ehci_qtd *qtd;
|
|
||||||
char *type = "";
|
|
||||||
|
|
||||||
/* count tds, get ep direction */
|
|
||||||
temp = 0;
|
|
||||||
list_for_each_entry(qtd,
|
|
||||||
&p.qh->qtd_list,
|
|
||||||
qtd_list) {
|
|
||||||
temp++;
|
|
||||||
switch ((hc32_to_cpu(ehci,
|
|
||||||
qtd->hw_token) >> 8)
|
|
||||||
& 0x03) {
|
|
||||||
case 0:
|
|
||||||
type = "out";
|
|
||||||
continue;
|
|
||||||
case 1:
|
|
||||||
type = "in";
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
temp = scnprintf(next, size,
|
|
||||||
" (%c%d ep%d%s "
|
|
||||||
"[%d/%d] q%d p%d)",
|
|
||||||
speed_char (scratch),
|
|
||||||
scratch & 0x007f,
|
|
||||||
(scratch >> 8) & 0x000f, type,
|
|
||||||
p.qh->ps.usecs,
|
|
||||||
p.qh->ps.c_usecs,
|
|
||||||
temp,
|
|
||||||
0x7ff & (scratch >> 16));
|
|
||||||
|
|
||||||
if (seen_count < DBG_SCHED_LIMIT)
|
if (seen_count < DBG_SCHED_LIMIT)
|
||||||
seen[seen_count++].qh = p.qh;
|
seen[seen_count++].qh = p.qh;
|
||||||
|
|
Загрузка…
Ссылка в новой задаче