Commit be07b79d authored by Andy Shevchenko's avatar Andy Shevchenko Committed by David S. Miller

irda: vlsi_ir: use %*ph specifier

Instead of looping in the code let's use kernel extension to dump small
buffers.
Signed-off-by: default avatarAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 8ddfa077
...@@ -324,12 +324,8 @@ static void vlsi_proc_ring(struct seq_file *seq, struct vlsi_ring *r) ...@@ -324,12 +324,8 @@ static void vlsi_proc_ring(struct seq_file *seq, struct vlsi_ring *r)
seq_printf(seq, "current: rd = %d / status = %02x / len = %u\n", seq_printf(seq, "current: rd = %d / status = %02x / len = %u\n",
h, (unsigned)rd_get_status(rd), j); h, (unsigned)rd_get_status(rd), j);
if (j > 0) { if (j > 0) {
seq_printf(seq, " data:"); seq_printf(seq, " data: %*ph\n",
if (j > 20) min_t(unsigned, j, 20), rd->buf);
j = 20;
for (i = 0; i < j; i++)
seq_printf(seq, " %02x", (unsigned)((unsigned char *)rd->buf)[i]);
seq_printf(seq, "\n");
} }
} }
for (i = 0; i < r->size; i++) { for (i = 0; i < r->size; i++) {
......
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