From mboxrd@z Thu Jan 1 00:00:00 1970 From: Dmitry Torokhov Subject: Re: [v7,2/3] i2c: iproc: Add Broadcom iProc I2C Driver Date: Fri, 6 Feb 2015 14:48:31 -0800 Message-ID: References: <1421704310-26857-3-git-send-email-rjui@broadcom.com> <20150206223149.GB345@google.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Return-path: In-Reply-To: <20150206223149.GB345-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org> Sender: linux-i2c-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: Kevin Cernekee 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-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, "linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org" , linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org, bcm-kernel-feedback-list-dY08KVG/lbpWk0Htik3J/w@public.gmane.org, devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Dmitry Torokhov List-Id: devicetree@vger.kernel.org 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. Thanks, Dmitry