summaryrefslogtreecommitdiff
path: root/drivers/s390/cio/cio_debug.h
diff options
context:
space:
mode:
authorCornelia Huck <cornelia.huck@de.ibm.com>2008-01-26 14:10:42 +0100
committerMartin Schwidefsky <schwidefsky@de.ibm.com>2008-01-26 14:10:59 +0100
commitbc698bcf8897363732226dc9ecba044771679996 (patch)
tree769fcbd9de54e56dd6559cd8760b526a733a51c1 /drivers/s390/cio/cio_debug.h
parent25b7bb5838ab81b68a9de72df577103d8b4aba3c (diff)
[S390] cio: Cleanup debug feature usage.
Cleanup cio_debug.h. Also make CIO_DEBUG add the "cio:" prefix to the printk string so that it isn't needed for the debug feature. Fix outdated comments for cio_debug_init() and clean it up. Enlarge cio_crw to the same size as cio_msg so we may actually find some relevant information there. Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'drivers/s390/cio/cio_debug.h')
-rw-r--r--drivers/s390/cio/cio_debug.h22
1 files changed, 11 insertions, 11 deletions
diff --git a/drivers/s390/cio/cio_debug.h b/drivers/s390/cio/cio_debug.h
index c9bf8989930f..d7429ef6c666 100644
--- a/drivers/s390/cio/cio_debug.h
+++ b/drivers/s390/cio/cio_debug.h
@@ -8,20 +8,19 @@ extern debug_info_t *cio_debug_msg_id;
extern debug_info_t *cio_debug_trace_id;
extern debug_info_t *cio_debug_crw_id;
-#define CIO_TRACE_EVENT(imp, txt) do { \
+#define CIO_TRACE_EVENT(imp, txt) do { \
debug_text_event(cio_debug_trace_id, imp, txt); \
} while (0)
-#define CIO_MSG_EVENT(imp, args...) do { \
- debug_sprintf_event(cio_debug_msg_id, imp , ##args); \
+#define CIO_MSG_EVENT(imp, args...) do { \
+ debug_sprintf_event(cio_debug_msg_id, imp , ##args); \
} while (0)
-#define CIO_CRW_EVENT(imp, args...) do { \
- debug_sprintf_event(cio_debug_crw_id, imp , ##args); \
+#define CIO_CRW_EVENT(imp, args...) do { \
+ debug_sprintf_event(cio_debug_crw_id, imp , ##args); \
} while (0)
-static inline void
-CIO_HEX_EVENT(int level, void *data, int length)
+static inline void CIO_HEX_EVENT(int level, void *data, int length)
{
if (unlikely(!cio_debug_trace_id))
return;
@@ -32,9 +31,10 @@ CIO_HEX_EVENT(int level, void *data, int length)
}
}
-#define CIO_DEBUG(printk_level,event_level,msg...) ({ \
- if (cio_show_msg) printk(printk_level msg); \
- CIO_MSG_EVENT (event_level, msg); \
-})
+#define CIO_DEBUG(printk_level, event_level, msg...) do { \
+ if (cio_show_msg) \
+ printk(printk_level "cio: " msg); \
+ CIO_MSG_EVENT(event_level, msg); \
+ } while (0)
#endif