]> git.karo-electronics.de Git - linux-beck.git/commitdiff
[media] imon: use %*ph to do small hexa dumps
authorMauro Carvalho Chehab <mchehab@s-opensource.com>
Fri, 14 Oct 2016 10:48:35 +0000 (07:48 -0300)
committerMauro Carvalho Chehab <mchehab@s-opensource.com>
Fri, 21 Oct 2016 10:51:27 +0000 (08:51 -0200)
Since commit 563873318d32 ("Merge branch 'printk-cleanups"),
continuation lines require KERN_CONT. Instead, let's just
use %*ph to print the buffer.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
drivers/media/rc/imon.c

index 86cc70fe25348f1ef9f48070ec518a23a2f036ae..d62b1f38292c03adc5b48425e82e356d3331d1fd 100644 (file)
@@ -1593,7 +1593,6 @@ static void imon_incoming_packet(struct imon_context *ictx,
        struct device *dev = ictx->dev;
        unsigned long flags;
        u32 kc;
-       int i;
        u64 scancode;
        int press_type = 0;
        int msec;
@@ -1664,10 +1663,8 @@ static void imon_incoming_packet(struct imon_context *ictx,
        }
 
        if (debug) {
-               printk(KERN_INFO "intf%d decoded packet: ", intf);
-               for (i = 0; i < len; ++i)
-                       printk("%02x ", buf[i]);
-               printk("\n");
+               printk(KERN_INFO "intf%d decoded packet: %*ph\n",
+                      intf, len, buf);
        }
 
        press_type = imon_parse_press_type(ictx, buf, ktype);