From: Daniel Lezcano <daniel.lezcano@linaro.org>
To: Xunlei Pang <xlpang@126.com>, linux-kernel@vger.kernel.org
Cc: "Rafael J. Wysocki" <rjw@rjwysocki.net>,
linux-pm@vger.kernel.org, Xunlei Pang <pang.xunlei@zte.com.cn>
Subject: Re: [PATCH] cpuidle/coupled: Init cpuidle_device::safe_state_index
Date: Mon, 03 Aug 2015 18:22:54 +0200 [thread overview]
Message-ID: <55BF955E.1030801@linaro.org> (raw)
In-Reply-To: <1437654681-20893-1-git-send-email-xlpang@126.com>
On 07/23/2015 02:31 PM, Xunlei Pang wrote:
> From: Xunlei Pang <pang.xunlei@zte.com.cn>
>
> cpuidle_device::safe_state_index need to be initialized before use,
> so assign the driver's safe_state_index to it.
>
> Signed-off-by: Xunlei Pang <pang.xunlei@zte.com.cn>
> ---
> drivers/cpuidle/cpuidle.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/drivers/cpuidle/cpuidle.c b/drivers/cpuidle/cpuidle.c
> index e8e2775..ed5c8efe 100644
> --- a/drivers/cpuidle/cpuidle.c
> +++ b/drivers/cpuidle/cpuidle.c
> @@ -585,6 +585,8 @@ int cpuidle_register(struct cpuidle_driver *drv,
> */
> if (coupled_cpus)
> device->coupled_cpus = *coupled_cpus;
> +
> + device->safe_state_index = drv->safe_state_index;
Hey, good catch. We are lucky the safe_state_index is always zero.
I think we can simplify the code by removing the safe_state_index from
the cpuidle_device structure and use the one in the cpuidle_driver
structure in coupled.c
--
<http://www.linaro.org/> Linaro.org │ Open source software for ARM SoCs
Follow Linaro: <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog
next prev parent reply other threads:[~2015-08-03 16:22 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-07-23 12:31 [PATCH] cpuidle/coupled: Init cpuidle_device::safe_state_index Xunlei Pang
2015-08-03 16:22 ` Daniel Lezcano [this message]
2015-08-04 5:19 ` pang.xunlei
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=55BF955E.1030801@linaro.org \
--to=daniel.lezcano@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=pang.xunlei@zte.com.cn \
--cc=rjw@rjwysocki.net \
--cc=xlpang@126.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.