From: Peter Zijlstra Date: Thu, 11 Jun 2009 15:57:21 +0000 (+0200) Subject: perf_counter: Remove PERF_TYPE_RAW special casing X-Git-Tag: v2.6.31-rc1~359^2~3 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=081fad86178ec0f64f32f1bd04cf4aad22714fb9;p=profile%2Fivi%2Fkernel-x86-ivi.git perf_counter: Remove PERF_TYPE_RAW special casing The PERF_TYPE_RAW special case seems superfluous these days. Remove it and add it to the switch() stmt like the others. [ Impact: cleanup ] Signed-off-by: Peter Zijlstra Cc: Mike Galbraith Cc: Paul Mackerras Cc: Arnaldo Carvalho de Melo LKML-Reference: Signed-off-by: Ingo Molnar --- diff --git a/kernel/perf_counter.c b/kernel/perf_counter.c index ef5d8a5..663bbe0 100644 --- a/kernel/perf_counter.c +++ b/kernel/perf_counter.c @@ -3570,12 +3570,8 @@ perf_counter_alloc(struct perf_counter_attr *attr, if (attr->inherit && (attr->sample_type & PERF_SAMPLE_GROUP)) goto done; - if (attr->type == PERF_TYPE_RAW) { - pmu = hw_perf_counter_init(counter); - goto done; - } - switch (attr->type) { + case PERF_TYPE_RAW: case PERF_TYPE_HARDWARE: case PERF_TYPE_HW_CACHE: pmu = hw_perf_counter_init(counter);