[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <1340982771.6562.29.camel@joe2Laptop>
Date: Fri, 29 Jun 2012 08:12:51 -0700
From: Joe Perches <joe@...ches.com>
To: Andrei Emeltchenko <andrei.emeltchenko.news@...il.com>
Cc: akpm@...ux-foundation.org, linux-kernel@...r.kernel.org
Subject: Re: [RFC] vsprintf: Add %pb[1-64] specifier to print hex memory dump
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@...ches.com> wrote:
> > On Fri, 2012-06-29 at 17:11 +0300, Andrei Emeltchenko wrote:
> >> From: Andrei Emeltchenko <andrei.emeltchenko@...el.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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists