of: MSI: Simplify irqdomain lookup
[linux/fpc-iii.git] / tools / include / asm / bug.h
blob9e5f4846967fcf6e098c039c61b455f1a9326b64
1 #ifndef _TOOLS_ASM_BUG_H
2 #define _TOOLS_ASM_BUG_H
4 #include <linux/compiler.h>
6 #define __WARN_printf(arg...) do { fprintf(stderr, arg); } while (0)
8 #define WARN(condition, format...) ({ \
9 int __ret_warn_on = !!(condition); \
10 if (unlikely(__ret_warn_on)) \
11 __WARN_printf(format); \
12 unlikely(__ret_warn_on); \
15 #define WARN_ONCE(condition, format...) ({ \
16 static int __warned; \
17 int __ret_warn_once = !!(condition); \
19 if (unlikely(__ret_warn_once)) \
20 if (WARN(!__warned, format)) \
21 __warned = 1; \
22 unlikely(__ret_warn_once); \
25 #endif /* _TOOLS_ASM_BUG_H */