]> git.proxmox.com Git - mirror_ovs.git/blob - datapath/linux-2.6/compat-2.6/include/asm-generic/bug.h
ovsdb: Synchronize comments and code in ovsdb_file_commit().
[mirror_ovs.git] / datapath / linux-2.6 / compat-2.6 / include / asm-generic / bug.h
1 #ifndef __ASM_GENERIC_BUG_WRAPPER_H
2 #define __ASM_GENERIC_BUG_WRAPPER_H
3
4 #include_next <asm-generic/bug.h>
5
6 #ifndef WARN_ON_ONCE
7 #define WARN_ON_ONCE(condition) ({ \
8 static int __warned; \
9 int __ret_warn_once = !!(condition); \
10 \
11 if (unlikely(__ret_warn_once) && !__warned) { \
12 WARN_ON(1); \
13 __warned = 1; \
14 } \
15 unlikely(__ret_warn_once); \
16 })
17 #endif
18
19 #endif