From: Sascha Hauer <s.hauer@pengutronix.de>
To: Barebox List <barebox@lists.infradead.org>
Subject: [PATCH] tee: drivers: rksecure: improve logging
Date: Fri, 20 Mar 2026 14:57:44 +0100 [thread overview]
Message-ID: <20260320135744.3624480-1-s.hauer@pengutronix.de> (raw)
Add a pr_fmt string to give error messages more context. Also we have
"invoke func failed with" message three times in the code, make them
unique.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
drivers/tee/optee/rksecure.c | 11 ++++++++---
1 file changed, 8 insertions(+), 3 deletions(-)
diff --git a/drivers/tee/optee/rksecure.c b/drivers/tee/optee/rksecure.c
index e16f5c0882..06179d7841 100644
--- a/drivers/tee/optee/rksecure.c
+++ b/drivers/tee/optee/rksecure.c
@@ -3,6 +3,8 @@
* Copyright (C) Pengutronix, Michael Tretter <m.tretter@pengutronix.de>
*/
+#define pr_fmt(fmt) "rk-secure: " fmt
+
#include <linux/tee_drv.h>
#include <linux/uuid.h>
#include <linux/array_size.h>
@@ -86,7 +88,8 @@ int rk_secure_boot_get_info(struct rk_secure_boot_info *out)
if (res)
goto out;
if (inv_arg.ret) {
- pr_err("invoke func failed with 0x%08x\n", inv_arg.ret);
+ pr_err("invoke func PTA_RK_SECURE_BOOT_GET_INFO failed with 0x%08x\n",
+ inv_arg.ret);
res = -EIO;
}
@@ -147,7 +150,8 @@ int rk_secure_boot_burn_hash(const u8 *hash, u32 key_size_bits)
if (res)
goto out;
if (inv_arg.ret) {
- pr_err("invoke func failed with 0x%08x\n", inv_arg.ret);
+ pr_err("invoke func PTA_RK_SECURE_BOOT_BURN_HASH failed with 0x%08x\n",
+ inv_arg.ret);
res = -EIO;
}
@@ -184,7 +188,8 @@ int rk_secure_boot_lockdown_device(void)
if (res)
goto close_session;
if (inv_arg.ret) {
- pr_err("invoke func failed with 0x%08x\n", inv_arg.ret);
+ pr_err("invoke func PTA_RK_SECURE_BOOT_LOCKDOWN_DEVICE failed with 0x%08x\n",
+ inv_arg.ret);
res = -EIO;
}
--
2.47.3
reply other threads:[~2026-03-20 13:58 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=20260320135744.3624480-1-s.hauer@pengutronix.de \
--to=s.hauer@pengutronix.de \
--cc=barebox@lists.infradead.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