public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] tools/bootconfig: Fix the wrong format specifier
@ 2024-11-05  1:10 Luo Yifan
  2024-11-19  1:25 ` Masami Hiramatsu
  0 siblings, 1 reply; 4+ messages in thread
From: Luo Yifan @ 2024-11-05  1:10 UTC (permalink / raw)
  To: mhiramat; +Cc: linux-kernel, linux-trace-kernel, trivial, Luo Yifan

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

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




^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] tools/bootconfig: Fix the wrong format specifier
  2024-11-05  1:10 [PATCH] tools/bootconfig: Fix the wrong format specifier Luo Yifan
@ 2024-11-19  1:25 ` Masami Hiramatsu
  2025-01-24 15:06   ` Steven Rostedt
  0 siblings, 1 reply; 4+ messages in thread
From: Masami Hiramatsu @ 2024-11-19  1:25 UTC (permalink / raw)
  To: Luo Yifan; +Cc: linux-kernel, linux-trace-kernel, trivial

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>

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] tools/bootconfig: Fix the wrong format specifier
  2024-11-19  1:25 ` Masami Hiramatsu
@ 2025-01-24 15:06   ` Steven Rostedt
  2025-01-28  4:58     ` Masami Hiramatsu
  0 siblings, 1 reply; 4+ messages in thread
From: Steven Rostedt @ 2025-01-24 15:06 UTC (permalink / raw)
  To: Masami Hiramatsu (Google)
  Cc: Luo Yifan, linux-kernel, linux-trace-kernel, trivial

On Tue, 19 Nov 2024 10:25:49 +0900
Masami Hiramatsu (Google) <mhiramat@kernel.org> wrote:

> 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.

Hi Masami,

This is still in patchwork and I don't see it applied to Linus's tree. Did
you forget about it?

-- Steve

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] tools/bootconfig: Fix the wrong format specifier
  2025-01-24 15:06   ` Steven Rostedt
@ 2025-01-28  4:58     ` Masami Hiramatsu
  0 siblings, 0 replies; 4+ messages in thread
From: Masami Hiramatsu @ 2025-01-28  4:58 UTC (permalink / raw)
  To: Steven Rostedt; +Cc: Luo Yifan, linux-kernel, linux-trace-kernel, trivial

On Fri, 24 Jan 2025 10:06:27 -0500
Steven Rostedt <rostedt@goodmis.org> wrote:

> On Tue, 19 Nov 2024 10:25:49 +0900
> Masami Hiramatsu (Google) <mhiramat@kernel.org> wrote:
> 
> > 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.
> 
> Hi Masami,
> 
> This is still in patchwork and I don't see it applied to Linus's tree. Did
> you forget about it?

Oops, thanks for ping me.

Let me make a PR.

Thank you!

> 
> -- Steve


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

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2025-01-28  4:59 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-11-05  1:10 [PATCH] tools/bootconfig: Fix the wrong format specifier Luo Yifan
2024-11-19  1:25 ` Masami Hiramatsu
2025-01-24 15:06   ` Steven Rostedt
2025-01-28  4:58     ` Masami Hiramatsu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox