From patchwork Tue Aug 7 22:56:35 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Antti Palosaari X-Patchwork-Id: 1290251 Return-Path: X-Original-To: patchwork-linux-media@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork1.kernel.org (Postfix) with ESMTP id 1E4E73FCC5 for ; Tue, 7 Aug 2012 22:57:14 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1031111Ab2HGW5J (ORCPT ); Tue, 7 Aug 2012 18:57:09 -0400 Received: from mail.kapsi.fi ([217.30.184.167]:52414 "EHLO mail.kapsi.fi" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1031112Ab2HGW5F (ORCPT ); Tue, 7 Aug 2012 18:57:05 -0400 Received: from dyn3-82-128-186-179.psoas.suomi.net ([82.128.186.179] helo=localhost.localdomain) by mail.kapsi.fi with esmtpsa (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.72) (envelope-from ) id 1Syshy-0003mc-S7; Wed, 08 Aug 2012 01:57:02 +0300 From: Antti Palosaari To: linux-media@vger.kernel.org Cc: Andy Shevchenko , Antti Palosaari Subject: [PATCH 1/2] dvb-usb: use %*ph to dump small buffers Date: Wed, 8 Aug 2012 01:56:35 +0300 Message-Id: <1344380196-9488-1-git-send-email-crope@iki.fi> X-Mailer: git-send-email 1.7.11.2 X-SA-Exim-Connect-IP: 82.128.186.179 X-SA-Exim-Mail-From: crope@iki.fi X-SA-Exim-Scanned: No (on mail.kapsi.fi); SAEximRunCond expanded to false Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org From: Andy Shevchenko [crope@iki.fi: fix trivial merge conflict] Signed-off-by: Andy Shevchenko Cc: Antti Palosaari Signed-off-by: Antti Palosaari --- drivers/media/dvb/dvb-usb-v2/af9015.c | 3 +-- drivers/media/dvb/dvb-usb-v2/af9035.c | 3 +-- drivers/media/dvb/dvb-usb/pctv452e.c | 7 +++---- 3 files changed, 5 insertions(+), 8 deletions(-) diff --git a/drivers/media/dvb/dvb-usb-v2/af9015.c b/drivers/media/dvb/dvb-usb-v2/af9015.c index 10363f6..e77429b 100644 --- a/drivers/media/dvb/dvb-usb-v2/af9015.c +++ b/drivers/media/dvb/dvb-usb-v2/af9015.c @@ -1199,8 +1199,7 @@ static int af9015_rc_query(struct dvb_usb_device *d) /* Only process key if canary killed */ if (buf[16] != 0xff && buf[0] != 0x01) { - deb_rc("%s: key pressed %02x %02x %02x %02x\n", __func__, - buf[12], buf[13], buf[14], buf[15]); + deb_rc("%s: key pressed %*ph\n", __func__, 4, buf + 12); /* Reset the canary */ ret = af9015_write_reg(d, 0x98e9, 0xff); diff --git a/drivers/media/dvb/dvb-usb-v2/af9035.c b/drivers/media/dvb/dvb-usb-v2/af9035.c index 79197f4..bb90b87 100644 --- a/drivers/media/dvb/dvb-usb-v2/af9035.c +++ b/drivers/media/dvb/dvb-usb-v2/af9035.c @@ -290,8 +290,7 @@ static int af9035_identify_state(struct dvb_usb_device *d, const char **name) if (ret < 0) goto err; - pr_debug("%s: reply=%02x %02x %02x %02x\n", __func__, - rbuf[0], rbuf[1], rbuf[2], rbuf[3]); + pr_debug("%s: reply=%*ph\n", __func__, 4, rbuf); if (rbuf[0] || rbuf[1] || rbuf[2] || rbuf[3]) ret = WARM; else diff --git a/drivers/media/dvb/dvb-usb/pctv452e.c b/drivers/media/dvb/dvb-usb/pctv452e.c index f526eb0..02e8785 100644 --- a/drivers/media/dvb/dvb-usb/pctv452e.c +++ b/drivers/media/dvb/dvb-usb/pctv452e.c @@ -136,8 +136,8 @@ static int tt3650_ci_msg(struct dvb_usb_device *d, u8 cmd, u8 *data, return 0; failed: - err("CI error %d; %02X %02X %02X -> %02X %02X %02X.", - ret, SYNC_BYTE_OUT, id, cmd, buf[0], buf[1], buf[2]); + err("CI error %d; %02X %02X %02X -> %*ph.", + ret, SYNC_BYTE_OUT, id, cmd, 3, buf); return ret; } @@ -556,8 +556,7 @@ static int pctv452e_rc_query(struct dvb_usb_device *d) return ret; if (debug > 3) { - info("%s: read: %2d: %02x %02x %02x: ", __func__, - ret, rx[0], rx[1], rx[2]); + info("%s: read: %2d: %*ph: ", __func__, ret, 3, rx); for (i = 0; (i < rx[3]) && ((i+3) < PCTV_ANSWER_LEN); i++) info(" %02x", rx[i+3]);