diff options
author | Andy Shevchenko <andriy.shevchenko@linux.intel.com> | 2012-08-07 11:43:09 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2012-08-13 15:39:51 -0400 |
commit | 7c94c69d200ce754c148df403025614a2320fec9 (patch) | |
tree | 60173d85b8e7839304ab3353b6371fa21e033138 | |
parent | 090fdc17bc1a8c481c342be9bb1e32ccdeb32d80 (diff) |
[media] ati_remote: use %*ph to dump small buffers
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Cc: Anssi Hannula <anssi.hannula@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
-rw-r--r-- | drivers/media/rc/ati_remote.c | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/drivers/media/rc/ati_remote.c b/drivers/media/rc/ati_remote.c index 8fa72e2dacb1..08aede5ffaeb 100644 --- a/drivers/media/rc/ati_remote.c +++ b/drivers/media/rc/ati_remote.c | |||
@@ -331,13 +331,9 @@ static void ati_remote_dump(struct device *dev, unsigned char *data, | |||
331 | if (data[0] != (unsigned char)0xff && data[0] != 0x00) | 331 | if (data[0] != (unsigned char)0xff && data[0] != 0x00) |
332 | dev_warn(dev, "Weird byte 0x%02x\n", data[0]); | 332 | dev_warn(dev, "Weird byte 0x%02x\n", data[0]); |
333 | } else if (len == 4) | 333 | } else if (len == 4) |
334 | dev_warn(dev, "Weird key %02x %02x %02x %02x\n", | 334 | dev_warn(dev, "Weird key %*ph\n", 4, data); |
335 | data[0], data[1], data[2], data[3]); | ||
336 | else | 335 | else |
337 | dev_warn(dev, | 336 | dev_warn(dev, "Weird data, len=%d %*ph ...\n", len, 6, data); |
338 | "Weird data, len=%d %02x %02x %02x %02x %02x %02x ...\n", | ||
339 | len, data[0], data[1], data[2], data[3], data[4], | ||
340 | data[5]); | ||
341 | } | 337 | } |
342 | 338 | ||
343 | /* | 339 | /* |
@@ -519,8 +515,7 @@ static void ati_remote_input_report(struct urb *urb) | |||
519 | 515 | ||
520 | if (data[1] != ((data[2] + data[3] + 0xd5) & 0xff)) { | 516 | if (data[1] != ((data[2] + data[3] + 0xd5) & 0xff)) { |
521 | dbginfo(&ati_remote->interface->dev, | 517 | dbginfo(&ati_remote->interface->dev, |
522 | "wrong checksum in input: %02x %02x %02x %02x\n", | 518 | "wrong checksum in input: %*ph\n", 4, data); |
523 | data[0], data[1], data[2], data[3]); | ||
524 | return; | 519 | return; |
525 | } | 520 | } |
526 | 521 | ||