[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20110212144617.GJ15616@n2100.arm.linux.org.uk>
Date: Sat, 12 Feb 2011 14:46:17 +0000
From: Russell King - ARM Linux <linux@....linux.org.uk>
To: Colin Cross <ccross@...roid.com>
Cc: linux-arm-kernel@...ts.infradead.org, santosh.shilimkar@...com,
catalin.marinas@....com, will.deacon@....com,
Jamie Iles <jamie.iles@...ochip.com>,
Nicolas Pitre <nicolas.pitre@...aro.org>,
Eric Miao <eric.y.miao@...il.com>,
Peter Zijlstra <peterz@...radead.org>,
linux-kernel@...r.kernel.org
Subject: Re: [RFC PATCH 1/3] ARM: Add cpu power management notifiers
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?
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists