Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758390AbbBFXBl (ORCPT ); Fri, 6 Feb 2015 18:01:41 -0500 Received: from mail-wg0-f51.google.com ([74.125.82.51]:59201 "EHLO mail-wg0-f51.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757370AbbBFXBj (ORCPT ); Fri, 6 Feb 2015 18:01:39 -0500 MIME-Version: 1.0 In-Reply-To: References: <1421704310-26857-3-git-send-email-rjui@broadcom.com> <20150206223149.GB345@google.com> From: Kevin Cernekee Date: Fri, 6 Feb 2015 15:01:15 -0800 Message-ID: Subject: Re: [v7,2/3] i2c: iproc: Add Broadcom iProc I2C Driver To: Dmitry Torokhov Cc: Ray Jui , Wolfram Sang , =?UTF-8?Q?Uwe_Kleine=2DK=C3=B6nig?= , Arend van Spriel , Rob Herring , Pawel Moll , Mark Rutland , Ian Campbell , Kumar Gala , Grant Likely , Christian Daudt , Matt Porter , Florian Fainelli , Russell King , Scott Branden , linux-i2c@vger.kernel.org, "linux-kernel@vger.kernel.org" , linux-arm-kernel@lists.infradead.org, bcm-kernel-feedback-list@broadcom.com, devicetree@vger.kernel.org Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1272 Lines: 30 On Fri, Feb 6, 2015 at 2:48 PM, Dmitry Torokhov wrote: > On Fri, Feb 6, 2015 at 2:31 PM, Kevin Cernekee wrote: >> On Mon, Jan 19, 2015 at 01:51:49PM -0800, Ray Jui wrote: >>> + >>> + dev_dbg(iproc_i2c->device, "xfer %c, addr=0x%02x, len=%d\n", >>> + (msg->flags & I2C_M_RD) ? 'R' : 'W', msg->addr, >>> + msg->len); >>> + dev_dbg(iproc_i2c->device, "**** data start ****\n"); >>> + for (i = 0; i < msg->len; i++) >>> + dev_dbg(iproc_i2c->device, "0x%02x ", msg->buf[i]); >>> + dev_dbg(iproc_i2c->device, "**** data end ****\n"); >> >> It might be simpler to just do: >> >> print_hex_dump_bytes("iproc_i2c:", DUMP_PREFIX_NONE, msg->buf, msg->len); >> >> although you'd lose the ability to see the I2C device name. > > We can also do: > > dev_dbg(iproc_i2c->device, "*** data: %*ph\n", msg->len, msg->buf); > > if we are OK with limiting output to 64 bytes. msg->len is capped at 63 due to hardware limits, so that should work. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/