* [PATCH 1/2] perf/core: fix should it be static warnings
@ 2015-09-27 15:25 Geliang Tang
2015-09-27 15:25 ` [PATCH 2/2] perf/core: nop_txn_flags should be static Geliang Tang
2015-09-28 8:03 ` [tip:perf/core] perf/core, perf/x86: Change needlessly global functions and a variable to static tip-bot for Geliang Tang
0 siblings, 2 replies; 3+ messages in thread
From: Geliang Tang @ 2015-09-27 15:25 UTC (permalink / raw)
To: Peter Zijlstra, Ingo Molnar, Arnaldo Carvalho de Melo
Cc: Geliang Tang, linux-kernel
Fixes the following sparse warnings:
kernel/events/core.c:199:6: warning: symbol
'update_perf_cpu_limits' was not declared. Should it be static?
kernel/events/core.c:475:6: warning: symbol 'perf_cgroup_switch'
was not declared. Should it be static?
kernel/events/core.c:7753:12: warning: symbol 'perf_init_event'
was not declared. Should it be static?
Signed-off-by: Geliang Tang <geliangtang@163.com>
---
kernel/events/core.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/kernel/events/core.c b/kernel/events/core.c
index f87b434..f88e4ad 100644
--- a/kernel/events/core.c
+++ b/kernel/events/core.c
@@ -196,7 +196,7 @@ static int perf_sample_period_ns __read_mostly = DEFAULT_SAMPLE_PERIOD_NS;
static int perf_sample_allowed_ns __read_mostly =
DEFAULT_SAMPLE_PERIOD_NS * DEFAULT_CPU_TIME_MAX_PERCENT / 100;
-void update_perf_cpu_limits(void)
+static void update_perf_cpu_limits(void)
{
u64 tmp = perf_sample_period_ns;
@@ -472,7 +472,7 @@ perf_cgroup_set_timestamp(struct task_struct *task,
* mode SWOUT : schedule out everything
* mode SWIN : schedule in based on cgroup for next
*/
-void perf_cgroup_switch(struct task_struct *task, int mode)
+static void perf_cgroup_switch(struct task_struct *task, int mode)
{
struct perf_cpu_context *cpuctx;
struct pmu *pmu;
@@ -7750,7 +7750,7 @@ static int perf_try_init_event(struct pmu *pmu, struct perf_event *event)
return ret;
}
-struct pmu *perf_init_event(struct perf_event *event)
+static struct pmu *perf_init_event(struct perf_event *event)
{
struct pmu *pmu = NULL;
int idx;
--
2.5.0
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH 2/2] perf/core: nop_txn_flags should be static
2015-09-27 15:25 [PATCH 1/2] perf/core: fix should it be static warnings Geliang Tang
@ 2015-09-27 15:25 ` Geliang Tang
2015-09-28 8:03 ` [tip:perf/core] perf/core, perf/x86: Change needlessly global functions and a variable to static tip-bot for Geliang Tang
1 sibling, 0 replies; 3+ messages in thread
From: Geliang Tang @ 2015-09-27 15:25 UTC (permalink / raw)
To: Peter Zijlstra, Ingo Molnar, Arnaldo Carvalho de Melo
Cc: Geliang Tang, linux-kernel
Fixes the following sparse warning:
kernel/events/core.c:7393:1: warning: symbol 'nop_txn_flags' was not
declared. Should it be static?
Signed-off-by: Geliang Tang <geliangtang@163.com>
---
kernel/events/core.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/kernel/events/core.c b/kernel/events/core.c
index f88e4ad..ea02109 100644
--- a/kernel/events/core.c
+++ b/kernel/events/core.c
@@ -7390,7 +7390,7 @@ static int perf_pmu_nop_int(struct pmu *pmu)
return 0;
}
-DEFINE_PER_CPU(unsigned int, nop_txn_flags);
+static DEFINE_PER_CPU(unsigned int, nop_txn_flags);
static void perf_pmu_start_txn(struct pmu *pmu, unsigned int flags)
{
--
2.5.0
^ permalink raw reply [flat|nested] 3+ messages in thread
* [tip:perf/core] perf/core, perf/x86: Change needlessly global functions and a variable to static
2015-09-27 15:25 [PATCH 1/2] perf/core: fix should it be static warnings Geliang Tang
2015-09-27 15:25 ` [PATCH 2/2] perf/core: nop_txn_flags should be static Geliang Tang
@ 2015-09-28 8:03 ` tip-bot for Geliang Tang
1 sibling, 0 replies; 3+ messages in thread
From: tip-bot for Geliang Tang @ 2015-09-28 8:03 UTC (permalink / raw)
To: linux-tip-commits
Cc: hpa, geliangtang, mingo, linux-kernel, peterz, torvalds, acme,
tglx, a.p.zijlstra
Commit-ID: 18ab2cd3ee9d52dc64c5ae984146a261a328c4e8
Gitweb: http://git.kernel.org/tip/18ab2cd3ee9d52dc64c5ae984146a261a328c4e8
Author: Geliang Tang <geliangtang@163.com>
AuthorDate: Sun, 27 Sep 2015 23:25:50 +0800
Committer: Ingo Molnar <mingo@kernel.org>
CommitDate: Mon, 28 Sep 2015 08:09:52 +0200
perf/core, perf/x86: Change needlessly global functions and a variable to static
Fixes various sparse warnings.
Signed-off-by: Geliang Tang <geliangtang@163.com>
Cc: Arnaldo Carvalho de Melo <acme@kernel.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Link: http://lkml.kernel.org/r/70c14234da1bed6e3e67b9c419e2d5e376ab4f32.1443367286.git.geliangtang@163.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
---
arch/x86/kernel/cpu/intel_cacheinfo.c | 8 ++++----
kernel/events/core.c | 8 ++++----
2 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/arch/x86/kernel/cpu/intel_cacheinfo.c b/arch/x86/kernel/cpu/intel_cacheinfo.c
index be4febc..e38d338 100644
--- a/arch/x86/kernel/cpu/intel_cacheinfo.c
+++ b/arch/x86/kernel/cpu/intel_cacheinfo.c
@@ -157,7 +157,7 @@ struct _cpuid4_info_regs {
struct amd_northbridge *nb;
};
-unsigned short num_cache_leaves;
+static unsigned short num_cache_leaves;
/* AMD doesn't have CPUID4. Emulate it here to report the same
information to the user. This makes some assumptions about the machine:
@@ -326,7 +326,7 @@ static void amd_calc_l3_indices(struct amd_northbridge *nb)
*
* @returns: the disabled index if used or negative value if slot free.
*/
-int amd_get_l3_disable_slot(struct amd_northbridge *nb, unsigned slot)
+static int amd_get_l3_disable_slot(struct amd_northbridge *nb, unsigned slot)
{
unsigned int reg = 0;
@@ -403,8 +403,8 @@ static void amd_l3_disable_index(struct amd_northbridge *nb, int cpu,
*
* @return: 0 on success, error status on failure
*/
-int amd_set_l3_disable_slot(struct amd_northbridge *nb, int cpu, unsigned slot,
- unsigned long index)
+static int amd_set_l3_disable_slot(struct amd_northbridge *nb, int cpu,
+ unsigned slot, unsigned long index)
{
int ret = 0;
diff --git a/kernel/events/core.c b/kernel/events/core.c
index f87b434..ea02109 100644
--- a/kernel/events/core.c
+++ b/kernel/events/core.c
@@ -196,7 +196,7 @@ static int perf_sample_period_ns __read_mostly = DEFAULT_SAMPLE_PERIOD_NS;
static int perf_sample_allowed_ns __read_mostly =
DEFAULT_SAMPLE_PERIOD_NS * DEFAULT_CPU_TIME_MAX_PERCENT / 100;
-void update_perf_cpu_limits(void)
+static void update_perf_cpu_limits(void)
{
u64 tmp = perf_sample_period_ns;
@@ -472,7 +472,7 @@ perf_cgroup_set_timestamp(struct task_struct *task,
* mode SWOUT : schedule out everything
* mode SWIN : schedule in based on cgroup for next
*/
-void perf_cgroup_switch(struct task_struct *task, int mode)
+static void perf_cgroup_switch(struct task_struct *task, int mode)
{
struct perf_cpu_context *cpuctx;
struct pmu *pmu;
@@ -7390,7 +7390,7 @@ static int perf_pmu_nop_int(struct pmu *pmu)
return 0;
}
-DEFINE_PER_CPU(unsigned int, nop_txn_flags);
+static DEFINE_PER_CPU(unsigned int, nop_txn_flags);
static void perf_pmu_start_txn(struct pmu *pmu, unsigned int flags)
{
@@ -7750,7 +7750,7 @@ static int perf_try_init_event(struct pmu *pmu, struct perf_event *event)
return ret;
}
-struct pmu *perf_init_event(struct perf_event *event)
+static struct pmu *perf_init_event(struct perf_event *event)
{
struct pmu *pmu = NULL;
int idx;
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2015-09-28 8:04 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-09-27 15:25 [PATCH 1/2] perf/core: fix should it be static warnings Geliang Tang
2015-09-27 15:25 ` [PATCH 2/2] perf/core: nop_txn_flags should be static Geliang Tang
2015-09-28 8:03 ` [tip:perf/core] perf/core, perf/x86: Change needlessly global functions and a variable to static tip-bot for Geliang Tang
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