PM/devfreq: Remove unneeded casting for HZ_PER_KHZ
PATCH 1/1 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]>
--- drivers/devfreq/devfreq.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-)
drivers/devfreq/devfreq.c +2 -3
@@ -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);
Signature · 1 line
2.50.1
Quoted 14 lines · Andy Shevchenko
HZ_PER_KHZis defined as UL (unsigned long), no need to repeat that.Signed-off-by Andy Shevchenko <[email protected]>--- drivers/devfreq/devfreq.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-)drivers/devfreq/devfreq.c +0
-0@@ -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,
drivers/devfreq/devfreq.c void devfreq_get_freq_range(struct devfreq *devfreq, · line 154
Quoted 10 lines
drivers/devfreq/devfreq.c +2
-3DEV_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 <[email protected]>
Quoted 7 lines
HZ_PER_KHZis defined as UL (unsigned long), no need to repeat that.Signed-off-by Andy Shevchenko <[email protected]>---
drivers/devfreq/devfreq.c| 5 ++---1 file changed, 2 insertions(+), 3 deletions(-)
Acked-by MyungJoo Ham <[email protected]>
PTAL, Chanwoo.
Cheers,
MyungJoo
Quoted 9 lines · MyungJoo Ham
Quoted 7 lines
HZ_PER_KHZis defined as UL (unsigned long), no need to repeat that.Signed-off-by Andy Shevchenko <[email protected]>---
drivers/devfreq/devfreq.c| 5 ++---1 file changed, 2 insertions(+), 3 deletions(-)Acked-by MyungJoo Ham <[email protected]>
Can it be applied, please?
Signature · 2 lines
With Best Regards, Andy Shevchenko