Commit 602bab1b authored by David Ahern's avatar David Ahern Committed by Arnaldo Carvalho de Melo

perf tools: Fix compile of util/tsc.c

On Fedora 18, with gcc 4.6.4 compile fails with:

arch/x86/util/tsc.c: In function ‘perf_time_to_tsc’:
arch/x86/util/tsc.c:13:6: error: declaration of ‘time’ shadows a global declaration [-Werror=shadow]
cc1: all warnings being treated as errors
make: *** [/tmp/junk/arch/x86/util/tsc.o] Error 1
make: *** Waiting for unfinished jobs....

Fix by renaming the local variable.
Signed-off-by: default avatarDavid Ahern <dsahern@gmail.com>
Cc: Adrian Hunter <adrian.hunter@intel.com>
Link: http://lkml.kernel.org/r/1374848843-43127-1-git-send-email-dsahern@gmail.comSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
parent 251f426f
...@@ -10,11 +10,11 @@ ...@@ -10,11 +10,11 @@
u64 perf_time_to_tsc(u64 ns, struct perf_tsc_conversion *tc) u64 perf_time_to_tsc(u64 ns, struct perf_tsc_conversion *tc)
{ {
u64 time, quot, rem; u64 t, quot, rem;
time = ns - tc->time_zero; t = ns - tc->time_zero;
quot = time / tc->time_mult; quot = t / tc->time_mult;
rem = time % tc->time_mult; rem = t % tc->time_mult;
return (quot << tc->time_shift) + return (quot << tc->time_shift) +
(rem << tc->time_shift) / tc->time_mult; (rem << tc->time_shift) / tc->time_mult;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment