]> git.proxmox.com Git - mirror_ubuntu-focal-kernel.git/blob - drivers/s390/crypto/zcrypt_debug.h
Input: wm97xx: add new AC97 bus support
[mirror_ubuntu-focal-kernel.git] / drivers / s390 / crypto / zcrypt_debug.h
1 /*
2 * Copyright IBM Corp. 2016
3 * Author(s): Holger Dengler (hd@linux.vnet.ibm.com)
4 * Harald Freudenberger <freude@de.ibm.com>
5 */
6 #ifndef ZCRYPT_DEBUG_H
7 #define ZCRYPT_DEBUG_H
8
9 #include <asm/debug.h>
10
11 #define DBF_ERR 3 /* error conditions */
12 #define DBF_WARN 4 /* warning conditions */
13 #define DBF_INFO 5 /* informational */
14 #define DBF_DEBUG 6 /* for debugging only */
15
16 #define RC2ERR(rc) ((rc) ? DBF_ERR : DBF_INFO)
17 #define RC2WARN(rc) ((rc) ? DBF_WARN : DBF_INFO)
18
19 #define DBF_MAX_SPRINTF_ARGS 5
20
21 #define ZCRYPT_DBF(...) \
22 debug_sprintf_event(zcrypt_dbf_info, ##__VA_ARGS__)
23
24 extern debug_info_t *zcrypt_dbf_info;
25
26 int zcrypt_debug_init(void);
27 void zcrypt_debug_exit(void);
28
29 #endif /* ZCRYPT_DEBUG_H */