• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /* SPDX-License-Identifier: GPL-2.0-or-later */
2 /*
3  * Copyright (c) 2023 Huawei Device Co., Ltd.
4  */
5 
6 #ifndef _XPM_LOG_H
7 #define _XPM_LOG_H
8 
9 #define XPM_TAG "xpm_kernel"
10 #define XPM_INFO_TAG  "I"
11 #define XPM_ERROR_TAG "E"
12 #define XPM_DEBUG_TAG "D"
13 
14 #define xpm_log_info(fmt, args...) pr_info("[%s/%s]%s: " fmt "\n", \
15 	XPM_INFO_TAG, XPM_TAG, __func__, ##args)
16 
17 #define xpm_log_error(fmt, args...) pr_err("[%s/%s]%s: " fmt "\n", \
18 	XPM_ERROR_TAG, XPM_TAG, __func__, ##args)
19 
20 #ifdef CONFIG_SECURITY_XPM_DEBUG
21 #define xpm_log_debug(fmt, args...) pr_info("[%s/%s]%s: " fmt "\n", \
22 	XPM_DEBUG_TAG, XPM_TAG, __func__, ##args)
23 #else
24 #define xpm_log_debug(fmt, args...) no_printk(fmt, ##args)
25 #endif
26 
27 #endif /* _XPM_LOG_H */
28