irda: vlsi_ir: use %*ph specifier
Subsystems (2)
PATCH v3 1/1 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 <[email protected]>
--- drivers/net/irda/vlsi_ir.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-)
drivers/net/irda/vlsi_ir.c +2 -6
@@ -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++) {
Signature · 1 line
2.1.0
From: Andy Shevchenko <[email protected]>
Date: Tue, 9 Sep 2014 11:48:29 +0300
Quoted 4 lines
Instead of looping in the code let's use kernel extension to dump small buffers.
Signed-off-by Andy Shevchenko <[email protected]>
Applied.