All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] perf tools: Fix building in 32 bit platform
@ 2016-09-28  3:58 Wang Nan
  2016-09-28 13:39 ` Arnaldo Carvalho de Melo
  2016-09-29 18:11 ` [tip:perf/core] perf data: Fix building in 32 bit platform with libbabeltrace tip-bot for Wang Nan
  0 siblings, 2 replies; 3+ messages in thread
From: Wang Nan @ 2016-09-28  3:58 UTC (permalink / raw)
  To: acme
  Cc: lizefan, linux-kernel, pi3orama, Wang Nan,
	Arnaldo Carvalho de Melo, Jiri Olsa

On ARM32 building it report following error:

util/data-convert-bt.c: In function 'add_bpf_output_values':
util/data-convert-bt.c:440:3: error: format '%lu' expects argument of type 'long unsigned int', but argument 5 has type 'unsigned int' [-Werror=format]
cc1: all warnings being treated as errors

Fix it by changing %lu to %zu.

Signed-off-by: Wang Nan <wangnan0@huawei.com>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Jiri Olsa <jolsa@kernel.org>
---
 tools/perf/util/data-convert-bt.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/perf/util/data-convert-bt.c b/tools/perf/util/data-convert-bt.c
index 4f979bb..7123f4d 100644
--- a/tools/perf/util/data-convert-bt.c
+++ b/tools/perf/util/data-convert-bt.c
@@ -437,7 +437,7 @@ add_bpf_output_values(struct bt_ctf_event_class *event_class,
 	int ret;
 
 	if (nr_elements * sizeof(u32) != raw_size)
-		pr_warning("Incorrect raw_size (%u) in bpf output event, skip %lu bytes\n",
+		pr_warning("Incorrect raw_size (%u) in bpf output event, skip %zu bytes\n",
 			   raw_size, nr_elements * sizeof(u32) - raw_size);
 
 	len_type = bt_ctf_event_class_get_field_by_name(event_class, "raw_len");
-- 
1.8.3.4

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

* Re: [PATCH] perf tools: Fix building in 32 bit platform
  2016-09-28  3:58 [PATCH] perf tools: Fix building in 32 bit platform Wang Nan
@ 2016-09-28 13:39 ` Arnaldo Carvalho de Melo
  2016-09-29 18:11 ` [tip:perf/core] perf data: Fix building in 32 bit platform with libbabeltrace tip-bot for Wang Nan
  1 sibling, 0 replies; 3+ messages in thread
From: Arnaldo Carvalho de Melo @ 2016-09-28 13:39 UTC (permalink / raw)
  To: Wang Nan
  Cc: lizefan, linux-kernel, pi3orama, Arnaldo Carvalho de Melo, Jiri Olsa

Em Wed, Sep 28, 2016 at 03:58:46AM +0000, Wang Nan escreveu:
> On ARM32 building it report following error:
> 
> util/data-convert-bt.c: In function 'add_bpf_output_values':
> util/data-convert-bt.c:440:3: error: format '%lu' expects argument of type 'long unsigned int', but argument 5 has type 'unsigned int' [-Werror=format]
> cc1: all warnings being treated as errors
> 
> Fix it by changing %lu to %zu.

Thanks, applied.

- Arnaldo
 
> Signed-off-by: Wang Nan <wangnan0@huawei.com>
> Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
> Cc: Jiri Olsa <jolsa@kernel.org>
> ---
>  tools/perf/util/data-convert-bt.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/tools/perf/util/data-convert-bt.c b/tools/perf/util/data-convert-bt.c
> index 4f979bb..7123f4d 100644
> --- a/tools/perf/util/data-convert-bt.c
> +++ b/tools/perf/util/data-convert-bt.c
> @@ -437,7 +437,7 @@ add_bpf_output_values(struct bt_ctf_event_class *event_class,
>  	int ret;
>  
>  	if (nr_elements * sizeof(u32) != raw_size)
> -		pr_warning("Incorrect raw_size (%u) in bpf output event, skip %lu bytes\n",
> +		pr_warning("Incorrect raw_size (%u) in bpf output event, skip %zu bytes\n",
>  			   raw_size, nr_elements * sizeof(u32) - raw_size);
>  
>  	len_type = bt_ctf_event_class_get_field_by_name(event_class, "raw_len");
> -- 
> 1.8.3.4

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

* [tip:perf/core] perf data: Fix building in 32 bit platform with libbabeltrace
  2016-09-28  3:58 [PATCH] perf tools: Fix building in 32 bit platform Wang Nan
  2016-09-28 13:39 ` Arnaldo Carvalho de Melo
@ 2016-09-29 18:11 ` tip-bot for Wang Nan
  1 sibling, 0 replies; 3+ messages in thread
From: tip-bot for Wang Nan @ 2016-09-29 18:11 UTC (permalink / raw)
  To: linux-tip-commits
  Cc: wangnan0, lizefan, hpa, mingo, acme, jolsa, tglx, linux-kernel

Commit-ID:  f2c8852e6e990fcab0d9e68de9d86e5fbea0b5dc
Gitweb:     http://git.kernel.org/tip/f2c8852e6e990fcab0d9e68de9d86e5fbea0b5dc
Author:     Wang Nan <wangnan0@huawei.com>
AuthorDate: Wed, 28 Sep 2016 03:58:46 +0000
Committer:  Arnaldo Carvalho de Melo <acme@redhat.com>
CommitDate: Wed, 28 Sep 2016 10:38:20 -0300

perf data: Fix building in 32 bit platform with libbabeltrace

On ARM32 building it report following error when we build with
libbabeltrace:

  util/data-convert-bt.c: In function 'add_bpf_output_values':
  util/data-convert-bt.c:440:3: error: format '%lu' expects argument of type 'long unsigned int', but argument 5 has type 'unsigned int' [-Werror=format]
  cc1: all warnings being treated as errors

Fix it by changing %lu to %zu.

Signed-off-by: Wang Nan <wangnan0@huawei.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Zefan Li <lizefan@huawei.com>
Cc: pi3orama@163.com
Fixes: 6122d57e9f7c ("perf data: Support converting data from bpf_perf_event_output()")
Link: http://lkml.kernel.org/r/1475035126-146587-1-git-send-email-wangnan0@huawei.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 tools/perf/util/data-convert-bt.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/perf/util/data-convert-bt.c b/tools/perf/util/data-convert-bt.c
index 4f979bb..7123f4d 100644
--- a/tools/perf/util/data-convert-bt.c
+++ b/tools/perf/util/data-convert-bt.c
@@ -437,7 +437,7 @@ add_bpf_output_values(struct bt_ctf_event_class *event_class,
 	int ret;
 
 	if (nr_elements * sizeof(u32) != raw_size)
-		pr_warning("Incorrect raw_size (%u) in bpf output event, skip %lu bytes\n",
+		pr_warning("Incorrect raw_size (%u) in bpf output event, skip %zu bytes\n",
 			   raw_size, nr_elements * sizeof(u32) - raw_size);
 
 	len_type = bt_ctf_event_class_get_field_by_name(event_class, "raw_len");

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

end of thread, other threads:[~2016-09-29 18:11 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-09-28  3:58 [PATCH] perf tools: Fix building in 32 bit platform Wang Nan
2016-09-28 13:39 ` Arnaldo Carvalho de Melo
2016-09-29 18:11 ` [tip:perf/core] perf data: Fix building in 32 bit platform with libbabeltrace tip-bot for Wang Nan

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.