Thread (12 messages) read the whole thread 12 messages, 4 authors, 2011-02-18

[RFC PATCH 1/3] ARM: Add cpu power management notifiers

From: Russell King - ARM Linux <hidden>
Date: 2011-02-12 14:47:25
Also in: lkml

On Thu, Feb 10, 2011 at 01:31:25PM -0800, Colin Cross wrote:
+int cpu_pm_enter(void)
+{
+	int nr_calls;
+	int ret;
+
+	spin_lock(&idle_notifier_lock);
+	ret = __idle_notify(CPU_PM_ENTER, -1, &nr_calls);
+	if (ret) {
+		__idle_notify(CPU_PM_ENTER_FAILED, nr_calls - 1, NULL);
+		spin_unlock(&idle_notifier_lock);
+		return ret;
+	}
+	spin_unlock(&idle_notifier_lock);
+
+	return 0;
Wouldn't:

	spin_lock(&idle_notifier_lock);
	ret = __idle_notify(CPU_PM_ENTER, -1, &nr_calls);
	if (ret)
		__idle_notify(CPU_PM_ENTER_FAILED, nr_calls - 1, NULL);
	spin_unlock(&idle_notifier_lock);

	return ret;

be easier reading?
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help