From: Joe Perches <joe@perches.com>
To: Andrei Emeltchenko <andrei.emeltchenko.news@gmail.com>
Cc: akpm@linux-foundation.org, linux-kernel@vger.kernel.org
Subject: Re: [RFC] vsprintf: Add %pb[1-64] specifier to print hex memory dump
Date: Fri, 29 Jun 2012 08:12:51 -0700 [thread overview]
Message-ID: <1340982771.6562.29.camel@joe2Laptop> (raw)
In-Reply-To: <CAMXE1-rxShpXA4i04wG3_xoZdkBLWoVPKZLmxQGnuEAn8prDRQ@mail.gmail.com>
On Fri, 2012-06-29 at 17:59 +0300, Andrei Emeltchenko wrote:
> Hi,
>
> On Fri, Jun 29, 2012 at 5:54 PM, Joe Perches <joe@perches.com> wrote:
> > On Fri, 2012-06-29 at 17:11 +0300, Andrei Emeltchenko wrote:
> >> From: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
> >>
> >> Add new specifier which may be used to print 1-64 bytes of memory.
> >> There is often a need to print small (up to 64 bytes) objects like
> >> bluetooth keys in debug purposes. Currently we have to create special
> >> function for that.
> >
> > print_hex_dump() ?
>
> If this only needed for debug we would need to undef this?
If it's only needed for your debugging it should not go
into vsprintf at all.
Why not something like:
#ifdef SOME_BLUETOOTH_DEBUG_FLAG
#define bt_hex_dump_dbg(...) \
print_hex_dump(...)
#else
#define bt_hex_dump_dbg(...) \
do { } while (0)
#endif
prev parent reply other threads:[~2012-06-29 15:12 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-06-29 14:11 Andrei Emeltchenko
2012-06-29 14:54 ` Joe Perches
2012-06-29 14:59 ` Andrei Emeltchenko
2012-06-29 15:12 ` Joe Perches [this message]
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=1340982771.6562.29.camel@joe2Laptop \
--to=joe@perches.com \
--cc=akpm@linux-foundation.org \
--cc=andrei.emeltchenko.news@gmail.com \
--cc=linux-kernel@vger.kernel.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
all inboxes | Powered by JetHome®