diff options
author | Paul Mackerras <paulus@samba.org> | 2009-06-15 07:36:52 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2009-06-15 10:12:25 -0400 |
commit | 90c8f954534ba15e4542ab00dd9f0e58b071518c (patch) | |
tree | 592114fc09ed6e1e4b833d3b28534ab6d874153f /arch | |
parent | 3dfabc74c65904c9e6cf952391312d16ea772ef5 (diff) |
perf_counter: powerpc: Fix two compile warnings
This fixes a couple of compile warnings that crept into the powerpc
perf_counter code recently:
CC arch/powerpc/kernel/perf_counter.o
arch/powerpc/kernel/perf_counter.c: In function 'record_and_restart':
arch/powerpc/kernel/perf_counter.c:1016: warning: unused variable 'addr'
arch/powerpc/kernel/perf_counter.c: In function 'hw_perf_counter_init':
arch/powerpc/kernel/perf_counter.c:891: warning: 'ev' may be used uninitialized in this function
Stephen Rothwell reported this against linux-next as well.
Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
LKML-Reference: <18998.12884.787039.22202@cargo.ozlabs.ibm.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/powerpc/kernel/perf_counter.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/arch/powerpc/kernel/perf_counter.c b/arch/powerpc/kernel/perf_counter.c index bb202388170..e6dc1850191 100644 --- a/arch/powerpc/kernel/perf_counter.c +++ b/arch/powerpc/kernel/perf_counter.c | |||
@@ -913,6 +913,8 @@ const struct pmu *hw_perf_counter_init(struct perf_counter *counter) | |||
913 | case PERF_TYPE_RAW: | 913 | case PERF_TYPE_RAW: |
914 | ev = counter->attr.config; | 914 | ev = counter->attr.config; |
915 | break; | 915 | break; |
916 | default: | ||
917 | return ERR_PTR(-EINVAL); | ||
916 | } | 918 | } |
917 | counter->hw.config_base = ev; | 919 | counter->hw.config_base = ev; |
918 | counter->hw.idx = 0; | 920 | counter->hw.idx = 0; |
@@ -1013,7 +1015,7 @@ static void record_and_restart(struct perf_counter *counter, long val, | |||
1013 | u64 period = counter->hw.sample_period; | 1015 | u64 period = counter->hw.sample_period; |
1014 | s64 prev, delta, left; | 1016 | s64 prev, delta, left; |
1015 | int record = 0; | 1017 | int record = 0; |
1016 | u64 addr, mmcra, sdsync; | 1018 | u64 mmcra, sdsync; |
1017 | 1019 | ||
1018 | /* we don't have to worry about interrupts here */ | 1020 | /* we don't have to worry about interrupts here */ |
1019 | prev = atomic64_read(&counter->hw.prev_count); | 1021 | prev = atomic64_read(&counter->hw.prev_count); |