* [PATCH] perf: fix two warning in bench/numa
@ 2013-09-22 8:49 Wei Yang
2013-09-25 7:35 ` Wei Yang
` (2 more replies)
0 siblings, 3 replies; 6+ messages in thread
From: Wei Yang @ 2013-09-22 8:49 UTC (permalink / raw)
To: linux-kernel, acme, mingo; +Cc: Wei Yang
There two warnings in bench/numa, when buiding this on 32-bit machine.
The warning output is attached:
bench/numa.c:1113:20: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare]
bench/numa.c:1161:6: error: format ‘%lx’ expects argument of t'long unsigned int’, but argument 5 has type ‘u64’ [-Werror=format]
This patch fixs these two warnings.
Signed-off-by: Wei Yang <weiyang@linux.vnet.ibm.com>
---
tools/perf/bench/numa.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/tools/perf/bench/numa.c b/tools/perf/bench/numa.c
index 30d1c32..a73c4ed 100644
--- a/tools/perf/bench/numa.c
+++ b/tools/perf/bench/numa.c
@@ -1110,7 +1110,7 @@ static void *worker_thread(void *__tdata)
/* Check whether our max runtime timed out: */
if (g->p.nr_secs) {
timersub(&stop, &start0, &diff);
- if (diff.tv_sec >= g->p.nr_secs) {
+ if (diff.tv_sec >= (time_t)g->p.nr_secs) {
g->stop_work = true;
break;
}
@@ -1157,7 +1157,7 @@ static void *worker_thread(void *__tdata)
runtime_ns_max += diff.tv_usec * 1000;
if (details >= 0) {
- printf(" #%2d / %2d: %14.2lf nsecs/op [val: %016lx]\n",
+ printf(" #%2d / %2d: %14.2lf nsecs/op [val: %016"PRIu64"]\n",
process_nr, thread_nr, runtime_ns_max / bytes_done, val);
}
fflush(stdout);
--
1.7.5.4
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH] perf: fix two warning in bench/numa
2013-09-22 8:49 [PATCH] perf: fix two warning in bench/numa Wei Yang
@ 2013-09-25 7:35 ` Wei Yang
2013-09-25 11:26 ` Ingo Molnar
2013-10-30 3:18 ` Wei Yang
2013-11-04 6:54 ` [tip:perf/core] perf bench: Fix two warnings tip-bot for Wei Yang
2 siblings, 1 reply; 6+ messages in thread
From: Wei Yang @ 2013-09-25 7:35 UTC (permalink / raw)
To: linux-kernel, acme, mingo; +Cc: Wei Yang
Hi, all
Any comments on this one?
These two warnings will break the compile of perf under 32-bit machine.
On Sun, Sep 22, 2013 at 04:49:24PM +0800, Wei Yang wrote:
>There two warnings in bench/numa, when buiding this on 32-bit machine.
>
>The warning output is attached:
>
>bench/numa.c:1113:20: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare]
>bench/numa.c:1161:6: error: format '%lx' expects argument of type 'long unsigned int', but argument 5 has type 'u64' [-Werror=format]
>
>This patch fixs these two warnings.
>
>Signed-off-by: Wei Yang <weiyang@linux.vnet.ibm.com>
>---
> tools/perf/bench/numa.c | 4 ++--
> 1 files changed, 2 insertions(+), 2 deletions(-)
>
>diff --git a/tools/perf/bench/numa.c b/tools/perf/bench/numa.c
>index 30d1c32..a73c4ed 100644
>--- a/tools/perf/bench/numa.c
>+++ b/tools/perf/bench/numa.c
>@@ -1110,7 +1110,7 @@ static void *worker_thread(void *__tdata)
> /* Check whether our max runtime timed out: */
> if (g->p.nr_secs) {
> timersub(&stop, &start0, &diff);
>- if (diff.tv_sec >= g->p.nr_secs) {
>+ if (diff.tv_sec >= (time_t)g->p.nr_secs) {
> g->stop_work = true;
> break;
> }
>@@ -1157,7 +1157,7 @@ static void *worker_thread(void *__tdata)
> runtime_ns_max += diff.tv_usec * 1000;
>
> if (details >= 0) {
>- printf(" #%2d / %2d: %14.2lf nsecs/op [val: %016lx]\n",
>+ printf(" #%2d / %2d: %14.2lf nsecs/op [val: %016"PRIu64"]\n",
> process_nr, thread_nr, runtime_ns_max / bytes_done, val);
> }
> fflush(stdout);
>--
>1.7.5.4
--
Richard Yang
Help you, Help me
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] perf: fix two warning in bench/numa
2013-09-25 7:35 ` Wei Yang
@ 2013-09-25 11:26 ` Ingo Molnar
2013-09-26 1:16 ` Wei Yang
0 siblings, 1 reply; 6+ messages in thread
From: Ingo Molnar @ 2013-09-25 11:26 UTC (permalink / raw)
To: Wei Yang; +Cc: linux-kernel, acme, mingo
* Wei Yang <weiyang@linux.vnet.ibm.com> wrote:
> Hi, all
>
> Any comments on this one?
>
> These two warnings will break the compile of perf under 32-bit machine.
fix looks good to me.
> >- if (diff.tv_sec >= g->p.nr_secs) {
> >+ if (diff.tv_sec >= (time_t)g->p.nr_secs) {
> >- printf(" #%2d / %2d: %14.2lf nsecs/op [val: %016lx]\n",
> >+ printf(" #%2d / %2d: %14.2lf nsecs/op [val: %016"PRIu64"]\n",
Acked-by: Ingo Molnar <mingo@kernel.org>
Thanks,
Ingo
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] perf: fix two warning in bench/numa
2013-09-25 11:26 ` Ingo Molnar
@ 2013-09-26 1:16 ` Wei Yang
0 siblings, 0 replies; 6+ messages in thread
From: Wei Yang @ 2013-09-26 1:16 UTC (permalink / raw)
To: Ingo Molnar; +Cc: Wei Yang, linux-kernel, acme, mingo
On Wed, Sep 25, 2013 at 01:26:29PM +0200, Ingo Molnar wrote:
>
>* Wei Yang <weiyang@linux.vnet.ibm.com> wrote:
>
>> Hi, all
>>
>> Any comments on this one?
>>
>> These two warnings will break the compile of perf under 32-bit machine.
>
>fix looks good to me.
Thanks for your comments :-)
>
>> >- if (diff.tv_sec >= g->p.nr_secs) {
>> >+ if (diff.tv_sec >= (time_t)g->p.nr_secs) {
>
>> >- printf(" #%2d / %2d: %14.2lf nsecs/op [val: %016lx]\n",
>> >+ printf(" #%2d / %2d: %14.2lf nsecs/op [val: %016"PRIu64"]\n",
>
>Acked-by: Ingo Molnar <mingo@kernel.org>
>
>Thanks,
>
> Ingo
--
Richard Yang
Help you, Help me
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] perf: fix two warning in bench/numa
2013-09-22 8:49 [PATCH] perf: fix two warning in bench/numa Wei Yang
2013-09-25 7:35 ` Wei Yang
@ 2013-10-30 3:18 ` Wei Yang
2013-11-04 6:54 ` [tip:perf/core] perf bench: Fix two warnings tip-bot for Wei Yang
2 siblings, 0 replies; 6+ messages in thread
From: Wei Yang @ 2013-10-30 3:18 UTC (permalink / raw)
To: linux-kernel, acme, mingo; +Cc: weiyang
Dear maintainer,
Is this one accepted or droped?
Or I missed the right person?
On Sun, Sep 22, 2013 at 04:49:24PM +0800, Wei Yang wrote:
>There two warnings in bench/numa, when buiding this on 32-bit machine.
>
>The warning output is attached:
>
>bench/numa.c:1113:20: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare]
>bench/numa.c:1161:6: error: format ‘%lx’ expects argument of t'long unsigned int’, but argument 5 has type ‘u64’ [-Werror=format]
>
>This patch fixs these two warnings.
>
>Signed-off-by: Wei Yang <weiyang@linux.vnet.ibm.com>
>---
> tools/perf/bench/numa.c | 4 ++--
> 1 files changed, 2 insertions(+), 2 deletions(-)
>
>diff --git a/tools/perf/bench/numa.c b/tools/perf/bench/numa.c
>index 30d1c32..a73c4ed 100644
>--- a/tools/perf/bench/numa.c
>+++ b/tools/perf/bench/numa.c
>@@ -1110,7 +1110,7 @@ static void *worker_thread(void *__tdata)
> /* Check whether our max runtime timed out: */
> if (g->p.nr_secs) {
> timersub(&stop, &start0, &diff);
>- if (diff.tv_sec >= g->p.nr_secs) {
>+ if (diff.tv_sec >= (time_t)g->p.nr_secs) {
> g->stop_work = true;
> break;
> }
>@@ -1157,7 +1157,7 @@ static void *worker_thread(void *__tdata)
> runtime_ns_max += diff.tv_usec * 1000;
>
> if (details >= 0) {
>- printf(" #%2d / %2d: %14.2lf nsecs/op [val: %016lx]\n",
>+ printf(" #%2d / %2d: %14.2lf nsecs/op [val: %016"PRIu64"]\n",
> process_nr, thread_nr, runtime_ns_max / bytes_done, val);
> }
> fflush(stdout);
>--
>1.7.5.4
--
Richard Yang
Help you, Help me
^ permalink raw reply [flat|nested] 6+ messages in thread
* [tip:perf/core] perf bench: Fix two warnings
2013-09-22 8:49 [PATCH] perf: fix two warning in bench/numa Wei Yang
2013-09-25 7:35 ` Wei Yang
2013-10-30 3:18 ` Wei Yang
@ 2013-11-04 6:54 ` tip-bot for Wei Yang
2 siblings, 0 replies; 6+ messages in thread
From: tip-bot for Wei Yang @ 2013-11-04 6:54 UTC (permalink / raw)
To: linux-tip-commits; +Cc: acme, linux-kernel, mingo, hpa, mingo, weiyang, tglx
Commit-ID: 32bf5bd181026fc99c0e15045abe409167285ba8
Gitweb: http://git.kernel.org/tip/32bf5bd181026fc99c0e15045abe409167285ba8
Author: Wei Yang <weiyang@linux.vnet.ibm.com>
AuthorDate: Sun, 22 Sep 2013 16:49:24 +0800
Committer: Arnaldo Carvalho de Melo <acme@redhat.com>
CommitDate: Fri, 1 Nov 2013 10:41:54 -0300
perf bench: Fix two warnings
There are two warnings in bench/numa, when building this on 32-bit
machine.
The warning output is attached:
bench/numa.c:1113:20: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare]
bench/numa.c:1161:6: error: format ‘%lx’ expects argument of t'long unsigned int’, but argument 5 has type ‘u64’ [-Werror=format]
This patch fixes these two warnings.
Signed-off-by: Wei Yang <weiyang@linux.vnet.ibm.com>
Acked-by: Ingo Molnar <mingo@kernel.org>
Cc: Ingo Molnar <mingo@redhat.com>
Link: http://lkml.kernel.org/r/1379839764-9245-1-git-send-email-weiyang@linux.vnet.ibm.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
tools/perf/bench/numa.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/tools/perf/bench/numa.c b/tools/perf/bench/numa.c
index 30d1c32..a73c4ed 100644
--- a/tools/perf/bench/numa.c
+++ b/tools/perf/bench/numa.c
@@ -1110,7 +1110,7 @@ static void *worker_thread(void *__tdata)
/* Check whether our max runtime timed out: */
if (g->p.nr_secs) {
timersub(&stop, &start0, &diff);
- if (diff.tv_sec >= g->p.nr_secs) {
+ if (diff.tv_sec >= (time_t)g->p.nr_secs) {
g->stop_work = true;
break;
}
@@ -1157,7 +1157,7 @@ static void *worker_thread(void *__tdata)
runtime_ns_max += diff.tv_usec * 1000;
if (details >= 0) {
- printf(" #%2d / %2d: %14.2lf nsecs/op [val: %016lx]\n",
+ printf(" #%2d / %2d: %14.2lf nsecs/op [val: %016"PRIu64"]\n",
process_nr, thread_nr, runtime_ns_max / bytes_done, val);
}
fflush(stdout);
^ permalink raw reply related [flat|nested] 6+ messages in thread
end of thread, other threads:[~2013-11-04 6:55 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-09-22 8:49 [PATCH] perf: fix two warning in bench/numa Wei Yang
2013-09-25 7:35 ` Wei Yang
2013-09-25 11:26 ` Ingo Molnar
2013-09-26 1:16 ` Wei Yang
2013-10-30 3:18 ` Wei Yang
2013-11-04 6:54 ` [tip:perf/core] perf bench: Fix two warnings tip-bot for Wei Yang
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).