Skip to content

Commit

Permalink
x86: perf_counter.c intel_perfmon_event_map and max_intel_perfmon_eve…
Browse files Browse the repository at this point in the history
…nts should be static

Impact: cleanup, avoid sparse warnings, reduce kernel size a bit

Fixes these sparse warnings:
 arch/x86/kernel/cpu/perf_counter.c:44:11: warning: symbol 'intel_perfmon_event_map' was not declared. Should it be static?
 arch/x86/kernel/cpu/perf_counter.c:54:11: warning: symbol 'max_intel_perfmon_events' was not declared. Should it be static?

Signed-off-by: Jaswinder Singh <jaswinder@infradead.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
  • Loading branch information
Jaswinder Singh authored and Ingo Molnar committed Dec 19, 2008
1 parent a86ed50 commit 94c4657
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions arch/x86/kernel/cpu/perf_counter.c
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ struct cpu_hw_counters {
*/
static DEFINE_PER_CPU(struct cpu_hw_counters, cpu_hw_counters);

const int intel_perfmon_event_map[] =
static const int intel_perfmon_event_map[] =
{
[PERF_COUNT_CYCLES] = 0x003c,
[PERF_COUNT_INSTRUCTIONS] = 0x00c0,
Expand All @@ -51,7 +51,7 @@ const int intel_perfmon_event_map[] =
[PERF_COUNT_BRANCH_MISSES] = 0x00c5,
};

const int max_intel_perfmon_events = ARRAY_SIZE(intel_perfmon_event_map);
static const int max_intel_perfmon_events = ARRAY_SIZE(intel_perfmon_event_map);

/*
* Propagate counter elapsed time into the generic counter.
Expand Down

0 comments on commit 94c4657

Please sign in to comment.