From a508da6cc0093171833efb8376b00473f24221b9 Mon Sep 17 00:00:00 2001 From: Joe Perches Date: Thu, 17 May 2012 10:25:49 +0000 Subject: lapb: Neaten debugging Enable dynamic debugging and remove a bunch of #ifdef/#endifs. Add a lapb_dbg(level, fmt, ...) macro and replace the printk(KERN_DEBUG uses. Add pr_fmt and remove embedded prefixes. Signed-off-by: Joe Perches Signed-off-by: David S. Miller --- include/net/lapb.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'include') diff --git a/include/net/lapb.h b/include/net/lapb.h index fd2bf572ee1d..df892a94f2c6 100644 --- a/include/net/lapb.h +++ b/include/net/lapb.h @@ -149,4 +149,10 @@ extern int lapb_t1timer_running(struct lapb_cb *lapb); */ #define LAPB_DEBUG 0 +#define lapb_dbg(level, fmt, ...) \ +do { \ + if (level < LAPB_DEBUG) \ + pr_debug(fmt, ##__VA_ARGS__); \ +} while (0) + #endif -- cgit v1.2.3