mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] x86: perf_counter.c intel_perfmon_event_map and max_intel_perfmon_events should be static
@ 2008-12-19 17:07 Jaswinder Singh
  2008-12-19 22:15 ` Ingo Molnar
  0 siblings, 1 reply; 2+ messages in thread
From: Jaswinder Singh @ 2008-12-19 17:07 UTC (permalink / raw)
  To: Ingo Molnar, x86 maintainers, LKML, perfctr-devel, Thomas Gleixner

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>
---
 arch/x86/kernel/cpu/perf_counter.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/x86/kernel/cpu/perf_counter.c b/arch/x86/kernel/cpu/perf_counter.c
index 8a154bd..bdbdb56 100644
--- a/arch/x86/kernel/cpu/perf_counter.c
+++ b/arch/x86/kernel/cpu/perf_counter.c
@@ -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,
@@ -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.
-- 
1.5.5.1




^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] x86: perf_counter.c intel_perfmon_event_map and max_intel_perfmon_events should be static
  2008-12-19 17:07 [PATCH] x86: perf_counter.c intel_perfmon_event_map and max_intel_perfmon_events should be static Jaswinder Singh
@ 2008-12-19 22:15 ` Ingo Molnar
  0 siblings, 0 replies; 2+ messages in thread
From: Ingo Molnar @ 2008-12-19 22:15 UTC (permalink / raw)
  To: Jaswinder Singh; +Cc: x86 maintainers, LKML, perfctr-devel, Thomas Gleixner


* Jaswinder Singh <jaswinder@infradead.org> wrote:

> 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>
> ---
>  arch/x86/kernel/cpu/perf_counter.c |    4 ++--
>  1 files changed, 2 insertions(+), 2 deletions(-)

applied to tip/perfcounters/core, thanks!

	Ingo

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2008-12-19 22:15 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-12-19 17:07 [PATCH] x86: perf_counter.c intel_perfmon_event_map and max_intel_perfmon_events should be static Jaswinder Singh
2008-12-19 22:15 ` Ingo Molnar

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome