From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: Mauro Carvalho Chehab <mchehab@infradead.org>,
linux-media@vger.kernel.org
Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
Anssi Hannula <anssi.hannula@iki.fi>
Subject: [PATCH 09/11] ati_remote: use %*ph to dump small buffers
Date: Tue, 7 Aug 2012 19:43:09 +0300 [thread overview]
Message-ID: <1344357792-18202-9-git-send-email-andriy.shevchenko@linux.intel.com> (raw)
In-Reply-To: <1344357792-18202-1-git-send-email-andriy.shevchenko@linux.intel.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Cc: Anssi Hannula <anssi.hannula@iki.fi>
---
drivers/media/rc/ati_remote.c | 11 +++--------
1 file changed, 3 insertions(+), 8 deletions(-)
diff --git a/drivers/media/rc/ati_remote.c b/drivers/media/rc/ati_remote.c
index 8fa72e2..08aede5 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,
if (data[0] != (unsigned char)0xff && data[0] != 0x00)
dev_warn(dev, "Weird byte 0x%02x\n", data[0]);
} else if (len == 4)
- dev_warn(dev, "Weird key %02x %02x %02x %02x\n",
- data[0], data[1], data[2], data[3]);
+ dev_warn(dev, "Weird key %*ph\n", 4, data);
else
- dev_warn(dev,
- "Weird data, len=%d %02x %02x %02x %02x %02x %02x ...\n",
- len, data[0], data[1], data[2], data[3], data[4],
- data[5]);
+ dev_warn(dev, "Weird data, len=%d %*ph ...\n", len, 6, data);
}
/*
@@ -519,8 +515,7 @@ static void ati_remote_input_report(struct urb *urb)
if (data[1] != ((data[2] + data[3] + 0xd5) & 0xff)) {
dbginfo(&ati_remote->interface->dev,
- "wrong checksum in input: %02x %02x %02x %02x\n",
- data[0], data[1], data[2], data[3]);
+ "wrong checksum in input: %*ph\n", 4, data);
return;
}
--
1.7.10.4
next prev parent reply other threads:[~2012-08-07 16:42 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-08-07 16:43 [PATCH 01/11] saa7164: use native print_hex_dump() instead of custom one Andy Shevchenko
2012-08-07 16:43 ` [PATCH 02/11] dvb: nxt200x: apply levels to the printk()s Andy Shevchenko
2012-08-07 16:43 ` [PATCH 03/11] common: tunners: use %*ph to dump small buffers Andy Shevchenko
2012-08-07 16:43 ` [PATCH 04/11] dvb-usb: " Andy Shevchenko
2012-08-07 23:04 ` Antti Palosaari
2012-08-07 16:43 ` [PATCH 05/11] dvb: frontends: " Andy Shevchenko
2012-08-07 22:34 ` Antti Palosaari
2012-08-07 16:43 ` [PATCH 06/11] radio-shark2: use %*ph to print " Andy Shevchenko
2012-08-07 16:43 ` [PATCH 07/11] gspca: " Andy Shevchenko
2012-08-07 16:43 ` [PATCH 08/11] dvb: use %*ph to hexdump " Andy Shevchenko
2012-08-07 16:43 ` Andy Shevchenko [this message]
2012-08-07 16:43 ` [PATCH 10/11] saa7127: use %*ph to print " Andy Shevchenko
2012-08-07 16:43 ` [PATCH 11/11] au0828: use %*ph to dump " Andy Shevchenko
2012-08-13 19:41 ` Mauro Carvalho Chehab
2012-08-14 3:50 ` Andy Shevchenko
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1344357792-18202-9-git-send-email-andriy.shevchenko@linux.intel.com \
--to=andriy.shevchenko@linux.intel.com \
--cc=anssi.hannula@iki.fi \
--cc=linux-media@vger.kernel.org \
--cc=mchehab@infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).