acpi: apei-base: fix sparse warnings

Message ID 20200610162939.GA105986@garrit-VirtualBox
State New
Headers show
  • acpi: apei-base: fix sparse warnings
Related show

Commit Message

Garrit Franke June 10, 2020, 4:29 p.m.
Hi all,

first off, I must admit that this is my first kernel patch, so I would
love to receive any feedback. I thought that a good way to get started
is to check for minor warnings in drivers, so I went ahead and fixed
two of them:

"drivers/acpi/apei/apei-base.c:290:23: warning: symbol
'apei_resources_all' was not declared. Should it be static?"

"drivers/acpi/apei/apei-base.c:451:5: warning: symbol
'arch_apei_filter_addr' was not declared. Should it be static?"

Thanks for your time,

Signed-off-by: Garrit Franke <>
 drivers/acpi/apei/apei-base.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)


diff --git a/drivers/acpi/apei/apei-base.c b/drivers/acpi/apei/apei-base.c
index e358d0046..321318dcb 100644
--- a/drivers/acpi/apei/apei-base.c
+++ b/drivers/acpi/apei/apei-base.c
@@ -287,7 +287,7 @@  struct apei_res {
 /* Collect all resources requested, to avoid conflict */
-struct apei_resources apei_resources_all = {
+static struct apei_resources apei_resources_all = {
 	.iomem = LIST_HEAD_INIT(apei_resources_all.iomem),
 	.ioport = LIST_HEAD_INIT(apei_resources_all.ioport),
@@ -448,8 +448,9 @@  static int apei_get_nvs_resources(struct apei_resources *resources)
 	return acpi_nvs_for_each_region(apei_get_res_callback, resources);
-int (*arch_apei_filter_addr)(int (*func)(__u64 start, __u64 size,
+static int (*arch_apei_filter_addr)(int (*func)(__u64 start, __u64 size,
 				     void *data), void *data);
 static int apei_get_arch_resources(struct apei_resources *resources)