Commit a5355977 authored by Geyslan G. Bem's avatar Geyslan G. Bem Committed by Greg Kroah-Hartman

usb: host: ehci-dbg: use scnprintf() in qh_lines()

This patch replaces two snprintf() calls with scnprintf() in qh_lines()
and hence removes the unneeded sequential truncation tests.
Signed-off-by: default avatarGeyslan G. Bem <geyslan@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent c2fb0171
......@@ -484,7 +484,7 @@ static void qh_lines(
type = "?";
break;
}
temp = snprintf(next, size,
temp = scnprintf(next, size,
"\n\t%p%c%s len=%d %08x urb %p"
" [td %08x buf[0] %08x]",
td, mark, type,
......@@ -493,17 +493,13 @@ static void qh_lines(
td->urb,
(u32) td->qtd_dma,
hc32_to_cpup(ehci, &td->hw_buf[0]));
if (size < temp)
temp = size;
size -= temp;
next += temp;
if (temp == size)
goto done;
}
temp = snprintf(next, size, "\n");
if (size < temp)
temp = size;
temp = scnprintf(next, size, "\n");
size -= temp;
next += temp;
......
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