Re: RFC: dynamic debug enhancements?

From: Joe Perches
Date: Mon Aug 29 2011 - 14:35:29 EST


On Mon, 2011-08-29 at 12:21 -0600, Jim Cromie wrote:
> how about just passing in condition directly ?
> #define pr_dbg_if( cond, fmt, ... ) \
> do { \
> if (cond) \
> pr_debug(fmt, ##__VA_ARGS__); \
> } while (0)
> this will serve both mask and level, and could underlie both of them,
> and its clear - no hidden checks against a variable named elsewhere.

The idea is to let dynamic debug control the
output for the various mask/level tests.

That could get out of sync with pr_debug.

It separates the pr_debug condition from the test.


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/