* [PATCH] optee: fix format string for printing optee build_id
@ 2024-11-29 11:46 Sahil Malhotra
2024-11-29 12:58 ` Jerome Forissier
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Sahil Malhotra @ 2024-11-29 11:46 UTC (permalink / raw)
To: Jens Wiklander, Jerome Forissier, op-tee, linux-kernel
Cc: Sahil Malhotra, Varun Sethi, Peng Fan, Aisheng Dong
There has been a recent change in OP-TEE to print 8 and 16 character
commit id for 32bit and 64bit architecture respectively.
In case if commit id is starting with 0 like 04d1c612ec7beaede073b8c
it is printing revision as below removing leading 0
"optee: revision 4.4 (4d1c612ec7beaed)"
Signed-off-by: Sahil Malhotra <sahil.malhotra@nxp.com>
---
drivers/tee/optee/smc_abi.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/drivers/tee/optee/smc_abi.c b/drivers/tee/optee/smc_abi.c
index e9456e3e74cc..eb51dc18f32d 100644
--- a/drivers/tee/optee/smc_abi.c
+++ b/drivers/tee/optee/smc_abi.c
@@ -1272,8 +1272,9 @@ static void optee_msg_get_os_revision(optee_invoke_fn *invoke_fn)
&res.smccc);
if (res.result.build_id)
- pr_info("revision %lu.%lu (%08lx)", res.result.major,
- res.result.minor, res.result.build_id);
+ pr_info("revision %lu.%lu (%0*lx)", res.result.major,
+ res.result.minor, (int)sizeof(res.result.build_id) * 2,
+ res.result.build_id);
else
pr_info("revision %lu.%lu", res.result.major, res.result.minor);
}
--
2.34.1
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] optee: fix format string for printing optee build_id
2024-11-29 11:46 [PATCH] optee: fix format string for printing optee build_id Sahil Malhotra
@ 2024-11-29 12:58 ` Jerome Forissier
2024-12-03 6:08 ` Sumit Garg
2024-12-17 21:06 ` Jens Wiklander
2 siblings, 0 replies; 4+ messages in thread
From: Jerome Forissier @ 2024-11-29 12:58 UTC (permalink / raw)
To: Sahil Malhotra, Jens Wiklander, op-tee, linux-kernel
Cc: Varun Sethi, Peng Fan, Aisheng Dong
On 11/29/24 12:46, Sahil Malhotra wrote:
> There has been a recent change in OP-TEE to print 8 and 16 character
> commit id for 32bit and 64bit architecture respectively.
> In case if commit id is starting with 0 like 04d1c612ec7beaede073b8c
> it is printing revision as below removing leading 0
> "optee: revision 4.4 (4d1c612ec7beaed)"
>
> Signed-off-by: Sahil Malhotra <sahil.malhotra@nxp.com>
> ---
> drivers/tee/optee/smc_abi.c | 5 +++--
> 1 file changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/tee/optee/smc_abi.c b/drivers/tee/optee/smc_abi.c
> index e9456e3e74cc..eb51dc18f32d 100644
> --- a/drivers/tee/optee/smc_abi.c
> +++ b/drivers/tee/optee/smc_abi.c
> @@ -1272,8 +1272,9 @@ static void optee_msg_get_os_revision(optee_invoke_fn *invoke_fn)
> &res.smccc);
>
> if (res.result.build_id)
> - pr_info("revision %lu.%lu (%08lx)", res.result.major,
> - res.result.minor, res.result.build_id);
> + pr_info("revision %lu.%lu (%0*lx)", res.result.major,
> + res.result.minor, (int)sizeof(res.result.build_id) * 2,
> + res.result.build_id);
> else
> pr_info("revision %lu.%lu", res.result.major, res.result.minor);
> }
Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org>
Thanks,
--
Jerome
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] optee: fix format string for printing optee build_id
2024-11-29 11:46 [PATCH] optee: fix format string for printing optee build_id Sahil Malhotra
2024-11-29 12:58 ` Jerome Forissier
@ 2024-12-03 6:08 ` Sumit Garg
2024-12-17 21:06 ` Jens Wiklander
2 siblings, 0 replies; 4+ messages in thread
From: Sumit Garg @ 2024-12-03 6:08 UTC (permalink / raw)
To: Sahil Malhotra
Cc: Jens Wiklander, Jerome Forissier, op-tee, linux-kernel,
Varun Sethi, Aisheng Dong
On Fri, 29 Nov 2024 at 17:17, Sahil Malhotra <sahil.malhotra@nxp.com> wrote:
>
> There has been a recent change in OP-TEE to print 8 and 16 character
> commit id for 32bit and 64bit architecture respectively.
> In case if commit id is starting with 0 like 04d1c612ec7beaede073b8c
> it is printing revision as below removing leading 0
> "optee: revision 4.4 (4d1c612ec7beaed)"
>
> Signed-off-by: Sahil Malhotra <sahil.malhotra@nxp.com>
> ---
> drivers/tee/optee/smc_abi.c | 5 +++--
> 1 file changed, 3 insertions(+), 2 deletions(-)
>
Reviewed-by: Sumit Garg <sumit.garg@linaro.org>
-Sumit
> diff --git a/drivers/tee/optee/smc_abi.c b/drivers/tee/optee/smc_abi.c
> index e9456e3e74cc..eb51dc18f32d 100644
> --- a/drivers/tee/optee/smc_abi.c
> +++ b/drivers/tee/optee/smc_abi.c
> @@ -1272,8 +1272,9 @@ static void optee_msg_get_os_revision(optee_invoke_fn *invoke_fn)
> &res.smccc);
>
> if (res.result.build_id)
> - pr_info("revision %lu.%lu (%08lx)", res.result.major,
> - res.result.minor, res.result.build_id);
> + pr_info("revision %lu.%lu (%0*lx)", res.result.major,
> + res.result.minor, (int)sizeof(res.result.build_id) * 2,
> + res.result.build_id);
> else
> pr_info("revision %lu.%lu", res.result.major, res.result.minor);
> }
> --
> 2.34.1
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] optee: fix format string for printing optee build_id
2024-11-29 11:46 [PATCH] optee: fix format string for printing optee build_id Sahil Malhotra
2024-11-29 12:58 ` Jerome Forissier
2024-12-03 6:08 ` Sumit Garg
@ 2024-12-17 21:06 ` Jens Wiklander
2 siblings, 0 replies; 4+ messages in thread
From: Jens Wiklander @ 2024-12-17 21:06 UTC (permalink / raw)
To: Sahil Malhotra
Cc: Jerome Forissier, op-tee, linux-kernel, Varun Sethi, Peng Fan,
Aisheng Dong, Sumit Garg
Hi Sahil,
On Fri, Nov 29, 2024 at 12:46 PM Sahil Malhotra <sahil.malhotra@nxp.com> wrote:
>
> There has been a recent change in OP-TEE to print 8 and 16 character
> commit id for 32bit and 64bit architecture respectively.
> In case if commit id is starting with 0 like 04d1c612ec7beaede073b8c
> it is printing revision as below removing leading 0
> "optee: revision 4.4 (4d1c612ec7beaed)"
>
> Signed-off-by: Sahil Malhotra <sahil.malhotra@nxp.com>
> ---
> drivers/tee/optee/smc_abi.c | 5 +++--
> 1 file changed, 3 insertions(+), 2 deletions(-)
I'm picking up this.
Thanks,
Jens
>
> diff --git a/drivers/tee/optee/smc_abi.c b/drivers/tee/optee/smc_abi.c
> index e9456e3e74cc..eb51dc18f32d 100644
> --- a/drivers/tee/optee/smc_abi.c
> +++ b/drivers/tee/optee/smc_abi.c
> @@ -1272,8 +1272,9 @@ static void optee_msg_get_os_revision(optee_invoke_fn *invoke_fn)
> &res.smccc);
>
> if (res.result.build_id)
> - pr_info("revision %lu.%lu (%08lx)", res.result.major,
> - res.result.minor, res.result.build_id);
> + pr_info("revision %lu.%lu (%0*lx)", res.result.major,
> + res.result.minor, (int)sizeof(res.result.build_id) * 2,
> + res.result.build_id);
> else
> pr_info("revision %lu.%lu", res.result.major, res.result.minor);
> }
> --
> 2.34.1
>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2024-12-17 21:06 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-11-29 11:46 [PATCH] optee: fix format string for printing optee build_id Sahil Malhotra
2024-11-29 12:58 ` Jerome Forissier
2024-12-03 6:08 ` Sumit Garg
2024-12-17 21:06 ` Jens Wiklander
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®