Skip to contentSkip to conversation

x86, perf: Change two init functions to static

PATCH In review Yinghai Lu 1 participant 3 messages Jan 21, 2011 – Jan 27, 2011

Subsystems (2)
lore
Share & tools
lore

Yinghai Lu

author
#0 lore raw

PATCH 1/1 x86, perf: Change two init functions to static

init_hw_perf_events() is called via early_initcall now. x86_pmu_event_init is x86_pmu member function.

Could change them to static.

---
 arch/x86/kernel/cpu/perf_event.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
arch/x86/kernel/cpu/perf_event.c +2 -2
Index: linux-2.6/arch/x86/kernel/cpu/perf_event.c
===================================================================
@@ -1389,7 +1389,7 @@ static void __init pmu_check_apic(void)
 	pr_info("no hardware sampling interrupt available.\n");
 }
 
-int __init init_hw_perf_events(void)
+static int __init init_hw_perf_events(void)
 {
 	struct event_constraint *c;
 	int err;
@@ -1608,7 +1608,7 @@ out:
 	return ret;
 }
 
-int x86_pmu_event_init(struct perf_event *event)
+static int x86_pmu_event_init(struct perf_event *event)
 {
 	struct pmu *tmp;
 	int err;
#1 lore raw
Commit-ID:  82d70cab6bce0147aa0aa9583ef9ac58141f4ef4
Gitweb:     http://git.kernel.org/tip/82d70cab6bce0147aa0aa9583ef9ac58141f4ef4
Author:     Yinghai Lu <[email protected]>
AuthorDate: Fri, 21 Jan 2011 15:30:01 -0800
Committer:  Ingo Molnar <[email protected]>
CommitDate: Wed, 26 Jan 2011 08:46:57 +0100

x86, perf: Change two init functions to static

init_hw_perf_events() is called via early_initcall now. x86_pmu_event_init is x86_pmu member function.

So we can change them to static.

Cc Peter Zijlstra <[email protected]>
Cc Paul Mackerras <[email protected]>
Cc Arnaldo Carvalho de Melo <[email protected]>

LKML-Reference: <[email protected]>

---
 arch/x86/kernel/cpu/perf_event.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
arch/x86/kernel/cpu/perf_event.c +2 -2
index 9d977a2..4d98789 100644
@@ -1389,7 +1389,7 @@ static void __init pmu_check_apic(void)
 	pr_info("no hardware sampling interrupt available.\n");
 }
 
-int __init init_hw_perf_events(void)
+static int __init init_hw_perf_events(void)
 {
 	struct event_constraint *c;
 	int err;
@@ -1608,7 +1608,7 @@ out:
 	return ret;
 }
 
-int x86_pmu_event_init(struct perf_event *event)
+static int x86_pmu_event_init(struct perf_event *event)
 {
 	struct pmu *tmp;
 	int err;
#2 lore raw
In reply to Yinghai Lu
Commit-ID:  dda99116969142cc41e945a1047a419b937536af
Gitweb:     http://git.kernel.org/tip/dda99116969142cc41e945a1047a419b937536af
Author:     Yinghai Lu <[email protected]>
AuthorDate: Fri, 21 Jan 2011 15:30:01 -0800
Committer:  Ingo Molnar <[email protected]>
CommitDate: Thu, 27 Jan 2011 19:23:07 +0100

x86, perf: Change two init functions to static

init_hw_perf_events() is called via early_initcall now. x86_pmu_event_init is x86_pmu member function.

So we can change them to static.

Cc Peter Zijlstra <[email protected]>
Cc Paul Mackerras <[email protected]>
Cc Arnaldo Carvalho de Melo <[email protected]>

LKML-Reference: <[email protected]>

---
 arch/x86/kernel/cpu/perf_event.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
arch/x86/kernel/cpu/perf_event.c +2 -2
index 9d977a2..4d98789 100644
@@ -1389,7 +1389,7 @@ static void __init pmu_check_apic(void)
 	pr_info("no hardware sampling interrupt available.\n");
 }
 
-int __init init_hw_perf_events(void)
+static int __init init_hw_perf_events(void)
 {
 	struct event_constraint *c;
 	int err;
@@ -1608,7 +1608,7 @@ out:
 	return ret;
 }
 
-int x86_pmu_event_init(struct perf_event *event)
+static int x86_pmu_event_init(struct perf_event *event)
 {
 	struct pmu *tmp;
 	int err;