Messages in this thread | | | Subject | Re: RFC: dynamic debug enhancements? | From | Joe Perches <> | Date | Mon, 29 Aug 2011 11:35:26 -0700 |
| |
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.
| |