[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <5879575.B8f60l20lB@kreacher>
Date: Fri, 10 Jan 2020 11:49:58 +0100
From: "Rafael J. Wysocki" <rjw@...ysocki.net>
To: Linux PM <linux-pm@...r.kernel.org>
Cc: LKML <linux-kernel@...r.kernel.org>,
Len Brown <len.brown@...el.com>,
Zhang Rui <rui.zhang@...el.com>
Subject: [PATCH 5/8] intel_idle: Move and clean up intel_idle_cpuidle_devices_uninit()
From: Rafael J. Wysocki <rafael.j.wysocki@...el.com>
Move intel_idle_cpuidle_devices_uninit() closer to its caller,
intel_idle_init(), add the __init modifier to its header, drop a
redundant local variable from it and fix up its kerneldoc comment.
No intentional functional impact.
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@...el.com>
---
drivers/idle/intel_idle.c | 26 +++++++++++---------------
1 file changed, 11 insertions(+), 15 deletions(-)
Index: linux-pm/drivers/idle/intel_idle.c
===================================================================
--- linux-pm.orig/drivers/idle/intel_idle.c
+++ linux-pm/drivers/idle/intel_idle.c
@@ -1297,21 +1297,6 @@ static inline bool intel_idle_off_by_def
#endif /* !CONFIG_ACPI_PROCESSOR_CSTATE */
/*
- * intel_idle_cpuidle_devices_uninit()
- * Unregisters the cpuidle devices.
- */
-static void intel_idle_cpuidle_devices_uninit(void)
-{
- int i;
- struct cpuidle_device *dev;
-
- for_each_online_cpu(i) {
- dev = per_cpu_ptr(intel_idle_cpuidle_devices, i);
- cpuidle_unregister_device(dev);
- }
-}
-
-/*
* ivt_idle_state_table_update(void)
*
* Tune IVT multi-socket targets
@@ -1565,6 +1550,17 @@ static int intel_idle_cpu_online(unsigne
return 0;
}
+/**
+ * intel_idle_cpuidle_devices_uninit - Unregister all cpuidle devices.
+ */
+static void __init intel_idle_cpuidle_devices_uninit(void)
+{
+ int i;
+
+ for_each_online_cpu(i)
+ cpuidle_unregister_device(per_cpu_ptr(intel_idle_cpuidle_devices, i));
+}
+
static int __init intel_idle_init(void)
{
const struct x86_cpu_id *id;
Powered by blists - more mailing lists