diff options
Diffstat (limited to 'drivers/s390/net')
-rw-r--r-- | drivers/s390/net/claw.h | 8 | ||||
-rw-r--r-- | drivers/s390/net/ctcm_dbug.c | 2 | ||||
-rw-r--r-- | drivers/s390/net/lcs.h | 8 | ||||
-rw-r--r-- | drivers/s390/net/netiucv.c | 8 | ||||
-rw-r--r-- | drivers/s390/net/qeth_core_main.c | 2 |
5 files changed, 5 insertions, 23 deletions
diff --git a/drivers/s390/net/claw.h b/drivers/s390/net/claw.h index 1bc5904df19f..3339b9b607b3 100644 --- a/drivers/s390/net/claw.h +++ b/drivers/s390/net/claw.h | |||
@@ -114,15 +114,9 @@ do { \ | |||
114 | debug_event(claw_dbf_##name,level,(void*)(addr),len); \ | 114 | debug_event(claw_dbf_##name,level,(void*)(addr),len); \ |
115 | } while (0) | 115 | } while (0) |
116 | 116 | ||
117 | /* Allow to sort out low debug levels early to avoid wasted sprints */ | ||
118 | static inline int claw_dbf_passes(debug_info_t *dbf_grp, int level) | ||
119 | { | ||
120 | return (level <= dbf_grp->level); | ||
121 | } | ||
122 | |||
123 | #define CLAW_DBF_TEXT_(level,name,text...) \ | 117 | #define CLAW_DBF_TEXT_(level,name,text...) \ |
124 | do { \ | 118 | do { \ |
125 | if (claw_dbf_passes(claw_dbf_##name, level)) { \ | 119 | if (debug_level_enabled(claw_dbf_##name, level)) { \ |
126 | sprintf(debug_buffer, text); \ | 120 | sprintf(debug_buffer, text); \ |
127 | debug_text_event(claw_dbf_##name, level, \ | 121 | debug_text_event(claw_dbf_##name, level, \ |
128 | debug_buffer); \ | 122 | debug_buffer); \ |
diff --git a/drivers/s390/net/ctcm_dbug.c b/drivers/s390/net/ctcm_dbug.c index 6514e1cb3f1c..8363f1c966ef 100644 --- a/drivers/s390/net/ctcm_dbug.c +++ b/drivers/s390/net/ctcm_dbug.c | |||
@@ -66,7 +66,7 @@ void ctcm_dbf_longtext(enum ctcm_dbf_names dbf_nix, int level, char *fmt, ...) | |||
66 | char dbf_txt_buf[64]; | 66 | char dbf_txt_buf[64]; |
67 | va_list args; | 67 | va_list args; |
68 | 68 | ||
69 | if (level > (ctcm_dbf[dbf_nix].id)->level) | 69 | if (!debug_level_enabled(ctcm_dbf[dbf_nix].id, level)) |
70 | return; | 70 | return; |
71 | va_start(args, fmt); | 71 | va_start(args, fmt); |
72 | vsnprintf(dbf_txt_buf, sizeof(dbf_txt_buf), fmt, args); | 72 | vsnprintf(dbf_txt_buf, sizeof(dbf_txt_buf), fmt, args); |
diff --git a/drivers/s390/net/lcs.h b/drivers/s390/net/lcs.h index 8c03392ac833..150fcb4cebc3 100644 --- a/drivers/s390/net/lcs.h +++ b/drivers/s390/net/lcs.h | |||
@@ -16,15 +16,9 @@ do { \ | |||
16 | debug_event(lcs_dbf_##name,level,(void*)(addr),len); \ | 16 | debug_event(lcs_dbf_##name,level,(void*)(addr),len); \ |
17 | } while (0) | 17 | } while (0) |
18 | 18 | ||
19 | /* Allow to sort out low debug levels early to avoid wasted sprints */ | ||
20 | static inline int lcs_dbf_passes(debug_info_t *dbf_grp, int level) | ||
21 | { | ||
22 | return (level <= dbf_grp->level); | ||
23 | } | ||
24 | |||
25 | #define LCS_DBF_TEXT_(level,name,text...) \ | 19 | #define LCS_DBF_TEXT_(level,name,text...) \ |
26 | do { \ | 20 | do { \ |
27 | if (lcs_dbf_passes(lcs_dbf_##name, level)) { \ | 21 | if (debug_level_enabled(lcs_dbf_##name, level)) { \ |
28 | sprintf(debug_buffer, text); \ | 22 | sprintf(debug_buffer, text); \ |
29 | debug_text_event(lcs_dbf_##name, level, debug_buffer); \ | 23 | debug_text_event(lcs_dbf_##name, level, debug_buffer); \ |
30 | } \ | 24 | } \ |
diff --git a/drivers/s390/net/netiucv.c b/drivers/s390/net/netiucv.c index 279ad504ec3c..9b333fcf1a4c 100644 --- a/drivers/s390/net/netiucv.c +++ b/drivers/s390/net/netiucv.c | |||
@@ -105,15 +105,9 @@ MODULE_DESCRIPTION ("Linux for S/390 IUCV network driver"); | |||
105 | 105 | ||
106 | DECLARE_PER_CPU(char[256], iucv_dbf_txt_buf); | 106 | DECLARE_PER_CPU(char[256], iucv_dbf_txt_buf); |
107 | 107 | ||
108 | /* Allow to sort out low debug levels early to avoid wasted sprints */ | ||
109 | static inline int iucv_dbf_passes(debug_info_t *dbf_grp, int level) | ||
110 | { | ||
111 | return (level <= dbf_grp->level); | ||
112 | } | ||
113 | |||
114 | #define IUCV_DBF_TEXT_(name, level, text...) \ | 108 | #define IUCV_DBF_TEXT_(name, level, text...) \ |
115 | do { \ | 109 | do { \ |
116 | if (iucv_dbf_passes(iucv_dbf_##name, level)) { \ | 110 | if (debug_level_enabled(iucv_dbf_##name, level)) { \ |
117 | char* __buf = get_cpu_var(iucv_dbf_txt_buf); \ | 111 | char* __buf = get_cpu_var(iucv_dbf_txt_buf); \ |
118 | sprintf(__buf, text); \ | 112 | sprintf(__buf, text); \ |
119 | debug_text_event(iucv_dbf_##name, level, __buf); \ | 113 | debug_text_event(iucv_dbf_##name, level, __buf); \ |
diff --git a/drivers/s390/net/qeth_core_main.c b/drivers/s390/net/qeth_core_main.c index 0a328d0d11be..d7b66a28fe75 100644 --- a/drivers/s390/net/qeth_core_main.c +++ b/drivers/s390/net/qeth_core_main.c | |||
@@ -5096,7 +5096,7 @@ void qeth_dbf_longtext(debug_info_t *id, int level, char *fmt, ...) | |||
5096 | char dbf_txt_buf[32]; | 5096 | char dbf_txt_buf[32]; |
5097 | va_list args; | 5097 | va_list args; |
5098 | 5098 | ||
5099 | if (level > id->level) | 5099 | if (!debug_level_enabled(id, level)) |
5100 | return; | 5100 | return; |
5101 | va_start(args, fmt); | 5101 | va_start(args, fmt); |
5102 | vsnprintf(dbf_txt_buf, sizeof(dbf_txt_buf), fmt, args); | 5102 | vsnprintf(dbf_txt_buf, sizeof(dbf_txt_buf), fmt, args); |