From: Andy Shevchenko Date: Wed, 14 Jan 2026 09:31:15 +0000 (+0100) Subject: PM / devfreq: Remove unneeded casting for HZ_PER_KHZ X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=82bb8dc953c2203bb710b7358f030b1d9bdf698d;p=thirdparty%2Fkernel%2Flinux.git PM / devfreq: Remove unneeded casting for HZ_PER_KHZ HZ_PER_KHZ is defined as UL (unsigned long), no need to repeat that. Signed-off-by: Andy Shevchenko Reviewed-by: Lifeng Zheng Acked-by: MyungJoo Ham Signed-off-by: Chanwoo Choi Link: https://lore.kernel.org/lkml/20260114093115.276818-1-andriy.shevchenko@linux.intel.com/ --- diff --git a/drivers/devfreq/devfreq.c b/drivers/devfreq/devfreq.c index c0a74091b9041..54f0b18536db3 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);