mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Jens Wiklander <jens.wiklander@linaro.org>
To: Sahil Malhotra <sahil.malhotra@nxp.com>
Cc: Jerome Forissier <jerome.forissier@linaro.org>,
	op-tee@lists.trustedfirmware.org,  linux-kernel@vger.kernel.org,
	Varun Sethi <V.Sethi@nxp.com>, Peng Fan <peng.fan@nxp.com>,
	 Aisheng Dong <aisheng.dong@nxp.com>,
	Sumit Garg <sumit.garg@linaro.org>
Subject: Re: [PATCH] optee: fix format string for printing optee build_id
Date: Tue, 17 Dec 2024 22:06:02 +0100	[thread overview]
Message-ID: <CAHUa44Gs8T+hxkmVr2ap-HKB9QHkPB14-O2S6BvLrkEhP-Rw9Q@mail.gmail.com> (raw)
In-Reply-To: <20241129114648.3048941-1-sahil.malhotra@nxp.com>

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
>

      parent reply	other threads:[~2024-12-17 21:06 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-11-29 11:46 Sahil Malhotra
2024-11-29 12:58 ` Jerome Forissier
2024-12-03  6:08 ` Sumit Garg
2024-12-17 21:06 ` Jens Wiklander [this message]

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=CAHUa44Gs8T+hxkmVr2ap-HKB9QHkPB14-O2S6BvLrkEhP-Rw9Q@mail.gmail.com \
    --to=jens.wiklander@linaro.org \
    --cc=V.Sethi@nxp.com \
    --cc=aisheng.dong@nxp.com \
    --cc=jerome.forissier@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=op-tee@lists.trustedfirmware.org \
    --cc=peng.fan@nxp.com \
    --cc=sahil.malhotra@nxp.com \
    --cc=sumit.garg@linaro.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

all inboxes | Powered by JetHome®