diff options
author | Andy Shevchenko <andriy.shevchenko@linux.intel.com> | 2014-09-09 11:48:29 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2014-09-09 20:10:44 -0700 |
commit | be07b79dcfac2e19160f59229032325ff49ac69c (patch) | |
tree | a81511e3bb68466d4b3537097e96b9bbfb836c77 /drivers/net/irda | |
parent | 8ddfa07778afdd9e00406a6a8ede827d51d9f26e (diff) |
irda: vlsi_ir: use %*ph specifier
Instead of looping in the code let's use kernel extension to dump small
buffers.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/irda')
-rw-r--r-- | drivers/net/irda/vlsi_ir.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/drivers/net/irda/vlsi_ir.c b/drivers/net/irda/vlsi_ir.c index a04af9d0f8f9..a2e556168286 100644 --- a/drivers/net/irda/vlsi_ir.c +++ b/drivers/net/irda/vlsi_ir.c @@ -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", h, (unsigned)rd_get_status(rd), j); if (j > 0) { - seq_printf(seq, " data:"); - if (j > 20) - j = 20; - for (i = 0; i < j; i++) - seq_printf(seq, " %02x", (unsigned)((unsigned char *)rd->buf)[i]); - seq_printf(seq, "\n"); + seq_printf(seq, " data: %*ph\n", + min_t(unsigned, j, 20), rd->buf); } } for (i = 0; i < r->size; i++) { |