From: MyungJoo Ham <myungjoo.ham@samsung.com>
To: 최찬우 <cw00.choi@samsung.com>, 박경민 <kyungmin.park@samsung.com>
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"linux-pm@vger.kernel.org" <linux-pm@vger.kernel.org>
Subject: Re: [PATCH 4/6] PM / devfreq: Set the freq_table of devfreq device
Date: Mon, 23 Nov 2015 07:29:43 +0000 (GMT) [thread overview]
Message-ID: <106136506.126661448263783195.JavaMail.weblogic@epmlwas06a> (raw)
>
> This patch initialize the freq_table array of each devfreq device by using
> the devfreq_set_freq_table(). If freq_table is NULL, the devfreq framework
> is not able to support the frequency transtion information through sysfs.
>
> The OPP core uses the integer type for the number of opps in the opp list
> and uses the 'unsigned long' type for each frequency. So, this patch modifies
> the type of some variable as following:
> - the type of freq_table : unsigned int -> unsigned long
> - the type of max_state : unsigned int -> int
>
> Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
[]
> +/**
> * devfreq_update_status() - Update statistics of devfreq behavior
> * @devfreq: the devfreq instance
> * @freq: the update target frequency
> @@ -477,7 +516,12 @@ struct devfreq *devfreq_add_device(struct device *dev,
> devfreq->previous_freq = profile->initial_freq;
> devfreq->data = data;
> devfreq->nb.notifier_call = devfreq_notifier_call;
> + mutex_unlock(&devfreq->lock);
>
> + if (devfreq->profile->max_state <= 0 && !devfreq->profile->freq_table)
> + devfreq_set_freq_table(devfreq);
> +
> + mutex_lock(&devfreq->lock);
Anyway, what about modifying the block above as:
+ if (!devfreq->profile->max_state && !devfreq->profile->freq_table) {
+ mutex_unlock(&devfreq->lock);
devfreq_set_freq_table(devfreq);
+ mutex_lock(&devfreq->lock);
+ }
> devfreq->trans_table = devm_kzalloc(dev, sizeof(unsigned int) *
> devfreq->profile->max_state *
> devfreq->profile->max_state,
[]
If that's not a problem, I'll squash
https://git.kernel.org/cgit/linux/kernel/git/mzx/devfreq.git/commit/?h=for-rafael&id=55df2b43cdb5ac82d26b64d739f3d758c9b7486c
with the given patch.
next reply other threads:[~2015-11-23 7:29 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-11-23 7:29 MyungJoo Ham [this message]
2015-11-23 8:51 ` [PATCH 4/6] PM / devfreq: Set the freq_table of devfreq device Chanwoo Choi
-- strict thread matches above, loose matches on Subject: below --
2015-11-23 6:44 MyungJoo Ham
2015-11-19 8:17 [PATCH 0/6] PM / devfreq: Clean code and add set the freq_table array Chanwoo Choi
2015-11-19 8:17 ` [PATCH 4/6] PM / devfreq: Set the freq_table of devfreq device Chanwoo Choi
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=106136506.126661448263783195.JavaMail.weblogic@epmlwas06a \
--to=myungjoo.ham@samsung.com \
--cc=cw00.choi@samsung.com \
--cc=kyungmin.park@samsung.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.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