[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20091213.235622.53363059.davem@davemloft.net>
Date: Sun, 13 Dec 2009 23:56:22 -0800 (PST)
From: David Miller <davem@...emloft.net>
To: mingo@...e.hu
CC: linux-kernel@...r.kernel.org
Subject: [PATCH]: Fix perf build failure on sparc
Here, tvec->tv_usec is "unsigned int" not "unsigned long".
Since the type is different on every platform, it's probably best to
just use long printf formats and cast.
Signed-off-by: David S. Miller <davem@...emloft.net>
diff --git a/tools/perf/bench/sched-messaging.c b/tools/perf/bench/sched-messaging.c
index 605a2a9..2953ac3 100644
--- a/tools/perf/bench/sched-messaging.c
+++ b/tools/perf/bench/sched-messaging.c
@@ -320,10 +320,12 @@ int bench_sched_messaging(int argc, const char **argv,
num_groups, num_groups * 2 * num_fds,
thread_mode ? "threads" : "processes");
printf(" %14s: %lu.%03lu [sec]\n", "Total time",
- diff.tv_sec, diff.tv_usec/1000);
+ diff.tv_sec,
+ (unsigned long) (diff.tv_usec/1000));
break;
case BENCH_FORMAT_SIMPLE:
- printf("%lu.%03lu\n", diff.tv_sec, diff.tv_usec/1000);
+ printf("%lu.%03lu\n", diff.tv_sec,
+ (unsigned long) (diff.tv_usec/1000));
break;
default:
/* reaching here is something disaster */
diff --git a/tools/perf/bench/sched-pipe.c b/tools/perf/bench/sched-pipe.c
index 238185f..89c31d3 100644
--- a/tools/perf/bench/sched-pipe.c
+++ b/tools/perf/bench/sched-pipe.c
@@ -99,7 +99,8 @@ int bench_sched_pipe(int argc, const char **argv,
result_usec += diff.tv_usec;
printf(" %14s: %lu.%03lu [sec]\n\n", "Total time",
- diff.tv_sec, diff.tv_usec/1000);
+ diff.tv_sec,
+ (unsigned long) (diff.tv_usec/1000));
printf(" %14lf usecs/op\n",
(double)result_usec / (double)loops);
@@ -110,7 +111,8 @@ int bench_sched_pipe(int argc, const char **argv,
case BENCH_FORMAT_SIMPLE:
printf("%lu.%03lu\n",
- diff.tv_sec, diff.tv_usec / 1000);
+ diff.tv_sec,
+ (unsigned long) (diff.tv_usec / 1000));
break;
default:
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists