aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/s390/crypto
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/s390/crypto')
-rw-r--r--drivers/s390/crypto/zcrypt_debug.h12
1 files changed, 3 insertions, 9 deletions
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 */
15static 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, \