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.oarch/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
--- arch/powerpc/kernel/perf_counter.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
arch/powerpc/kernel/perf_counter.c +3 -1
@@ -913,6 +913,8 @@ const struct pmu *hw_perf_counter_init(struct perf_counter *counter)case PERF_TYPE_RAW : ev = counter->attr.config;break ; +default : +return ERR_PTR (-EINVAL ); } counter->hw.config_base = ev; counter->hw.idx =0 ;
@@ -1013,7 +1015,7 @@ static void record_and_restart(struct perf_counter *counter, long val,u64 period = counter->hw.sample_period;s64 prev, delta, left;int record =0 ; -u64 addr, mmcra, sdsync; +u64 mmcra, sdsync;/* we don't have to worry about interrupts here */ prev =atomic64_read (&counter->hw.prev_count);
Commit-ID: 90c8f954534ba15e4542ab00dd9f0e58b071518c Gitweb: http://git.kernel.org/tip/90c8f954534ba15e4542ab00dd9f0e58b071518c Author: Paul Mackerras <[email protected]> AuthorDate: Mon, 15 Jun 2009 21:36:52 +1000 Committer: Ingo Molnar <[email protected]> CommitDate: Mon, 15 Jun 2009 16:12:25 +0200
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.
LKML-Reference: <[email protected]>
--- arch/powerpc/kernel/perf_counter.c | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-)
arch/powerpc/kernel/perf_counter.c +3 -1
@@ -913,6 +913,8 @@ const struct pmu *hw_perf_counter_init(struct perf_counter *counter)case PERF_TYPE_RAW : ev = counter->attr.config;break ; +default : +return ERR_PTR (-EINVAL ); } counter->hw.config_base = ev; counter->hw.idx =0 ;
@@ -1013,7 +1015,7 @@ static void record_and_restart(struct perf_counter *counter, long val,u64 period = counter->hw.sample_period;s64 prev, delta, left;int record =0 ; -u64 addr, mmcra, sdsync; +u64 mmcra, sdsync;/* we don't have to worry about interrupts here */ prev =atomic64_read (&counter->hw.prev_count);