The second and third argument to x86_perf_event_set_period() are
superfluous since they are simple expressions of the first argument.
Hence remove them.
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: paulus@samba.org
Cc: eranian@google.com
Cc: robert.richter@amd.com
Cc: fweisbec@gmail.com
Cc: Arnaldo Carvalho de Melo <acme@infradead.org>
LKML-Reference: <
20100304140100.
006500906@chello.nl>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
-static int x86_perf_event_set_period(struct perf_event *event,
- struct hw_perf_event *hwc, int idx);
+static int x86_perf_event_set_period(struct perf_event *event);
/*
* Generalized hw caching related hw_event table, filled
/*
* Generalized hw caching related hw_event table, filled
if (hwc->idx == -1) {
x86_assign_hw_event(event, cpuc, i);
if (hwc->idx == -1) {
x86_assign_hw_event(event, cpuc, i);
- x86_perf_event_set_period(event, hwc, hwc->idx);
+ x86_perf_event_set_period(event);
}
/*
* need to mark as active because x86_pmu_disable()
}
/*
* need to mark as active because x86_pmu_disable()
* To be called with the event disabled in hw:
*/
static int
* To be called with the event disabled in hw:
*/
static int
-x86_perf_event_set_period(struct perf_event *event,
- struct hw_perf_event *hwc, int idx)
+x86_perf_event_set_period(struct perf_event *event)
+ struct hw_perf_event *hwc = &event->hw;
s64 left = atomic64_read(&hwc->period_left);
s64 period = hwc->sample_period;
s64 left = atomic64_read(&hwc->period_left);
s64 period = hwc->sample_period;
+ int err, ret = 0, idx = hwc->idx;
if (idx == X86_PMC_IDX_FIXED_BTS)
return 0;
if (idx == X86_PMC_IDX_FIXED_BTS)
return 0;
if (hwc->idx == -1)
return -EAGAIN;
if (hwc->idx == -1)
return -EAGAIN;
- x86_perf_event_set_period(event, hwc, hwc->idx);
+ x86_perf_event_set_period(event);
x86_pmu.enable(hwc, hwc->idx);
return 0;
x86_pmu.enable(hwc, hwc->idx);
return 0;
handled = 1;
data.period = event->hw.last_period;
handled = 1;
data.period = event->hw.last_period;
- if (!x86_perf_event_set_period(event, hwc, idx))
+ if (!x86_perf_event_set_period(event))
continue;
if (perf_event_overflow(event, 1, &data, regs))
continue;
if (perf_event_overflow(event, 1, &data, regs))
int ret;
x86_perf_event_update(event, hwc, idx);
int ret;
x86_perf_event_update(event, hwc, idx);
- ret = x86_perf_event_set_period(event, hwc, idx);
+ ret = x86_perf_event_set_period(event);