Skip to content

Commit 95d18aa

Browse files
PeterHueweIngo Molnar
authored andcommitted
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 <[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]>
1 parent 8748dd9 commit 95d18aa

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

arch/x86/kernel/cpu/perf_event.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1341,7 +1341,7 @@ static void __init filter_events(struct attribute **attrs)
13411341
}
13421342
}
13431343

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,
13451345
char *page)
13461346
{
13471347
struct perf_pmu_events_attr *pmu_attr = \
@@ -1373,7 +1373,7 @@ EVENT_ATTR(ref-cycles, REF_CPU_CYCLES );
13731373

13741374
static struct attribute *empty_attrs;
13751375

1376-
struct attribute *events_attr[] = {
1376+
static struct attribute *events_attr[] = {
13771377
EVENT_PTR(CPU_CYCLES),
13781378
EVENT_PTR(INSTRUCTIONS),
13791379
EVENT_PTR(CACHE_REFERENCES),

0 commit comments

Comments
 (0)