* [PATCH] tee: drivers: rksecure: improve logging
@ 2026-03-20 13:57 Sascha Hauer
2026-04-13 14:03 ` Ahmad Fatoum
2026-04-13 14:34 ` Sascha Hauer
0 siblings, 2 replies; 3+ messages in thread
From: Sascha Hauer @ 2026-03-20 13:57 UTC (permalink / raw)
To: Barebox List
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
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] tee: drivers: rksecure: improve logging
2026-03-20 13:57 [PATCH] tee: drivers: rksecure: improve logging Sascha Hauer
@ 2026-04-13 14:03 ` Ahmad Fatoum
2026-04-13 14:34 ` Sascha Hauer
1 sibling, 0 replies; 3+ messages in thread
From: Ahmad Fatoum @ 2026-04-13 14:03 UTC (permalink / raw)
To: Sascha Hauer, Barebox List
On 3/20/26 2:57 PM, Sascha Hauer wrote:
> 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>
Reviewed-by: Ahmad Fatoum <a.fatoum@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;
> }
>
--
Pengutronix e.K. | |
Steuerwalder Str. 21 | http://www.pengutronix.de/ |
31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] tee: drivers: rksecure: improve logging
2026-03-20 13:57 [PATCH] tee: drivers: rksecure: improve logging Sascha Hauer
2026-04-13 14:03 ` Ahmad Fatoum
@ 2026-04-13 14:34 ` Sascha Hauer
1 sibling, 0 replies; 3+ messages in thread
From: Sascha Hauer @ 2026-04-13 14:34 UTC (permalink / raw)
To: Barebox List, Sascha Hauer
On Fri, 20 Mar 2026 14:57:44 +0100, Sascha Hauer wrote:
> 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.
>
>
Applied, thanks!
[1/1] tee: drivers: rksecure: improve logging
https://git.pengutronix.de/cgit/barebox/commit/?id=bf43bf08dd24 (link may not be stable)
Best regards,
--
Sascha Hauer <s.hauer@pengutronix.de>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2026-04-13 14:35 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-03-20 13:57 [PATCH] tee: drivers: rksecure: improve logging Sascha Hauer
2026-04-13 14:03 ` Ahmad Fatoum
2026-04-13 14:34 ` Sascha Hauer
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox