[lkml]   [2004]   [Aug]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [RFC] Host Virtual Serial Interface driver
On Monday 09 August 2004 14:00, Sam Ravnborg wrote:
> On Mon, Aug 09, 2004 at 01:51:49PM -0500, Hollis Blanchard wrote:
> > > pr_debug is a noop if DEBUG is not defined. Make dump_hex, dump_packet
> > > be a noop also and you get rid of several #ifdef in the code.
> >
> > I'd like to do that, but notice that dump_hex() is called from
> > dump_packet() from hvsi_recv_response() (and I've just made
> > hvsi_recv_control() the same). Even with debug disabled, I'd like to be
> > able to dump a whole packet if I get confused...
> Make a small wrapper that becomes noop in non-debug case,
> and use the real one where you do not care about DEBUG.

Ah sure, like this:

#ifdef DEBUG
#define dbg_dump_packet(packet) dump_packet(packet)
#define dbg_dump_hex(data, len) dump_hex(data, len)
#define dbg_dump_packet(packet)
#define dbg_dump_hex(data, len)

... and then replace the in-DEBUG callers. I like it, thanks.

Hollis Blanchard
IBM Linux Technology Center
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2005-03-22 14:05    [W:0.035 / U:11.156 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site