[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <e1b5ad4f-79ef-4c5c-8e4c-b9e7b9598d76@huawei.com>
Date: Wed, 14 Jan 2026 17:46:32 +0800
From: "zhenglifeng (A)" <zhenglifeng1@...wei.com>
To: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>, Chanwoo Choi
<cw00.choi@...sung.com>, <linux-pm@...r.kernel.org>,
<linux-kernel@...r.kernel.org>
CC: MyungJoo Ham <myungjoo.ham@...sung.com>, Kyungmin Park
<kyungmin.park@...sung.com>
Subject: Re: [PATCH v1 1/1] PM/devfreq: Remove unneeded casting for HZ_PER_KHZ
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@...ux.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@...wei.com>
Powered by blists - more mailing lists