diff options
author | Cyrill Gorcunov <gorcunov@openvz.org> | 2010-05-08 07:25:53 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2010-05-08 08:17:53 -0400 |
commit | 3f51b7119d052827dbb0e40c966acdf2bdc6f47f (patch) | |
tree | 82a204b2f2cc5acec2e0dcae4ec780ed0c97f8b1 /arch/x86/kernel | |
parent | 137351e0feeb9f25d99488ee1afc1c79f5499a9a (diff) |
x86, perf: P4 PMU -- Get rid of redundant check for array index
The caller already has done such a check.
And it was wrong anyway, it had to be '>=' rather than '>'
Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Lin Ming <ming.m.lin@intel.com>
LKML-Reference: <20100508112717.130386882@openvz.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch/x86/kernel')
-rw-r--r-- | arch/x86/kernel/cpu/perf_event_p4.c | 5 |
1 files changed, 0 insertions, 5 deletions
diff --git a/arch/x86/kernel/cpu/perf_event_p4.c b/arch/x86/kernel/cpu/perf_event_p4.c index ca40180c41d..b8c2d379eea 100644 --- a/arch/x86/kernel/cpu/perf_event_p4.c +++ b/arch/x86/kernel/cpu/perf_event_p4.c | |||
@@ -406,11 +406,6 @@ static u64 p4_pmu_event_map(int hw_event) | |||
406 | unsigned int esel; | 406 | unsigned int esel; |
407 | u64 config; | 407 | u64 config; |
408 | 408 | ||
409 | if (hw_event > ARRAY_SIZE(p4_general_events)) { | ||
410 | printk_once(KERN_ERR "P4 PMU: Bad index: %i\n", hw_event); | ||
411 | return 0; | ||
412 | } | ||
413 | |||
414 | config = p4_general_events[hw_event]; | 409 | config = p4_general_events[hw_event]; |
415 | bind = p4_config_get_bind(config); | 410 | bind = p4_config_get_bind(config); |
416 | esel = P4_OPCODE_ESEL(bind->opcode); | 411 | esel = P4_OPCODE_ESEL(bind->opcode); |