[media] dvb: frontends: use %*ph to dump small buffers
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Tue, 7 Aug 2012 15:43:05 +0000 (12:43 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Mon, 13 Aug 2012 19:38:19 +0000 (16:38 -0300)
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Acked-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
drivers/media/dvb/frontends/cxd2820r_t.c
drivers/media/dvb/frontends/nxt200x.c
drivers/media/dvb/frontends/rtl2830.c

index 1a026239cdcc081afeb2b3f6d3e172d73a4c224c..e5dd22bc16be293094b697498d8cdf62f7087d1a 100644 (file)
@@ -389,8 +389,7 @@ int cxd2820r_read_status_t(struct dvb_frontend *fe, fe_status_t *status)
                }
        }
 
-       dbg("%s: lock=%02x %02x %02x %02x", __func__,
-               buf[0], buf[1], buf[2], buf[3]);
+       dbg("%s: lock=%*ph", __func__, 4, buf);
 
        return ret;
 error:
index 03af52ec2c5818f8b6e4bed5286389acc75b9984..8e288940a61fcb0654034dde41457de506e25a8f 100644 (file)
@@ -331,7 +331,7 @@ static int nxt200x_writetuner (struct nxt200x_state* state, u8* data)
 
        dprintk("%s\n", __func__);
 
-       dprintk("Tuner Bytes: %02X %02X %02X %02X\n", data[1], data[2], data[3], data[4]);
+       dprintk("Tuner Bytes: %*ph\n", 4, data + 1);
 
        /* if NXT2004, write directly to tuner. if NXT2002, write through NXT chip.
         * direct write is required for Philips TUV1236D and ALPS TDHU2 */
@@ -1161,8 +1161,7 @@ struct dvb_frontend* nxt200x_attach(const struct nxt200x_config* config,
 
        /* read card id */
        nxt200x_readbytes(state, 0x00, buf, 5);
-       dprintk("NXT info: %02X %02X %02X %02X %02X\n",
-               buf[0], buf[1], buf[2], buf[3], buf[4]);
+       dprintk("NXT info: %*ph\n", 5, buf);
 
        /* set demod chip */
        switch (buf[0]) {
@@ -1201,8 +1200,7 @@ struct dvb_frontend* nxt200x_attach(const struct nxt200x_config* config,
 
 error:
        kfree(state);
-       printk("Unknown/Unsupported NXT chip: %02X %02X %02X %02X %02X\n",
-               buf[0], buf[1], buf[2], buf[3], buf[4]);
+       pr_err("Unknown/Unsupported NXT chip: %*ph\n", 5, buf);
        return NULL;
 }
 
index 93612ebac519d86cdf8efdf257021ba986dceefd..8fa8b0854e765d52b2ae961b34d0894af49129e9 100644 (file)
@@ -392,7 +392,7 @@ static int rtl2830_get_frontend(struct dvb_frontend *fe)
        if (ret)
                goto err;
 
-       dbg("%s: TPS=%02x %02x %02x", __func__, buf[0], buf[1], buf[2]);
+       dbg("%s: TPS=%*ph", __func__, 3, buf);
 
        switch ((buf[0] >> 2) & 3) {
        case 0:
This page took 0.039235 seconds and 5 git commands to generate.