[PATCH] acpi: apei-base: fix sparse warnings

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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,
Garrit

Signed-off-by: Garrit Franke <garritfranke@xxxxxxxxx>
---
 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)
 
 {
-- 
2.25.1




[Index of Archives]     [Linux IBM ACPI]     [Linux Power Management]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux