lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAHp75Vfq4KqNAGY4ivveR7D0Z1fA1EOFT+oL9+f+Ak2jikCTVg@mail.gmail.com>
Date:   Wed, 11 Dec 2019 17:29:12 +0200
From:   Andy Shevchenko <andy.shevchenko@...il.com>
To:     Akinobu Mita <akinobu.mita@...il.com>
Cc:     Linux NVMe Mailinglist <linux-nvme@...ts.infradead.org>,
        linux-hwmon@...r.kernel.org, Linux PM <linux-pm@...r.kernel.org>,
        "open list:TI WILINK WIRELES..." <linux-wireless@...r.kernel.org>,
        linux-iio <linux-iio@...r.kernel.org>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        Sujith Thomas <sujith.thomas@...el.com>,
        Darren Hart <dvhart@...radead.org>,
        Andy Shevchenko <andy@...radead.org>,
        Zhang Rui <rui.zhang@...el.com>,
        Daniel Lezcano <daniel.lezcano@...aro.org>,
        Amit Kucheria <amit.kucheria@...durent.com>,
        Jean Delvare <jdelvare@...e.com>,
        Guenter Roeck <linux@...ck-us.net>,
        Keith Busch <kbusch@...nel.org>, Jens Axboe <axboe@...com>,
        Christoph Hellwig <hch@....de>,
        Sagi Grimberg <sagi@...mberg.me>
Subject: Re: [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@...il.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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ