diff options
author | Peter Huewe <peterhuewe@gmx.de> | 2012-10-29 16:48:17 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2012-10-30 05:10:52 -0400 |
commit | 95d18aa2b6c05351181934b3bc34ce038cc7b637 (patch) | |
tree | d3228627aaaf53a666833cc5ae1d53572f17c213 | |
parent | 8748dd9b998f06f7cf3a7ffdca27f05bc4835075 (diff) |
perf/x86: Fix sparse warnings
FYI, there are new sparse warnings:
arch/x86/kernel/cpu/perf_event.c:1356:18: sparse: symbol 'events_attr' was not declared. Should it be static?
This patch makes it static and also adds the static keyword to
fix arch/x86/kernel/cpu/perf_event.c:1344:9: warning: symbol
'events_sysfs_show' was not declared.
Signed-off-by: Peter Huewe <peterhuewe@gmx.de>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Yuanhan Liu <yuanhan.liu@linux.intel.com>
Cc: fengguang.wu@intel.com
Cc: Jiri Olsa <jolsa@redhat.com>
Link: http://lkml.kernel.org/n/tip-lerdpXlnruh0yvWs2owwuizl@git.kernel.org
Signed-off-by: Ingo Molnar <mingo@kernel.org>
-rw-r--r-- | arch/x86/kernel/cpu/perf_event.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/x86/kernel/cpu/perf_event.c b/arch/x86/kernel/cpu/perf_event.c index 0a55ab2ff849..4428fd178bce 100644 --- a/arch/x86/kernel/cpu/perf_event.c +++ b/arch/x86/kernel/cpu/perf_event.c | |||
@@ -1341,7 +1341,7 @@ static void __init filter_events(struct attribute **attrs) | |||
1341 | } | 1341 | } |
1342 | } | 1342 | } |
1343 | 1343 | ||
1344 | ssize_t events_sysfs_show(struct device *dev, struct device_attribute *attr, | 1344 | static ssize_t events_sysfs_show(struct device *dev, struct device_attribute *attr, |
1345 | char *page) | 1345 | char *page) |
1346 | { | 1346 | { |
1347 | struct perf_pmu_events_attr *pmu_attr = \ | 1347 | struct perf_pmu_events_attr *pmu_attr = \ |
@@ -1373,7 +1373,7 @@ EVENT_ATTR(ref-cycles, REF_CPU_CYCLES ); | |||
1373 | 1373 | ||
1374 | static struct attribute *empty_attrs; | 1374 | static struct attribute *empty_attrs; |
1375 | 1375 | ||
1376 | struct attribute *events_attr[] = { | 1376 | static struct attribute *events_attr[] = { |
1377 | EVENT_PTR(CPU_CYCLES), | 1377 | EVENT_PTR(CPU_CYCLES), |
1378 | EVENT_PTR(INSTRUCTIONS), | 1378 | EVENT_PTR(INSTRUCTIONS), |
1379 | EVENT_PTR(CACHE_REFERENCES), | 1379 | EVENT_PTR(CACHE_REFERENCES), |