From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
To: Benson Leung <bleung@chromium.org>
Cc: rydberg@euromail.se, linux-input@vger.kernel.org,
linux-kernel@vger.kernel.org, olofj@chromium.org,
djkurtz@chromium.org, dudl@cypress.com
Subject: Re: [PATCH 2/4] Input: cyapa - Firmware update via request firmware
Date: Wed, 13 Mar 2013 17:38:37 -0700 [thread overview]
Message-ID: <20130314003837.GA11886@core.coreip.homeip.net> (raw)
In-Reply-To: <1363218651-22457-3-git-send-email-bleung@chromium.org>
On Wed, Mar 13, 2013 at 04:50:49PM -0700, Benson Leung wrote:
> +
> +#define BYTE_PER_LINE 8
> +void cyapa_dump_data(struct cyapa *cyapa, size_t length, const u8 *data)
> +{
> +#ifdef DEBUG
> + struct device *dev = &cyapa->client->dev;
> + int i;
> + char buf[BYTE_PER_LINE * 3 + 1];
> + char *s = buf;
> +
> + for (i = 0; i < length; i++) {
> + s += sprintf(s, " %02x", data[i]);
> + if ((i + 1) == length || ((i + 1) % BYTE_PER_LINE) == 0) {
> + dev_dbg(dev, "%s\n", buf);
> + s = buf;
> + }
> + }
> +#endif
> +}
> +#undef BYTE_PER_LINE
We have dev_dbg("%*ph\n", BYTES_PER_LINE, data[...]); for this.
Thanks.
--
Dmitry
next prev parent reply other threads:[~2013-03-14 0:39 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-03-13 23:50 [PATCH 0/4] Input: cyapa - Add firmware update feature Benson Leung
2013-03-13 23:50 ` [PATCH 1/4] Input: cyapa - Move common initialization to cyapa_detect Benson Leung
2013-03-16 19:40 ` Henrik Rydberg
2013-03-13 23:50 ` [PATCH 2/4] Input: cyapa - Firmware update via request firmware Benson Leung
2013-03-14 0:38 ` Dmitry Torokhov [this message]
2013-03-16 20:00 ` Henrik Rydberg
2013-03-19 0:37 ` Benson Leung
2013-03-19 21:52 ` Henrik Rydberg
2013-03-13 23:50 ` [PATCH 3/4] Input: cyapa - Allow filename to be changed in update_fw Benson Leung
2013-03-13 23:50 ` [PATCH 4/4] Input: cyapa - Add sysfs attrs for product_id and fw version Benson Leung
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=20130314003837.GA11886@core.coreip.homeip.net \
--to=dmitry.torokhov@gmail.com \
--cc=bleung@chromium.org \
--cc=djkurtz@chromium.org \
--cc=dudl@cypress.com \
--cc=linux-input@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=olofj@chromium.org \
--cc=rydberg@euromail.se \
/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
all inboxes | Powered by JetHome®