linux-pm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Lina Iyer <lina.iyer@linaro.org>
To: ulf.hansson@linaro.org, khilman@kernel.org, rjw@rjwysocki.net,
	linux-pm@vger.kernel.org, linux-arm-kernel@lists.infradead.org
Subject: Re: [BUG FIX] PM / cpu_domains: Check for NULL callbacks
Date: Tue, 1 Mar 2016 14:17:05 -0700	[thread overview]
Message-ID: <20160301211705.GQ1440@linaro.org> (raw)
In-Reply-To: <1456866931-37851-2-git-send-email-lina.iyer@linaro.org>

Ignore this patch pls. This change has been folded in.

Thanks,
Lina

On Tue, Mar 01 2016 at 14:15 -0700, Lina Iyer wrote:
>Check for NULL platform callback before calling.
>
>Signed-off-by: Lina Iyer <lina.iyer@linaro.org>
>---
> drivers/base/power/cpu_domains.c | 10 ++++++++--
> 1 file changed, 8 insertions(+), 2 deletions(-)
>
>diff --git a/drivers/base/power/cpu_domains.c b/drivers/base/power/cpu_domains.c
>index 7069411..bcaa474 100644
>--- a/drivers/base/power/cpu_domains.c
>+++ b/drivers/base/power/cpu_domains.c
>@@ -157,16 +157,22 @@ static int cpu_pd_power_on(struct generic_pm_domain *genpd)
> {
> 	struct cpu_pm_domain *pd = to_cpu_pd(genpd);
>
>-	return pd->ops.power_on();
>+	if (pd->ops.power_on)
>+		return pd->ops.power_on();
>+
>+	return 0;
> }
>
> static int cpu_pd_power_off(struct generic_pm_domain *genpd)
> {
> 	struct cpu_pm_domain *pd = to_cpu_pd(genpd);
>
>-	return pd->ops.power_off(genpd->state_idx,
>+	if (pd->ops.power_off)
>+		return pd->ops.power_off(genpd->state_idx,
> 			genpd->states[genpd->state_idx].param,
> 			pd->cpus);
>+
>+	return 0;
> }
>
> /**
>-- 
>2.1.4
>

  reply	other threads:[~2016-03-01 21:17 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-01 21:15 [RFC v3 00/12] PM: SoC idle support using PM domains Lina Iyer
2016-03-01 21:15 ` [BUG FIX] PM / cpu_domains: Check for NULL callbacks Lina Iyer
2016-03-01 21:17   ` Lina Iyer [this message]
2016-03-01 21:15 ` [RFC v3 01/12] PM / Domains: Abstract genpd locking Lina Iyer
2016-03-04 10:09   ` Ulf Hansson
2016-03-01 21:15 ` [RFC v3 02/12] PM / Domains: Support IRQ safe PM domains Lina Iyer
2016-03-03  0:57   ` Kevin Hilman
2016-03-01 21:15 ` [RFC v3 03/12] PM / cpu_domains: Setup PM domains for CPUs/clusters Lina Iyer
2016-03-03  1:18   ` Kevin Hilman
2016-03-01 21:15 ` [RFC v3 04/12] ARM: cpuidle: Add runtime PM support for CPUs Lina Iyer
2016-03-04 18:03   ` Stephen Boyd
2016-03-01 21:15 ` [RFC v3 05/12] timer: Export next wake up of a CPU Lina Iyer
2016-03-01 21:15 ` [RFC v3 06/12] PM / cpu_domains: Record CPUs that are part of the domain Lina Iyer
2016-03-01 21:15 ` [RFC v3 07/12] PM / cpu_domains: Add PM Domain governor for CPUs Lina Iyer
2016-03-01 21:15 ` [RFC v3 08/12] Documentation / cpu_domains: Describe CPU PM domains setup and governor Lina Iyer
2016-03-01 21:15 ` [RFC v3 09/12] drivers: firmware: psci: Allow OS Initiated suspend mode Lina Iyer
2016-03-01 21:15 ` [RFC v3 10/12] ARM64: psci: Support cluster idle states for OS-Initiated Lina Iyer
2016-03-01 21:15 ` [RFC v3 11/12] ARM64: dts: Add PSCI cpuidle support for MSM8916 Lina Iyer
2016-03-21  3:50   ` Andy Gross
2016-03-01 21:15 ` [RFC v3 12/12] ARM64: dts: Define CPU power domain " Lina Iyer
  -- strict thread matches above, loose matches on Subject: below --
2016-02-12 20:50 [RFC v2 03/12] PM / cpu_domains: Setup PM domains for CPUs/clusters Lina Iyer
2016-02-18 17:29 ` [BUG FIX] PM / cpu_domains: Check for NULL callbacks Lina Iyer
2016-02-18 17:46   ` Rafael J. Wysocki
2016-02-18 22:51     ` Lina Iyer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20160301211705.GQ1440@linaro.org \
    --to=lina.iyer@linaro.org \
    --cc=khilman@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=rjw@rjwysocki.net \
    --cc=ulf.hansson@linaro.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).