diff --git a/devicemodel/hw/platform/tpm/tpm.c b/devicemodel/hw/platform/tpm/tpm.c index cbd1e7a48..c7515116a 100644 --- a/devicemodel/hw/platform/tpm/tpm.c +++ b/devicemodel/hw/platform/tpm/tpm.c @@ -13,13 +13,14 @@ #include "vmmapi.h" #include "tpm.h" #include "tpm_internal.h" +#include "log.h" static int tpm_debug; #define LOG_TAG "tpm: " #define DPRINTF(fmt, args...) \ - do { if (tpm_debug) printf(LOG_TAG "%s:" fmt, __func__, ##args); } while (0) + do { if (tpm_debug) pr_dbg(LOG_TAG "%s:" fmt, __func__, ##args); } while (0) #define WPRINTF(fmt, args...) \ - do { printf(LOG_TAG "%s:" fmt, __func__, ##args); } while (0) + do { pr_err(LOG_TAG "%s:" fmt, __func__, ##args); } while (0) #define STR_MAX_LEN 1024U static char *sock_path = NULL; diff --git a/devicemodel/hw/platform/tpm/tpm_crb.c b/devicemodel/hw/platform/tpm/tpm_crb.c index e37705211..2b22e070e 100644 --- a/devicemodel/hw/platform/tpm/tpm_crb.c +++ b/devicemodel/hw/platform/tpm/tpm_crb.c @@ -17,13 +17,14 @@ #include "mem.h" #include "tpm.h" #include "tpm_internal.h" +#include "log.h" static int tpm_crb_debug; #define LOG_TAG "tpm_crb: " #define DPRINTF(fmt, args...) \ - do { if (tpm_crb_debug) printf(LOG_TAG "%s: " fmt, __func__, ##args); } while (0) + do { if (tpm_crb_debug) pr_dbg(LOG_TAG "%s: " fmt, __func__, ##args); } while (0) #define WPRINTF(fmt, args...) \ - do { printf(LOG_TAG "%s: " fmt, __func__, ##args); } while (0) + do { pr_err(LOG_TAG "%s: " fmt, __func__, ##args); } while (0) #define __packed __attribute__((packed))