ssb_private.h (498495dba268b20e8eadd7fe93c140c68b6cc9d2) | ssb_private.h (b8b6069cf2087545fe53ec920e8353133e9a70bf) |
---|---|
1/* SPDX-License-Identifier: GPL-2.0 */ 2#ifndef LINUX_SSB_PRIVATE_H_ 3#define LINUX_SSB_PRIVATE_H_ 4 | 1/* SPDX-License-Identifier: GPL-2.0 */ 2#ifndef LINUX_SSB_PRIVATE_H_ 3#define LINUX_SSB_PRIVATE_H_ 4 |
5#define PFX "ssb: " 6#define pr_fmt(fmt) PFX fmt 7 |
|
5#include <linux/ssb/ssb.h> 6#include <linux/types.h> 7#include <linux/bcm47xx_wdt.h> 8 | 8#include <linux/ssb/ssb.h> 9#include <linux/types.h> 10#include <linux/bcm47xx_wdt.h> 11 |
9 10#define PFX "ssb: " 11 12#ifdef CONFIG_SSB_SILENT 13# define ssb_printk(fmt, ...) \ 14 do { if (0) printk(fmt, ##__VA_ARGS__); } while (0) 15#else 16# define ssb_printk(fmt, ...) \ 17 printk(fmt, ##__VA_ARGS__) 18#endif /* CONFIG_SSB_SILENT */ 19 20#define ssb_emerg(fmt, ...) ssb_printk(KERN_EMERG PFX fmt, ##__VA_ARGS__) 21#define ssb_err(fmt, ...) ssb_printk(KERN_ERR PFX fmt, ##__VA_ARGS__) 22#define ssb_warn(fmt, ...) ssb_printk(KERN_WARNING PFX fmt, ##__VA_ARGS__) 23#define ssb_notice(fmt, ...) ssb_printk(KERN_NOTICE PFX fmt, ##__VA_ARGS__) 24#define ssb_info(fmt, ...) ssb_printk(KERN_INFO PFX fmt, ##__VA_ARGS__) 25#define ssb_cont(fmt, ...) ssb_printk(KERN_CONT fmt, ##__VA_ARGS__) 26 27/* dprintk: Debugging printk; vanishes for non-debug compilation */ | |
28#ifdef CONFIG_SSB_DEBUG | 12#ifdef CONFIG_SSB_DEBUG |
29# define ssb_dbg(fmt, ...) \ 30 ssb_printk(KERN_DEBUG PFX fmt, ##__VA_ARGS__) 31#else 32# define ssb_dbg(fmt, ...) \ 33 do { if (0) printk(KERN_DEBUG PFX fmt, ##__VA_ARGS__); } while (0) 34#endif 35 36#ifdef CONFIG_SSB_DEBUG | |
37# define SSB_WARN_ON(x) WARN_ON(x) 38# define SSB_BUG_ON(x) BUG_ON(x) 39#else 40static inline int __ssb_do_nothing(int x) { return x; } 41# define SSB_WARN_ON(x) __ssb_do_nothing(unlikely(!!(x))) 42# define SSB_BUG_ON(x) __ssb_do_nothing(unlikely(!!(x))) 43#endif 44 --- 255 unchanged lines hidden --- | 13# define SSB_WARN_ON(x) WARN_ON(x) 14# define SSB_BUG_ON(x) BUG_ON(x) 15#else 16static inline int __ssb_do_nothing(int x) { return x; } 17# define SSB_WARN_ON(x) __ssb_do_nothing(unlikely(!!(x))) 18# define SSB_BUG_ON(x) __ssb_do_nothing(unlikely(!!(x))) 19#endif 20 --- 255 unchanged lines hidden --- |