Skip to content

Commit 82bb8dc

Browse files
andy-shevchanwoochoi
authored andcommitted
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 <[email protected]> Reviewed-by: Lifeng Zheng <[email protected]> Acked-by: MyungJoo Ham <[email protected]> Signed-off-by: Chanwoo Choi <[email protected]> Link: https://lore.kernel.org/lkml/[email protected]/
1 parent 7aaa804 commit 82bb8dc

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

drivers/devfreq/devfreq.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -146,10 +146,9 @@ void devfreq_get_freq_range(struct devfreq *devfreq,
146146
DEV_PM_QOS_MIN_FREQUENCY);
147147
qos_max_freq = dev_pm_qos_read_value(devfreq->dev.parent,
148148
DEV_PM_QOS_MAX_FREQUENCY);
149-
*min_freq = max(*min_freq, (unsigned long)HZ_PER_KHZ * qos_min_freq);
149+
*min_freq = max(*min_freq, HZ_PER_KHZ * qos_min_freq);
150150
if (qos_max_freq != PM_QOS_MAX_FREQUENCY_DEFAULT_VALUE)
151-
*max_freq = min(*max_freq,
152-
(unsigned long)HZ_PER_KHZ * qos_max_freq);
151+
*max_freq = min(*max_freq, HZ_PER_KHZ * qos_max_freq);
153152

154153
/* Apply constraints from OPP interface */
155154
*max_freq = clamp(*max_freq, devfreq->scaling_min_freq, devfreq->scaling_max_freq);

0 commit comments

Comments
 (0)