From: "zhenglifeng (A)" <zhenglifeng1@huawei.com>
To: Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
Chanwoo Choi <cw00.choi@samsung.com>, <linux-pm@vger.kernel.org>,
<linux-kernel@vger.kernel.org>
Cc: MyungJoo Ham <myungjoo.ham@samsung.com>,
Kyungmin Park <kyungmin.park@samsung.com>
Subject: Re: [PATCH v1 1/1] PM/devfreq: Remove unneeded casting for HZ_PER_KHZ
Date: Wed, 14 Jan 2026 17:46:32 +0800 [thread overview]
Message-ID: <e1b5ad4f-79ef-4c5c-8e4c-b9e7b9598d76@huawei.com> (raw)
In-Reply-To: <20260114093115.276818-1-andriy.shevchenko@linux.intel.com>
On 2026/1/14 17:31, Andy Shevchenko wrote:
> HZ_PER_KHZ is defined as UL (unsigned long), no need to repeat that.
>
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> ---
> drivers/devfreq/devfreq.c | 5 ++---
> 1 file changed, 2 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/devfreq/devfreq.c b/drivers/devfreq/devfreq.c
> index 00979f2e0e27..51eb67fba44b 100644
> --- a/drivers/devfreq/devfreq.c
> +++ b/drivers/devfreq/devfreq.c
> @@ -146,10 +146,9 @@ void devfreq_get_freq_range(struct devfreq *devfreq,
> DEV_PM_QOS_MIN_FREQUENCY);
> qos_max_freq = dev_pm_qos_read_value(devfreq->dev.parent,
> DEV_PM_QOS_MAX_FREQUENCY);
> - *min_freq = max(*min_freq, (unsigned long)HZ_PER_KHZ * qos_min_freq);
> + *min_freq = max(*min_freq, HZ_PER_KHZ * qos_min_freq);
> if (qos_max_freq != PM_QOS_MAX_FREQUENCY_DEFAULT_VALUE)
> - *max_freq = min(*max_freq,
> - (unsigned long)HZ_PER_KHZ * qos_max_freq);
> + *max_freq = min(*max_freq, HZ_PER_KHZ * qos_max_freq);
>
> /* Apply constraints from OPP interface */
> *max_freq = clamp(*max_freq, devfreq->scaling_min_freq, devfreq->scaling_max_freq);
Make sense. Thanks!
Reviewed-by: Lifeng Zheng <zhenglifeng1@huawei.com>
next prev parent reply other threads:[~2026-01-14 9:46 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-14 9:31 Andy Shevchenko
2026-01-14 9:46 ` zhenglifeng (A) [this message]
[not found] ` <CGME20260114093125epcas1p17c29852c6b5b066057b60c9a7795be77@epcms1p5>
2026-01-20 9:32 ` MyungJoo Ham
2026-02-04 2:45 ` Andy Shevchenko
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=e1b5ad4f-79ef-4c5c-8e4c-b9e7b9598d76@huawei.com \
--to=zhenglifeng1@huawei.com \
--cc=andriy.shevchenko@linux.intel.com \
--cc=cw00.choi@samsung.com \
--cc=kyungmin.park@samsung.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--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
all inboxes | Powered by JetHome®