12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667 |
- #ifndef DEBUG_HEADER
- #define DEBUG_HEADER
- #define QUALCOMM_DEBUG 0
- #define QUALCOMM_TRACE 0
- #if QUALCOMM_TRACE
- #define EVENT(s) printk(KERN_DEBUG "---[ %s ]---\n", (s))
- #define ENTER printk(KERN_DEBUG "-->[ %s:%d ]\n", __func__,__LINE__)
- #define ABORT printk(KERN_DEBUG "<--( %s:%d )\n", __func__,__LINE__)
- #define LEAVE printk(KERN_DEBUG "<--[ %s:%d ]\n", __func__,__LINE__)
- #define CRUMB printk(KERN_DEBUG "... %s:%d\n",__func__,__LINE__)
- #define TRACE error (0, 0, "%s (%d)", __FILE__, __LINE__);
- #else
- #define EVENT {}
- #define ENTER {}
- #define ABORT {}
- #define LEAVE {}
- #define CRUMB {}
- #define TRACE {}
- #endif
- #if QUALCOMM_DEBUG
- #define address(e) if (!(e)) { printk ("%s(%d): address %s is null\n",__func__,__LINE__,#e); }
- #define confirm(e) if (!(e)) { printk ("%s(%d): assertion %s is wrong\n",__func__,__LINE__, #e); }
- #else
- #define address(e) {}
- #define confirm(e) {}
- #endif
- #endif
|