projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
137351e
)
x86, perf: P4 PMU -- Get rid of redundant check for array index
author
Cyrill Gorcunov
<
[email protected]
>
Sat, 8 May 2010 11:25:53 +0000
(15:25 +0400)
committer
Ingo Molnar
<
[email protected]
>
Sat, 8 May 2010 12:17:53 +0000
(14:17 +0200)
The caller already has done such a check.
And it was wrong anyway, it had to be '>=' rather than '>'
Signed-off-by: Cyrill Gorcunov <
[email protected]
>
Cc: Peter Zijlstra <
[email protected]
>
Cc: Frederic Weisbecker <
[email protected]
>
Cc: Lin Ming <
[email protected]
>
LKML-Reference: <
20100508112717
.
130386882
@openvz.org>
Signed-off-by: Ingo Molnar <
[email protected]
>
arch/x86/kernel/cpu/perf_event_p4.c
patch
|
blob
|
history
diff --git
a/arch/x86/kernel/cpu/perf_event_p4.c
b/arch/x86/kernel/cpu/perf_event_p4.c
index ca40180c41d4f7b3f692b520459f0490da7f940a..b8c2d379eea6e09f765188e902fd75d56e8147df 100644
(file)
--- 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)
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);