From: Wei Yang <weiyang@linux.vnet.ibm.com>
To: linux-kernel@vger.kernel.org, acme@ghostprotocols.net, mingo@redhat.com
Cc: Wei Yang <weiyang@linux.vnet.ibm.com>
Subject: [PATCH] perf: fix two warning in bench/numa
Date: Sun, 22 Sep 2013 16:49:24 +0800 [thread overview]
Message-ID: <1379839764-9245-1-git-send-email-weiyang@linux.vnet.ibm.com> (raw)
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
next reply other threads:[~2013-09-22 8:49 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-09-22 8:49 Wei Yang [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1379839764-9245-1-git-send-email-weiyang@linux.vnet.ibm.com \
--to=weiyang@linux.vnet.ibm.com \
--cc=acme@ghostprotocols.net \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome