提交 3f51b711 编写于 作者: C Cyrill Gorcunov 提交者: Ingo Molnar

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: NCyrill 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: NIngo Molnar <mingo@elte.hu>
上级 137351e0
......@@ -406,11 +406,6 @@ static u64 p4_pmu_event_map(int hw_event)
unsigned int esel;
u64 config;
if (hw_event > ARRAY_SIZE(p4_general_events)) {
printk_once(KERN_ERR "P4 PMU: Bad index: %i\n", hw_event);
return 0;
}
config = p4_general_events[hw_event];
bind = p4_config_get_bind(config);
esel = P4_OPCODE_ESEL(bind->opcode);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册