[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <tip-3f51b7119d052827dbb0e40c966acdf2bdc6f47f@git.kernel.org>
Date: Sat, 8 May 2010 16:10:17 GMT
From: tip-bot for Cyrill Gorcunov <gorcunov@...nvz.org>
To: linux-tip-commits@...r.kernel.org
Cc: linux-kernel@...r.kernel.org, hpa@...or.com, mingo@...hat.com,
gorcunov@...nvz.org, peterz@...radead.org, fweisbec@...il.com,
ming.m.lin@...el.com, tglx@...utronix.de, mingo@...e.hu
Subject: [tip:perf/core] x86, perf: P4 PMU -- Get rid of redundant check for array index
Commit-ID: 3f51b7119d052827dbb0e40c966acdf2bdc6f47f
Gitweb: http://git.kernel.org/tip/3f51b7119d052827dbb0e40c966acdf2bdc6f47f
Author: Cyrill Gorcunov <gorcunov@...nvz.org>
AuthorDate: Sat, 8 May 2010 15:25:53 +0400
Committer: Ingo Molnar <mingo@...e.hu>
CommitDate: Sat, 8 May 2010 14:17:53 +0200
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@...nvz.org>
Cc: Peter Zijlstra <peterz@...radead.org>
Cc: Frederic Weisbecker <fweisbec@...il.com>
Cc: Lin Ming <ming.m.lin@...el.com>
LKML-Reference: <20100508112717.130386882@...nvz.org>
Signed-off-by: Ingo Molnar <mingo@...e.hu>
---
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 ca40180..b8c2d37 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)
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);
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists