lkml.org 
[lkml]   [2019]   [Dec]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH v3 02/12] ACPI: thermal: switch to use <linux/units.h> helpers
On Wed, Dec 11, 2019 at 4:39 PM Akinobu Mita <akinobu.mita@gmail.com> wrote:
>
> This switches the ACPI thermal zone driver to use celsius_to_deci_kelvin(),
> deci_kelvin_to_celsius(), and deci_kelvin_to_millicelsius_with_offset() in
> <linux/units.h> instead of helpers in <linux/thermal.h>.
>
> This is preparation for centralizing the kelvin to/from Celsius conversion
> helpers in <linux/units.h>.

> #include <linux/reboot.h>
> #include <linux/device.h>
> #include <linux/thermal.h>

> +#include <linux/units.h>

Can we try to keep *some* order, i.e. put this after acpi.h below?

> #include <linux/acpi.h>
> #include <linux/workqueue.h>
> #include <linux/uaccess.h>

> } else if (crt > 0) {
> - unsigned long crt_k = CELSIUS_TO_DECI_KELVIN(crt);
> + unsigned long crt_k =
> + celsius_to_deci_kelvin(crt);

It used to be one line, why do two?

> pr_info(PREFIX "%s [%s] (%ld C)\n", acpi_device_name(device),
> - acpi_device_bid(device), DECI_KELVIN_TO_CELSIUS(tz->temperature));
> + acpi_device_bid(device),
> + deci_kelvin_to_celsius(tz->temperature));

Ditto.

--
With Best Regards,
Andy Shevchenko

\
 
 \ /
  Last update: 2019-12-11 16:31    [W:0.101 / U:0.780 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site