]> err.no Git - linux-2.6/blobdiff - net/dccp/dccp.h
[DCCP]: Simplified conditions due to use of enum:8 states
[linux-2.6] / net / dccp / dccp.h
index 3a94625a1af30dcc9c4945185aa344df21a54cf9..68886986c8e4006165ff3fffc3f6c7138c4e5546 100644 (file)
 #include <net/tcp.h>
 #include "ackvec.h"
 
-#define DCCP_CRIT(fmt, a...) LIMIT_NETDEBUG(KERN_CRIT fmt " at %s:%d/%s()\n",  \
-                                        ##a, __FILE__, __LINE__, __FUNCTION__)
-#define DCCP_BUG(fmt, a...)  do { DCCP_CRIT(fmt, ##a); dump_stack(); } while (0)
-#define DCCP_BUG_ON(cond)    do { if (unlikely((cond) == 0))                   \
-                                       DCCP_BUG("BUG: condition \"%s\" fails",\
-                                                __stringify((cond)));         \
+/*
+ *     DCCP - specific warning and debugging macros.
+ */
+#define DCCP_WARN(fmt, a...) LIMIT_NETDEBUG(KERN_WARNING "%s: " fmt,       \
+                                                       __FUNCTION__, ##a)
+#define DCCP_CRIT(fmt, a...) printk(KERN_CRIT fmt " at %s:%d/%s()\n", ##a, \
+                                        __FILE__, __LINE__, __FUNCTION__)
+#define DCCP_BUG(a...)       do { DCCP_CRIT("BUG: " a); dump_stack(); } while(0)
+#define DCCP_BUG_ON(cond)    do { if (unlikely((cond) != 0))              \
+                                    DCCP_BUG("\"%s\" holds (exception!)", \
+                                             __stringify(cond));          \
                             } while (0)
 
 #ifdef MODULE