public inbox for linux-pm@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v1 1/1] PM/devfreq: Remove unneeded casting for HZ_PER_KHZ
@ 2026-01-14  9:31 ` Andy Shevchenko
  2026-01-14  9:46   ` zhenglifeng (A)
  2026-01-20  9:32   ` MyungJoo Ham
  0 siblings, 2 replies; 4+ messages in thread
From: Andy Shevchenko @ 2026-01-14  9:31 UTC (permalink / raw)
  To: Chanwoo Choi, Lifeng Zheng, linux-pm, linux-kernel
  Cc: MyungJoo Ham, Kyungmin Park, Andy Shevchenko

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);
-- 
2.50.1


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH v1 1/1] PM/devfreq: Remove unneeded casting for HZ_PER_KHZ
  2026-01-14  9:31 ` [PATCH v1 1/1] PM/devfreq: Remove unneeded casting for HZ_PER_KHZ Andy Shevchenko
@ 2026-01-14  9:46   ` zhenglifeng (A)
  2026-01-20  9:32   ` MyungJoo Ham
  1 sibling, 0 replies; 4+ messages in thread
From: zhenglifeng (A) @ 2026-01-14  9:46 UTC (permalink / raw)
  To: Andy Shevchenko, Chanwoo Choi, linux-pm, linux-kernel
  Cc: MyungJoo Ham, Kyungmin Park

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>

^ permalink raw reply	[flat|nested] 4+ messages in thread

* RE: [PATCH v1 1/1] PM/devfreq: Remove unneeded casting for HZ_PER_KHZ
  2026-01-14  9:31 ` [PATCH v1 1/1] PM/devfreq: Remove unneeded casting for HZ_PER_KHZ Andy Shevchenko
  2026-01-14  9:46   ` zhenglifeng (A)
@ 2026-01-20  9:32   ` MyungJoo Ham
  2026-02-04  2:45     ` Andy Shevchenko
  1 sibling, 1 reply; 4+ messages in thread
From: MyungJoo Ham @ 2026-01-20  9:32 UTC (permalink / raw)
  To: Chanwoo Choi
  Cc: Andy Shevchenko, linux-pm@vger.kernel.org,
	linux-kernel@vger.kernel.org, Kyungmin Park

>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(-)
>

Acked-by: MyungJoo Ham <myungjoo.ham@samsung.com>

PTAL, Chanwoo.


Cheers,
MyungJoo

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH v1 1/1] PM/devfreq: Remove unneeded casting for HZ_PER_KHZ
  2026-01-20  9:32   ` MyungJoo Ham
@ 2026-02-04  2:45     ` Andy Shevchenko
  0 siblings, 0 replies; 4+ messages in thread
From: Andy Shevchenko @ 2026-02-04  2:45 UTC (permalink / raw)
  To: MyungJoo Ham
  Cc: Chanwoo Choi, linux-pm@vger.kernel.org,
	linux-kernel@vger.kernel.org, Kyungmin Park

On Tue, Jan 20, 2026 at 06:32:20PM +0900, MyungJoo Ham 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(-)
> >
> 
> Acked-by: MyungJoo Ham <myungjoo.ham@samsung.com>

Can it be applied, please?

-- 
With Best Regards,
Andy Shevchenko



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2026-02-04  2:45 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <CGME20260114093125epcas1p17c29852c6b5b066057b60c9a7795be77@epcms1p5>
2026-01-14  9:31 ` [PATCH v1 1/1] PM/devfreq: Remove unneeded casting for HZ_PER_KHZ Andy Shevchenko
2026-01-14  9:46   ` zhenglifeng (A)
2026-01-20  9:32   ` MyungJoo Ham
2026-02-04  2:45     ` Andy Shevchenko

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox