From: Jarkko Sakkinen <jarkko@kernel.org>
To: linux-integrity@vger.kernel.org
Cc: Jason Gunthorpe <jgg@nvidia.com>,
Jarkko Sakkinen <jarkko@kernel.org>,
linux-kernel@vger.kernel.org
Subject: [PATCH] tpm: Redefine pr_fmt
Date: Thu, 8 Jun 2023 17:20:52 +0300 [thread overview]
Message-ID: <20230608142052.45287-1-jarkko@kernel.org> (raw)
Redefine pr_fmt inside internal include, following the pattern from
arch/x86/kernel/cpu/sgx.h.
Signed-off-by: Jarkko Sakkinen <jarkko@kernel.org>
---
drivers/char/tpm/tpm-interface.c | 4 ++--
drivers/char/tpm/tpm.h | 4 ++++
2 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/drivers/char/tpm/tpm-interface.c b/drivers/char/tpm/tpm-interface.c
index 586ca10b0d72..0689e5f3b4c0 100644
--- a/drivers/char/tpm/tpm-interface.c
+++ b/drivers/char/tpm/tpm-interface.c
@@ -493,13 +493,13 @@ static int __init tpm_init(void)
rc = alloc_chrdev_region(&tpm_devt, 0, 2*TPM_NUM_DEVICES, "tpm");
if (rc < 0) {
- pr_err("tpm: failed to allocate char dev region\n");
+ pr_err("failed to allocate char dev region\n");
goto out_destroy_tpmrm_class;
}
rc = tpm_dev_common_init();
if (rc) {
- pr_err("tpm: failed to allocate char dev region\n");
+ pr_err("failed to allocate char dev region\n");
goto out_unreg_chrdev;
}
diff --git a/drivers/char/tpm/tpm.h b/drivers/char/tpm/tpm.h
index 460bb85dd142..13733474a235 100644
--- a/drivers/char/tpm/tpm.h
+++ b/drivers/char/tpm/tpm.h
@@ -27,6 +27,10 @@
#include <linux/tpm.h>
#include <linux/tpm_eventlog.h>
+
+#undef pr_fmt
+#define pr_fmt(fmt) "tpm: " fmt
+
#ifdef CONFIG_X86
#include <asm/intel-family.h>
#endif
--
2.39.2
reply other threads:[~2023-06-08 14:21 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230608142052.45287-1-jarkko@kernel.org \
--to=jarkko@kernel.org \
--cc=jgg@nvidia.com \
--cc=linux-integrity@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).