diff options
author | Joe Perches <joe@perches.com> | 2013-02-20 12:16:13 -0800 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2013-03-06 16:24:23 -0500 |
commit | 33a606ac8020b47292bcfda30c7888c1ab5233e2 (patch) | |
tree | 90854660647b5eced80c6a9cfe2930a7425a50e7 /drivers/ssb/ssb_private.h | |
parent | e5652756ff36ed9e1283121f788e6a17117efcab (diff) | |
download | op-kernel-dev-33a606ac8020b47292bcfda30c7888c1ab5233e2.zip op-kernel-dev-33a606ac8020b47292bcfda30c7888c1ab5233e2.tar.gz |
ssb: Convert ssb_printk to ssb_<level>
Use a more current logging style.
Convert ssb_dbprint to ssb_dbg too.
Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/ssb/ssb_private.h')
-rw-r--r-- | drivers/ssb/ssb_private.h | 19 |
1 files changed, 15 insertions, 4 deletions
diff --git a/drivers/ssb/ssb_private.h b/drivers/ssb/ssb_private.h index 466171b..4671f17 100644 --- a/drivers/ssb/ssb_private.h +++ b/drivers/ssb/ssb_private.h @@ -9,16 +9,27 @@ #define PFX "ssb: " #ifdef CONFIG_SSB_SILENT -# define ssb_printk(fmt, x...) do { /* nothing */ } while (0) +# define ssb_printk(fmt, ...) \ + do { if (0) printk(fmt, ##__VA_ARGS__); } while (0) #else -# define ssb_printk printk +# define ssb_printk(fmt, ...) \ + printk(fmt, ##__VA_ARGS__) #endif /* CONFIG_SSB_SILENT */ +#define ssb_emerg(fmt, ...) ssb_printk(KERN_EMERG PFX fmt, ##__VA_ARGS__) +#define ssb_err(fmt, ...) ssb_printk(KERN_ERR PFX fmt, ##__VA_ARGS__) +#define ssb_warn(fmt, ...) ssb_printk(KERN_WARNING PFX fmt, ##__VA_ARGS__) +#define ssb_notice(fmt, ...) ssb_printk(KERN_NOTICE PFX fmt, ##__VA_ARGS__) +#define ssb_info(fmt, ...) ssb_printk(KERN_INFO PFX fmt, ##__VA_ARGS__) +#define ssb_cont(fmt, ...) ssb_printk(KERN_CONT fmt, ##__VA_ARGS__) + /* dprintk: Debugging printk; vanishes for non-debug compilation */ #ifdef CONFIG_SSB_DEBUG -# define ssb_dprintk(fmt, x...) ssb_printk(fmt , ##x) +# define ssb_dbg(fmt, ...) \ + ssb_printk(KERN_DEBUG PFX fmt, ##__VA_ARGS__) #else -# define ssb_dprintk(fmt, x...) do { /* nothing */ } while (0) +# define ssb_dbg(fmt, ...) \ + do { if (0) printk(KERN_DEBUG PFX fmt, ##__VA_ARGS__); } while (0) #endif #ifdef CONFIG_SSB_DEBUG |