Skip to contentSkip to conversation

ACPI: battery: make function __battery_hook_unregister static

PATCH Applied Colin King 2 participants 2 messages Feb 23, 2018 – Mar 14, 2018

Subsystems (2)
lore
Share & tools
lore

Colin King

author
#0 lore raw

PATCH 1/1 ACPI: battery: make function __battery_hook_unregister static

From: Colin Ian King <[email protected]>

The function __battery_hook_unregister is local to the source and does not need to be in global scope, so make it static.

Cleans up sparse warning:
drivers/acpi/battery.c:654:6: warning: symbol '__battery_hook_unregister' was not declared. Should it be static?

---
 drivers/acpi/battery.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/acpi/battery.c +1 -1
index cfdef4c1d097..b4580b2e8706 100644
@@ -651,7 +651,7 @@ static LIST_HEAD(acpi_battery_list);
 static LIST_HEAD(battery_hook_list);
 static DEFINE_MUTEX(hook_mutex);
 
-void __battery_hook_unregister(struct acpi_battery_hook *hook, int lock)
+static void __battery_hook_unregister(struct acpi_battery_hook *hook, int lock)
 {
 	struct acpi_battery *battery;
 	/*
Signature · 1 line
2.15.1
#1 lore raw
Quoted 20 lines · CET Colin King

From: Colin Ian King <[email protected]>

The function __battery_hook_unregister is local to the source and does not need to be in global scope, so make it static.

Cleans up sparse warning:
drivers/acpi/battery.c:654:6: warning: symbol '__battery_hook_unregister' was not declared. Should it be static?

---
 drivers/acpi/battery.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/acpi/battery.c +0 -0
index cfdef4c1d097..b4580b2e8706 100644

drivers/acpi/battery.c static LIST_HEAD(acpi_battery_list); · line 657

Quoted 8 lines
drivers/acpi/battery.c +1 -1
@@ -651,7 +651,7 @@ static LIST_HEAD(acpi_battery_list);
 static LIST_HEAD(battery_hook_list);
 static DEFINE_MUTEX(hook_mutex);
 
-void __battery_hook_unregister(struct acpi_battery_hook *hook, int lock)
+static void __battery_hook_unregister(struct acpi_battery_hook *hook, int lock)
 {
 	struct acpi_battery *battery;
 	/*

Applied, thanks!