[PATCH] perf/core: make nr_addr_filters static

From: Ben Dooks
Date: Fri Jun 16 2023 - 13:18:38 EST


The dev_attr_nr_addr_filters is not accessed outside of kernel/events/core.c
so make it static to avoid the following sparse warning:

kernel/events/core.c:11288:1: warning: symbol 'dev_attr_nr_addr_filters' was not declared. Should it be static?

Signed-off-by: Ben Dooks <ben.dooks@xxxxxxxxxxxxxxx>
---
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 db016e418931..56255ace94d4 100644
--- a/kernel/events/core.c
+++ b/kernel/events/core.c
@@ -11285,7 +11285,7 @@ static ssize_t nr_addr_filters_show(struct device *dev,

return scnprintf(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.39.2