Go to the documentation of this file.
37 #define HPI_DEBUG_LEVEL_DEFAULT HPI_DEBUG_LEVEL_NOTICE
42 #ifdef SOURCEFILE_NAME
43 #define FILE_LINE SOURCEFILE_NAME ":" __stringify(__LINE__) " "
45 #define FILE_LINE __FILE__ ":" __stringify(__LINE__) " "
48 #define HPI_DEBUG_ASSERT(expression) \
50 if (!(expression)) { \
51 printk(KERN_ERR FILE_LINE \
52 "ASSERT " __stringify(expression)); \
56 #define HPI_DEBUG_LOG(level, ...) \
58 if (hpi_debug_level >= HPI_DEBUG_LEVEL_##level) { \
59 printk(HPI_DEBUG_FLAG_##level \
60 FILE_LINE __VA_ARGS__); \
74 #define HPI_DEBUG_DATA(pdata, len) \
76 if (hpi_debug_level >= HPI_DEBUG_LEVEL_VERBOSE) \
77 hpi_debug_data(pdata, len); \
80 #define HPI_DEBUG_MESSAGE(level, phm) \
82 if (hpi_debug_level >= HPI_DEBUG_LEVEL_##level) { \
83 hpi_debug_message(phm, HPI_DEBUG_FLAG_##level \
84 FILE_LINE __stringify(level)); \
88 #define HPI_DEBUG_RESPONSE(phr) \
90 if (((hpi_debug_level >= HPI_DEBUG_LEVEL_DEBUG) && \
92 (hpi_debug_level >= HPI_DEBUG_LEVEL_VERBOSE)) \
93 printk(KERN_DEBUG "HPI_RES%d,%d,%d\n", \
94 phr->version, phr->error, phr->specific_error); \
97 #ifndef compile_time_assert
98 #define compile_time_assert(cond, msg) \
99 typedef char msg[(cond) ? 1 : -1]