]> bbs.cooldavid.org Git - net-next-2.6.git/blobdiff - include/asm-generic/bug.h
printk ratelimiting rewrite
[net-next-2.6.git] / include / asm-generic / bug.h
index a346e744e770098ee4550412d766d44942b0497b..a3f738cffdb61a0057ffb8a1cd9a012e30b72f24 100644 (file)
@@ -97,6 +97,9 @@ extern void warn_slowpath(const char *file, const int line,
        unlikely(__ret_warn_once);                              \
 })
 
+#define WARN_ON_RATELIMIT(condition, state)                    \
+               WARN_ON((condition) && __ratelimit(state))
+
 #ifdef CONFIG_SMP
 # define WARN_ON_SMP(x)                        WARN_ON(x)
 #else