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>
This commit is contained in:
parent
3dfabc74c6
commit
90c8f95453
|
@ -913,6 +913,8 @@ const struct pmu *hw_perf_counter_init(struct perf_counter *counter)
|
||||||
case PERF_TYPE_RAW:
|
case PERF_TYPE_RAW:
|
||||||
ev = counter->attr.config;
|
ev = counter->attr.config;
|
||||||
break;
|
break;
|
||||||
|
default:
|
||||||
|
return ERR_PTR(-EINVAL);
|
||||||
}
|
}
|
||||||
counter->hw.config_base = ev;
|
counter->hw.config_base = ev;
|
||||||
counter->hw.idx = 0;
|
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;
|
u64 period = counter->hw.sample_period;
|
||||||
s64 prev, delta, left;
|
s64 prev, delta, left;
|
||||||
int record = 0;
|
int record = 0;
|
||||||
u64 addr, mmcra, sdsync;
|
u64 mmcra, sdsync;
|
||||||
|
|
||||||
/* we don't have to worry about interrupts here */
|
/* we don't have to worry about interrupts here */
|
||||||
prev = atomic64_read(&counter->hw.prev_count);
|
prev = atomic64_read(&counter->hw.prev_count);
|
||||||
|
|
Loading…
Reference in New Issue