Fix sparse warnings:
kernel/events/core.c:6278:6: warning: symbol 'perf_pmu_snapshot_aux' was not declared. Should it be static?
kernel/events/core.c:10118:1: warning: symbol 'dev_attr_nr_addr_filters' was not declared. Should it be static?
Reported-by: Hulk Robot <[email protected]>
Signed-off-by: zhengbin <[email protected]>
---
kernel/events/core.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/kernel/events/core.c b/kernel/events/core.c
index 16d80ad..9fc62e7 100644
--- a/kernel/events/core.c
+++ b/kernel/events/core.c
@@ -6275,10 +6275,10 @@ static unsigned long perf_prepare_sample_aux(struct perf_event *event,
return data->aux_size;
}
-long perf_pmu_snapshot_aux(struct ring_buffer *rb,
- struct perf_event *event,
- struct perf_output_handle *handle,
- unsigned long size)
+static long perf_pmu_snapshot_aux(struct ring_buffer *rb,
+ struct perf_event *event,
+ struct perf_output_handle *handle,
+ unsigned long size)
{
unsigned long flags;
long ret;
@@ -10115,7 +10115,7 @@ static ssize_t nr_addr_filters_show(struct device *dev,
return snprintf(page, PAGE_SIZE - 1, "%d\n", pmu->nr_addr_filters);
}
-DEVICE_ATTR_RO(nr_addr_filters);
+static DEVICE_ATTR_RO(nr_addr_filters);
static struct idr pmu_idr;
--
2.7.4