diff options
-rw-r--r-- | drivers/s390/block/scm_blk.h | 2 | ||||
-rw-r--r-- | drivers/s390/cio/eadm_sch.c | 2 | ||||
-rw-r--r-- | drivers/s390/cio/qdio_debug.h | 8 | ||||
-rw-r--r-- | drivers/s390/crypto/zcrypt_debug.h | 12 | ||||
-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 | ||||
-rw-r--r-- | drivers/s390/scsi/zfcp_dbf.h | 4 |
10 files changed, 13 insertions, 43 deletions
diff --git a/drivers/s390/block/scm_blk.h b/drivers/s390/block/scm_blk.h index 8b387b32fd62..e59331e6c2e5 100644 --- a/drivers/s390/block/scm_blk.h +++ b/drivers/s390/block/scm_blk.h | |||
@@ -107,7 +107,7 @@ extern debug_info_t *scm_debug; | |||
107 | 107 | ||
108 | static inline void SCM_LOG_HEX(int level, void *data, int length) | 108 | static inline void SCM_LOG_HEX(int level, void *data, int length) |
109 | { | 109 | { |
110 | if (level > scm_debug->level) | 110 | if (!debug_level_enabled(scm_debug, level)) |
111 | return; | 111 | return; |
112 | while (length > 0) { | 112 | while (length > 0) { |
113 | debug_event(scm_debug, level, data, length); | 113 | debug_event(scm_debug, level, data, length); |
diff --git a/drivers/s390/cio/eadm_sch.c b/drivers/s390/cio/eadm_sch.c index d9eddcba7e88..6b54d8a05cd4 100644 --- a/drivers/s390/cio/eadm_sch.c +++ b/drivers/s390/cio/eadm_sch.c | |||
@@ -42,7 +42,7 @@ static debug_info_t *eadm_debug; | |||
42 | 42 | ||
43 | static void EADM_LOG_HEX(int level, void *data, int length) | 43 | static void EADM_LOG_HEX(int level, void *data, int length) |
44 | { | 44 | { |
45 | if (level > eadm_debug->level) | 45 | if (!debug_level_enabled(eadm_debug, level)) |
46 | return; | 46 | return; |
47 | while (length > 0) { | 47 | while (length > 0) { |
48 | debug_event(eadm_debug, level, data, length); | 48 | debug_event(eadm_debug, level, data, length); |
diff --git a/drivers/s390/cio/qdio_debug.h b/drivers/s390/cio/qdio_debug.h index 647b422bb22a..dfac9bfefea3 100644 --- a/drivers/s390/cio/qdio_debug.h +++ b/drivers/s390/cio/qdio_debug.h | |||
@@ -16,12 +16,6 @@ | |||
16 | extern debug_info_t *qdio_dbf_setup; | 16 | extern debug_info_t *qdio_dbf_setup; |
17 | extern debug_info_t *qdio_dbf_error; | 17 | extern debug_info_t *qdio_dbf_error; |
18 | 18 | ||
19 | /* sort out low debug levels early to avoid wasted sprints */ | ||
20 | static inline int qdio_dbf_passes(debug_info_t *dbf_grp, int level) | ||
21 | { | ||
22 | return (level <= dbf_grp->level); | ||
23 | } | ||
24 | |||
25 | #define DBF_ERR 3 /* error conditions */ | 19 | #define DBF_ERR 3 /* error conditions */ |
26 | #define DBF_WARN 4 /* warning conditions */ | 20 | #define DBF_WARN 4 /* warning conditions */ |
27 | #define DBF_INFO 6 /* informational */ | 21 | #define DBF_INFO 6 /* informational */ |
@@ -65,7 +59,7 @@ static inline void DBF_ERROR_HEX(void *addr, int len) | |||
65 | #define DBF_DEV_EVENT(level, device, text...) \ | 59 | #define DBF_DEV_EVENT(level, device, text...) \ |
66 | do { \ | 60 | do { \ |
67 | char debug_buffer[QDIO_DBF_LEN]; \ | 61 | char debug_buffer[QDIO_DBF_LEN]; \ |
68 | if (qdio_dbf_passes(device->debug_area, level)) { \ | 62 | if (debug_level_enabled(device->debug_area, level)) { \ |
69 | snprintf(debug_buffer, QDIO_DBF_LEN, text); \ | 63 | snprintf(debug_buffer, QDIO_DBF_LEN, text); \ |
70 | debug_text_event(device->debug_area, level, debug_buffer); \ | 64 | debug_text_event(device->debug_area, level, debug_buffer); \ |
71 | } \ | 65 | } \ |
diff --git a/drivers/s390/crypto/zcrypt_debug.h b/drivers/s390/crypto/zcrypt_debug.h index 841ea72e4a4e..28d9349de1ad 100644 --- a/drivers/s390/crypto/zcrypt_debug.h +++ b/drivers/s390/crypto/zcrypt_debug.h | |||
@@ -11,12 +11,6 @@ | |||
11 | /* that gives us 15 characters in the text event views */ | 11 | /* that gives us 15 characters in the text event views */ |
12 | #define ZCRYPT_DBF_LEN 16 | 12 | #define ZCRYPT_DBF_LEN 16 |
13 | 13 | ||
14 | /* sort out low debug levels early to avoid wasted sprints */ | ||
15 | static inline int zcrypt_dbf_passes(debug_info_t *dbf_grp, int level) | ||
16 | { | ||
17 | return (level <= dbf_grp->level); | ||
18 | } | ||
19 | |||
20 | #define DBF_ERR 3 /* error conditions */ | 14 | #define DBF_ERR 3 /* error conditions */ |
21 | #define DBF_WARN 4 /* warning conditions */ | 15 | #define DBF_WARN 4 /* warning conditions */ |
22 | #define DBF_INFO 6 /* informational */ | 16 | #define DBF_INFO 6 /* informational */ |
@@ -25,7 +19,7 @@ static inline int zcrypt_dbf_passes(debug_info_t *dbf_grp, int level) | |||
25 | 19 | ||
26 | #define ZCRYPT_DBF_COMMON(level, text...) \ | 20 | #define ZCRYPT_DBF_COMMON(level, text...) \ |
27 | do { \ | 21 | do { \ |
28 | if (zcrypt_dbf_passes(zcrypt_dbf_common, level)) { \ | 22 | if (debug_level_enabled(zcrypt_dbf_common, level)) { \ |
29 | char debug_buffer[ZCRYPT_DBF_LEN]; \ | 23 | char debug_buffer[ZCRYPT_DBF_LEN]; \ |
30 | snprintf(debug_buffer, ZCRYPT_DBF_LEN, text); \ | 24 | snprintf(debug_buffer, ZCRYPT_DBF_LEN, text); \ |
31 | debug_text_event(zcrypt_dbf_common, level, \ | 25 | debug_text_event(zcrypt_dbf_common, level, \ |
@@ -35,7 +29,7 @@ static inline int zcrypt_dbf_passes(debug_info_t *dbf_grp, int level) | |||
35 | 29 | ||
36 | #define ZCRYPT_DBF_DEVICES(level, text...) \ | 30 | #define ZCRYPT_DBF_DEVICES(level, text...) \ |
37 | do { \ | 31 | do { \ |
38 | if (zcrypt_dbf_passes(zcrypt_dbf_devices, level)) { \ | 32 | if (debug_level_enabled(zcrypt_dbf_devices, level)) { \ |
39 | char debug_buffer[ZCRYPT_DBF_LEN]; \ | 33 | char debug_buffer[ZCRYPT_DBF_LEN]; \ |
40 | snprintf(debug_buffer, ZCRYPT_DBF_LEN, text); \ | 34 | snprintf(debug_buffer, ZCRYPT_DBF_LEN, text); \ |
41 | debug_text_event(zcrypt_dbf_devices, level, \ | 35 | debug_text_event(zcrypt_dbf_devices, level, \ |
@@ -45,7 +39,7 @@ static inline int zcrypt_dbf_passes(debug_info_t *dbf_grp, int level) | |||
45 | 39 | ||
46 | #define ZCRYPT_DBF_DEV(level, device, text...) \ | 40 | #define ZCRYPT_DBF_DEV(level, device, text...) \ |
47 | do { \ | 41 | do { \ |
48 | if (zcrypt_dbf_passes(device->dbf_area, level)) { \ | 42 | if (debug_level_enabled(device->dbf_area, level)) { \ |
49 | char debug_buffer[ZCRYPT_DBF_LEN]; \ | 43 | char debug_buffer[ZCRYPT_DBF_LEN]; \ |
50 | snprintf(debug_buffer, ZCRYPT_DBF_LEN, text); \ | 44 | snprintf(debug_buffer, ZCRYPT_DBF_LEN, text); \ |
51 | debug_text_event(device->dbf_area, level, \ | 45 | debug_text_event(device->dbf_area, level, \ |
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); |
diff --git a/drivers/s390/scsi/zfcp_dbf.h b/drivers/s390/scsi/zfcp_dbf.h index 3ac7a4b30dd9..0be3d48681ae 100644 --- a/drivers/s390/scsi/zfcp_dbf.h +++ b/drivers/s390/scsi/zfcp_dbf.h | |||
@@ -278,7 +278,7 @@ struct zfcp_dbf { | |||
278 | static inline | 278 | static inline |
279 | void zfcp_dbf_hba_fsf_resp(char *tag, int level, struct zfcp_fsf_req *req) | 279 | void zfcp_dbf_hba_fsf_resp(char *tag, int level, struct zfcp_fsf_req *req) |
280 | { | 280 | { |
281 | if (level <= req->adapter->dbf->hba->level) | 281 | if (debug_level_enabled(req->adapter->dbf->hba, level)) |
282 | zfcp_dbf_hba_fsf_res(tag, req); | 282 | zfcp_dbf_hba_fsf_res(tag, req); |
283 | } | 283 | } |
284 | 284 | ||
@@ -317,7 +317,7 @@ void _zfcp_dbf_scsi(char *tag, int level, struct scsi_cmnd *scmd, | |||
317 | struct zfcp_adapter *adapter = (struct zfcp_adapter *) | 317 | struct zfcp_adapter *adapter = (struct zfcp_adapter *) |
318 | scmd->device->host->hostdata[0]; | 318 | scmd->device->host->hostdata[0]; |
319 | 319 | ||
320 | if (level <= adapter->dbf->scsi->level) | 320 | if (debug_level_enabled(adapter->dbf->scsi, level)) |
321 | zfcp_dbf_scsi(tag, scmd, req); | 321 | zfcp_dbf_scsi(tag, scmd, req); |
322 | } | 322 | } |
323 | 323 | ||