linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] perf tools: Use %zd for size_t printf formats on 32b
@ 2020-08-20 21:25 Chris Wilson
  2020-08-21 12:13 ` Arnaldo Carvalho de Melo
  0 siblings, 1 reply; 3+ messages in thread
From: Chris Wilson @ 2020-08-20 21:25 UTC (permalink / raw)
  To: linux-kernel
  Cc: Chris Wilson, Peter Zijlstra, Ingo Molnar, Arnaldo Carvalho de Melo

A couple of trivial fixes for using %zd for size_t.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Ingo Molnar <mingo@redhat.com>
cc: Arnaldo Carvalho de Melo <acme@kernel.org>
---
 tools/perf/util/session.c | 2 +-
 tools/perf/util/zstd.c    | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/tools/perf/util/session.c b/tools/perf/util/session.c
index ffbc9d35a383..7a5f03764702 100644
--- a/tools/perf/util/session.c
+++ b/tools/perf/util/session.c
@@ -87,7 +87,7 @@ static int perf_session__process_compressed_event(struct perf_session *session,
 		session->decomp_last = decomp;
 	}
 
-	pr_debug("decomp (B): %ld to %ld\n", src_size, decomp_size);
+	pr_debug("decomp (B): %zd to %zd\n", src_size, decomp_size);
 
 	return 0;
 }
diff --git a/tools/perf/util/zstd.c b/tools/perf/util/zstd.c
index d2202392ffdb..48dd2b018c47 100644
--- a/tools/perf/util/zstd.c
+++ b/tools/perf/util/zstd.c
@@ -99,7 +99,7 @@ size_t zstd_decompress_stream(struct zstd_data *data, void *src, size_t src_size
 	while (input.pos < input.size) {
 		ret = ZSTD_decompressStream(data->dstream, &output, &input);
 		if (ZSTD_isError(ret)) {
-			pr_err("failed to decompress (B): %ld -> %ld, dst_size %ld : %s\n",
+			pr_err("failed to decompress (B): %zd -> %zd, dst_size %zd : %s\n",
 			       src_size, output.size, dst_size, ZSTD_getErrorName(ret));
 			break;
 		}
-- 
2.20.1


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

* Re: [PATCH] perf tools: Use %zd for size_t printf formats on 32b
  2020-08-20 21:25 [PATCH] perf tools: Use %zd for size_t printf formats on 32b Chris Wilson
@ 2020-08-21 12:13 ` Arnaldo Carvalho de Melo
  2020-08-26 11:50   ` Jiri Olsa
  0 siblings, 1 reply; 3+ messages in thread
From: Arnaldo Carvalho de Melo @ 2020-08-21 12:13 UTC (permalink / raw)
  To: Chris Wilson
  Cc: linux-kernel, Peter Zijlstra, Ingo Molnar, Jiri Olsa,
	Namhyung Kim, Alexey Budankov

Em Thu, Aug 20, 2020 at 10:25:01PM +0100, Chris Wilson escreveu:
> A couple of trivial fixes for using %zd for size_t.

Added Jiri and Namhyung, that are perf tooling reviewers, and Alexey
Budankov, that added the ZSTD code.

Applied,

- Arnaldo
 
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> Cc: Peter Zijlstra <peterz@infradead.org>
> Cc: Ingo Molnar <mingo@redhat.com>
> cc: Arnaldo Carvalho de Melo <acme@kernel.org>
> ---
>  tools/perf/util/session.c | 2 +-
>  tools/perf/util/zstd.c    | 2 +-
>  2 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/tools/perf/util/session.c b/tools/perf/util/session.c
> index ffbc9d35a383..7a5f03764702 100644
> --- a/tools/perf/util/session.c
> +++ b/tools/perf/util/session.c
> @@ -87,7 +87,7 @@ static int perf_session__process_compressed_event(struct perf_session *session,
>  		session->decomp_last = decomp;
>  	}
>  
> -	pr_debug("decomp (B): %ld to %ld\n", src_size, decomp_size);
> +	pr_debug("decomp (B): %zd to %zd\n", src_size, decomp_size);
>  
>  	return 0;
>  }
> diff --git a/tools/perf/util/zstd.c b/tools/perf/util/zstd.c
> index d2202392ffdb..48dd2b018c47 100644
> --- a/tools/perf/util/zstd.c
> +++ b/tools/perf/util/zstd.c
> @@ -99,7 +99,7 @@ size_t zstd_decompress_stream(struct zstd_data *data, void *src, size_t src_size
>  	while (input.pos < input.size) {
>  		ret = ZSTD_decompressStream(data->dstream, &output, &input);
>  		if (ZSTD_isError(ret)) {
> -			pr_err("failed to decompress (B): %ld -> %ld, dst_size %ld : %s\n",
> +			pr_err("failed to decompress (B): %zd -> %zd, dst_size %zd : %s\n",
>  			       src_size, output.size, dst_size, ZSTD_getErrorName(ret));
>  			break;
>  		}
> -- 
> 2.20.1
> 

-- 

- Arnaldo

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

* Re: [PATCH] perf tools: Use %zd for size_t printf formats on 32b
  2020-08-21 12:13 ` Arnaldo Carvalho de Melo
@ 2020-08-26 11:50   ` Jiri Olsa
  0 siblings, 0 replies; 3+ messages in thread
From: Jiri Olsa @ 2020-08-26 11:50 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo
  Cc: Chris Wilson, linux-kernel, Peter Zijlstra, Ingo Molnar,
	Jiri Olsa, Namhyung Kim, Alexey Budankov

On Fri, Aug 21, 2020 at 09:13:10AM -0300, Arnaldo Carvalho de Melo wrote:
> Em Thu, Aug 20, 2020 at 10:25:01PM +0100, Chris Wilson escreveu:
> > A couple of trivial fixes for using %zd for size_t.
> 
> Added Jiri and Namhyung, that are perf tooling reviewers, and Alexey
> Budankov, that added the ZSTD code.
> 
> Applied,
> 
> - Arnaldo
>  
> > Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> > Cc: Peter Zijlstra <peterz@infradead.org>
> > Cc: Ingo Molnar <mingo@redhat.com>
> > cc: Arnaldo Carvalho de Melo <acme@kernel.org>

LGTM

Acked-by: Jiri Olsa <jolsa@redhat.com>

thanks,
jirka

> > ---
> >  tools/perf/util/session.c | 2 +-
> >  tools/perf/util/zstd.c    | 2 +-
> >  2 files changed, 2 insertions(+), 2 deletions(-)
> > 
> > diff --git a/tools/perf/util/session.c b/tools/perf/util/session.c
> > index ffbc9d35a383..7a5f03764702 100644
> > --- a/tools/perf/util/session.c
> > +++ b/tools/perf/util/session.c
> > @@ -87,7 +87,7 @@ static int perf_session__process_compressed_event(struct perf_session *session,
> >  		session->decomp_last = decomp;
> >  	}
> >  
> > -	pr_debug("decomp (B): %ld to %ld\n", src_size, decomp_size);
> > +	pr_debug("decomp (B): %zd to %zd\n", src_size, decomp_size);
> >  
> >  	return 0;
> >  }
> > diff --git a/tools/perf/util/zstd.c b/tools/perf/util/zstd.c
> > index d2202392ffdb..48dd2b018c47 100644
> > --- a/tools/perf/util/zstd.c
> > +++ b/tools/perf/util/zstd.c
> > @@ -99,7 +99,7 @@ size_t zstd_decompress_stream(struct zstd_data *data, void *src, size_t src_size
> >  	while (input.pos < input.size) {
> >  		ret = ZSTD_decompressStream(data->dstream, &output, &input);
> >  		if (ZSTD_isError(ret)) {
> > -			pr_err("failed to decompress (B): %ld -> %ld, dst_size %ld : %s\n",
> > +			pr_err("failed to decompress (B): %zd -> %zd, dst_size %zd : %s\n",
> >  			       src_size, output.size, dst_size, ZSTD_getErrorName(ret));
> >  			break;
> >  		}
> > -- 
> > 2.20.1
> > 
> 
> -- 
> 
> - Arnaldo
> 


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

end of thread, other threads:[~2020-08-26 11:50 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-08-20 21:25 [PATCH] perf tools: Use %zd for size_t printf formats on 32b Chris Wilson
2020-08-21 12:13 ` Arnaldo Carvalho de Melo
2020-08-26 11:50   ` Jiri Olsa

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).