Skip to contentSkip to conversation

perf_counter: Remove PERF_TYPE_RAW special casing

tip:perfcounters/core tip-bot for Peter Zijlstra 1 participant 1 message Jun 12, 2009

lore
Share & tools
lore
#0 lore raw
Commit-ID:  081fad86178ec0f64f32f1bd04cf4aad22714fb9
Gitweb:     http://git.kernel.org/tip/081fad86178ec0f64f32f1bd04cf4aad22714fb9
Author:     Peter Zijlstra <[email protected]>
AuthorDate: Thu, 11 Jun 2009 17:57:21 +0200
Committer:  Ingo Molnar <[email protected]>
CommitDate: Fri, 12 Jun 2009 14:28:51 +0200

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 ]

Cc Mike Galbraith <[email protected]>
Cc Paul Mackerras <[email protected]>
Cc Arnaldo Carvalho de Melo <[email protected]>

LKML-Reference: <new-submission>

---
 kernel/perf_counter.c |    6 +-----
 1 files changed, 1 insertions(+), 5 deletions(-)
kernel/perf_counter.c +1 -5
index ef5d8a5..663bbe0 100644
@@ -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);