perf/x86: Fix sparse warnings
authorPeter Huewe <[email protected]>
Mon, 29 Oct 2012 20:48:17 +0000 (21:48 +0100)
committerIngo Molnar <[email protected]>
Tue, 30 Oct 2012 09:10:52 +0000 (10:10 +0100)
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 <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Cc: Yuanhan Liu <[email protected]>
Cc: [email protected]
Cc: Jiri Olsa <[email protected]>
Link: http://lkml.kernel.org/n/[email protected]
Signed-off-by: Ingo Molnar <[email protected]>
arch/x86/kernel/cpu/perf_event.c

index 0a55ab2ff849925ddc47d8db04cb8e14e4a2e7b1..4428fd178bce07a3a8fd75b81c61b83fc63d9258 100644 (file)
@@ -1341,7 +1341,7 @@ static void __init filter_events(struct attribute **attrs)
        }
 }
 
-ssize_t events_sysfs_show(struct device *dev, struct device_attribute *attr,
+static ssize_t events_sysfs_show(struct device *dev, struct device_attribute *attr,
                          char *page)
 {
        struct perf_pmu_events_attr *pmu_attr = \
@@ -1373,7 +1373,7 @@ EVENT_ATTR(ref-cycles,                    REF_CPU_CYCLES          );
 
 static struct attribute *empty_attrs;
 
-struct attribute *events_attr[] = {
+static struct attribute *events_attr[] = {
        EVENT_PTR(CPU_CYCLES),
        EVENT_PTR(INSTRUCTIONS),
        EVENT_PTR(CACHE_REFERENCES),