From: Daniel Lezcano <daniel.lezcano@xxxxxxxxxx> Subject: thermal/drivers/devfreq_cooling: use HZ macros HZ unit conversion macros are available in units.h, use them and remove the duplicate definition. The new macro uses a unsigned long type which is already the type in the current code via the 'freq' variable. Link: https://lkml.kernel.org/r/20210816114732.1834145-4-daniel.lezcano@xxxxxxxxxx Signed-off-by: Daniel Lezcano <daniel.lezcano@xxxxxxxxxx> Reviewed-by: Andy Shevchenko <andriy.shevchenko@xxxxxxxxxxxxxxx> Reviewed-by: Christian Eggers <ceggers@xxxxxxx> Cc: Chanwoo Choi <cw00.choi@xxxxxxxxxxx> Cc: Guenter Roeck <linux@xxxxxxxxxxxx> Cc: Jonathan Cameron <jic23@xxxxxxxxxx> Cc: Jonathan Cameron <Jonathan.Cameron@xxxxxxxxxx> Cc: Kyungmin Park <kyungmin.park@xxxxxxxxxxx> Cc: Lars-Peter Clausen <lars@xxxxxxxxxx> Cc: Lukasz Luba <lukasz.luba@xxxxxxx> Cc: Maxime Coquelin <mcoquelin.stm32@xxxxxxxxx> Cc: Miquel Raynal <miquel.raynal@xxxxxxxxxxx> Cc: MyungJoo Ham <myungjoo.ham@xxxxxxxxxxx> Cc: Peter Meerwald <pmeerw@xxxxxxxxxx> Cc: "Rafael J. Wysocki" <rafael@xxxxxxxxxx> Cc: Zhang Rui <rui.zhang@xxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- drivers/thermal/devfreq_cooling.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/drivers/thermal/devfreq_cooling.c~thermal-drivers-devfreq_cooling-use-hz-macros +++ a/drivers/thermal/devfreq_cooling.c @@ -18,10 +18,10 @@ #include <linux/pm_opp.h> #include <linux/pm_qos.h> #include <linux/thermal.h> +#include <linux/units.h> #include <trace/events/thermal.h> -#define HZ_PER_KHZ 1000 #define SCALE_ERROR_MITIGATION 100 /** _