Skip to content

Commit

Permalink
thermal: remove kelvin to/from Celsius conversion helpers from <linux…
Browse files Browse the repository at this point in the history
…/thermal.h>

This removes the kelvin to/from Celsius conversion helper macros in
<linux/thermal.h> which were switched to the inline helper functions in
<linux/units.h>.

Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Akinobu Mita <[email protected]>
Reviewed-by: Andy Shevchenko <[email protected]>
Cc: Sujith Thomas <[email protected]>
Cc: Darren Hart <[email protected]>
Cc: Andy Shevchenko <[email protected]>
Cc: Zhang Rui <[email protected]>
Cc: Daniel Lezcano <[email protected]>
Cc: Amit Kucheria <[email protected]>
Cc: Jean Delvare <[email protected]>
Cc: Guenter Roeck <[email protected]>
Cc: Keith Busch <[email protected]>
Cc: Jens Axboe <[email protected]>
Cc: Christoph Hellwig <[email protected]>
Cc: Sagi Grimberg <[email protected]>
Cc: Emmanuel Grumbach <[email protected]>
Cc: Hartmut Knaack <[email protected]>
Cc: Johannes Berg <[email protected]>
Cc: Jonathan Cameron <[email protected]>
Cc: Jonathan Cameron <[email protected]>
Cc: Kalle Valo <[email protected]>
Cc: Lars-Peter Clausen <[email protected]>
Cc: Luca Coelho <[email protected]>
Cc: Peter Meerwald-Stadler <[email protected]>
Cc: Stanislaw Gruszka <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
mita authored and torvalds committed Jan 31, 2020
1 parent 7724cd2 commit cdf309f
Showing 1 changed file with 0 additions and 11 deletions.
11 changes: 0 additions & 11 deletions include/linux/thermal.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,17 +32,6 @@
/* use value, which < 0K, to indicate an invalid/uninitialized temperature */
#define THERMAL_TEMP_INVALID -274000

/* Unit conversion macros */
#define DECI_KELVIN_TO_CELSIUS(t) ({ \
long _t = (t); \
((_t-2732 >= 0) ? (_t-2732+5)/10 : (_t-2732-5)/10); \
})
#define CELSIUS_TO_DECI_KELVIN(t) ((t)*10+2732)
#define DECI_KELVIN_TO_MILLICELSIUS_WITH_OFFSET(t, off) (((t) - (off)) * 100)
#define DECI_KELVIN_TO_MILLICELSIUS(t) DECI_KELVIN_TO_MILLICELSIUS_WITH_OFFSET(t, 2732)
#define MILLICELSIUS_TO_DECI_KELVIN_WITH_OFFSET(t, off) (((t) / 100) + (off))
#define MILLICELSIUS_TO_DECI_KELVIN(t) MILLICELSIUS_TO_DECI_KELVIN_WITH_OFFSET(t, 2732)

/* Default Thermal Governor */
#if defined(CONFIG_THERMAL_DEFAULT_GOV_STEP_WISE)
#define DEFAULT_THERMAL_GOVERNOR "step_wise"
Expand Down

0 comments on commit cdf309f

Please sign in to comment.