public inbox for linux-pm@vger.kernel.org
 help / color / mirror / Atom feed
From: Javi Merino <javi.merino@arm.com>
To: Lukasz Luba <lukasz.luba@arm.com>
Cc: linux-pm@vger.kernel.org, myungjoo.ham@samsung.com,
	kyungmin.park@samsung.com
Subject: Re: [PATCH] devfreq: fix initialization of current frequency in last status
Date: Wed, 1 Jun 2016 09:30:27 +0100	[thread overview]
Message-ID: <20160601083027.GB2898@e104805> (raw)
In-Reply-To: <1464690309-27809-1-git-send-email-lukasz.luba@arm.com>

On Tue, May 31, 2016 at 11:25:09AM +0100, Lukasz Luba wrote:
> Some systems need current frequency from last_status for calculation
> but it is zeroed during initialization. When the device starts there is
> no history, but we can assume that the last frequency was the
> same as the initial frequency (which is also used in 'previous_freq').
> The log shows the result of this misinterpreted value.
> [    2.042847] ... Failed to get voltage for frequency 0: -34
> 
> Signed-off-by: Lukasz Luba <lukasz.luba@arm.com>

Looks good to me,

Reviewed-by: Javi Merino <javi.merino@arm.com>

> ---
>  drivers/devfreq/devfreq.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/devfreq/devfreq.c b/drivers/devfreq/devfreq.c
> index 984c5e9..a3f2c3b 100644
> --- a/drivers/devfreq/devfreq.c
> +++ b/drivers/devfreq/devfreq.c
> @@ -515,6 +515,7 @@ struct devfreq *devfreq_add_device(struct device *dev,
>  	devfreq->profile = profile;
>  	strncpy(devfreq->governor_name, governor_name, DEVFREQ_NAME_LEN);
>  	devfreq->previous_freq = profile->initial_freq;
> +	devfreq->last_status.current_frequency = profile->initial_freq;
>  	devfreq->data = data;
>  	devfreq->nb.notifier_call = devfreq_notifier_call;
>  
> -- 
> 1.9.1
> 

  reply	other threads:[~2016-06-01  8:30 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-05-31 10:25 [PATCH] devfreq: fix initialization of current frequency in last status Lukasz Luba
2016-06-01  8:30 ` Javi Merino [this message]
  -- strict thread matches above, loose matches on Subject: below --
2016-06-01 10:23 MyungJoo Ham

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=20160601083027.GB2898@e104805 \
    --to=javi.merino@arm.com \
    --cc=kyungmin.park@samsung.com \
    --cc=linux-pm@vger.kernel.org \
    --cc=lukasz.luba@arm.com \
    --cc=myungjoo.ham@samsung.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox