mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] perf dlfilter: dlfilter-show-cycles: Fix types for print format
@ 2022-09-05  7:42 Adrian Hunter
  2022-09-05  7:44 ` Adrian Hunter
  0 siblings, 1 reply; 2+ messages in thread
From: Adrian Hunter @ 2022-09-05  7:42 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo
  Cc: Jiri Olsa, Namhyung Kim, Ian Rogers, linux-kernel

Avoid compiler warning about format %llu that expects long long unsigned
int but argument has type __u64.

Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
---
 tools/perf/dlfilters/dlfilter-show-cycles.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/tools/perf/dlfilters/dlfilter-show-cycles.c b/tools/perf/dlfilters/dlfilter-show-cycles.c
index 9eccc97bff82..6d47298ebe9f 100644
--- a/tools/perf/dlfilters/dlfilter-show-cycles.c
+++ b/tools/perf/dlfilters/dlfilter-show-cycles.c
@@ -98,9 +98,9 @@ int filter_event_early(void *data, const struct perf_dlfilter_sample *sample, vo
 static void print_vals(__u64 cycles, __u64 delta)
 {
 	if (delta)
-		printf("%10llu %10llu ", cycles, delta);
+		printf("%10llu %10llu ", (unsigned long long)cycles, (unsigned long long)delta);
 	else
-		printf("%10llu %10s ", cycles, "");
+		printf("%10llu %10s ", (unsigned long long)cycles, "");
 }
 
 int filter_event(void *data, const struct perf_dlfilter_sample *sample, void *ctx)
-- 
2.25.1


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

* Re: [PATCH] perf dlfilter: dlfilter-show-cycles: Fix types for print format
  2022-09-05  7:42 [PATCH] perf dlfilter: dlfilter-show-cycles: Fix types for print format Adrian Hunter
@ 2022-09-05  7:44 ` Adrian Hunter
  0 siblings, 0 replies; 2+ messages in thread
From: Adrian Hunter @ 2022-09-05  7:44 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo
  Cc: Jiri Olsa, Namhyung Kim, Ian Rogers, linux-kernel

On 5/09/22 10:42, Adrian Hunter wrote:
> Avoid compiler warning about format %llu that expects long long unsigned
> int but argument has type __u64.
> 

Fixes: c3afd6e50fce ("perf dlfilter: Add dlfilter-show-cycles")

> Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
> ---
>  tools/perf/dlfilters/dlfilter-show-cycles.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/tools/perf/dlfilters/dlfilter-show-cycles.c b/tools/perf/dlfilters/dlfilter-show-cycles.c
> index 9eccc97bff82..6d47298ebe9f 100644
> --- a/tools/perf/dlfilters/dlfilter-show-cycles.c
> +++ b/tools/perf/dlfilters/dlfilter-show-cycles.c
> @@ -98,9 +98,9 @@ int filter_event_early(void *data, const struct perf_dlfilter_sample *sample, vo
>  static void print_vals(__u64 cycles, __u64 delta)
>  {
>  	if (delta)
> -		printf("%10llu %10llu ", cycles, delta);
> +		printf("%10llu %10llu ", (unsigned long long)cycles, (unsigned long long)delta);
>  	else
> -		printf("%10llu %10s ", cycles, "");
> +		printf("%10llu %10s ", (unsigned long long)cycles, "");
>  }
>  
>  int filter_event(void *data, const struct perf_dlfilter_sample *sample, void *ctx)


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

end of thread, other threads:[~2022-09-05  7:44 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-09-05  7:42 [PATCH] perf dlfilter: dlfilter-show-cycles: Fix types for print format Adrian Hunter
2022-09-05  7:44 ` Adrian Hunter

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®