public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Masami Hiramatsu (Google) <mhiramat@kernel.org>
To: Luo Yifan <luoyifan@cmss.chinamobile.com>
Cc: linux-kernel@vger.kernel.org, linux-trace-kernel@vger.kernel.org,
	trivial@kernel.org
Subject: Re: [PATCH] tools/bootconfig: Fix the wrong format specifier
Date: Tue, 19 Nov 2024 10:25:49 +0900	[thread overview]
Message-ID: <20241119102549.5da4d2c1cdbb7514014cd273@kernel.org> (raw)
In-Reply-To: <20241105011048.201629-1-luoyifan@cmss.chinamobile.com>

Hi Luo,

On Tue,  5 Nov 2024 09:10:48 +0800
Luo Yifan <luoyifan@cmss.chinamobile.com> wrote:

> Use '%u' instead of '%d' for unsigned int.

Good catch, thanks for the fix!
Let me pick.

> 
> Signed-off-by: Luo Yifan <luoyifan@cmss.chinamobile.com>
> ---
>  tools/bootconfig/main.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/tools/bootconfig/main.c b/tools/bootconfig/main.c
> index 156b62a16..8a48cc253 100644
> --- a/tools/bootconfig/main.c
> +++ b/tools/bootconfig/main.c
> @@ -226,7 +226,7 @@ static int load_xbc_from_initrd(int fd, char **buf)
>  	/* Wrong Checksum */
>  	rcsum = xbc_calc_checksum(*buf, size);
>  	if (csum != rcsum) {
> -		pr_err("checksum error: %d != %d\n", csum, rcsum);
> +		pr_err("checksum error: %u != %u\n", csum, rcsum);
>  		return -EINVAL;
>  	}
>  
> @@ -395,7 +395,7 @@ static int apply_xbc(const char *path, const char *xbc_path)
>  	xbc_get_info(&ret, NULL);
>  	printf("\tNumber of nodes: %d\n", ret);
>  	printf("\tSize: %u bytes\n", (unsigned int)size);
> -	printf("\tChecksum: %d\n", (unsigned int)csum);
> +	printf("\tChecksum: %u\n", (unsigned int)csum);
>  
>  	/* TODO: Check the options by schema */
>  	xbc_exit();
> -- 
> 2.27.0
> 
> 
> 


-- 
Masami Hiramatsu (Google) <mhiramat@kernel.org>

  reply	other threads:[~2024-11-19  1:25 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-11-05  1:10 [PATCH] tools/bootconfig: Fix the wrong format specifier Luo Yifan
2024-11-19  1:25 ` Masami Hiramatsu [this message]
2025-01-24 15:06   ` Steven Rostedt
2025-01-28  4:58     ` Masami Hiramatsu

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=20241119102549.5da4d2c1cdbb7514014cd273@kernel.org \
    --to=mhiramat@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-trace-kernel@vger.kernel.org \
    --cc=luoyifan@cmss.chinamobile.com \
    --cc=trivial@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