[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20140324174528.GC22346@e102654-lin.cambridge.arm.com>
Date: Mon, 24 Mar 2014 17:45:28 +0000
From: Javi Merino <javi.merino@....com>
To: Rasmus Villemoes <linux@...musvillemoes.dk>
Cc: Zhang Rui <rui.zhang@...el.com>, Len Brown <lenb@...nel.org>,
"Rafael J. Wysocki" <rjw@...ysocki.net>,
Corentin Chary <corentin.chary@...il.com>,
Matthew Garrett <matthew.garrett@...ula.com>,
Sujith Thomas <sujith.thomas@...el.com>,
Eduardo Valentin <eduardo.valentin@...com>,
"linux-acpi@...r.kernel.org" <linux-acpi@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"acpi4asus-user@...ts.sourceforge.net"
<acpi4asus-user@...ts.sourceforge.net>,
"platform-driver-x86@...r.kernel.org"
<platform-driver-x86@...r.kernel.org>,
"linux-pm@...r.kernel.org" <linux-pm@...r.kernel.org>,
Joe Perches <joe@...ches.com>
Subject: Re: [PATCH] linux/thermal.h: Rename KELVIN_TO_CELSIUS to
DECI_KELVIN_TO_CELSIUS
On Mon, Mar 24, 2014 at 05:29:09PM +0000, Rasmus Villemoes wrote:
> The macros KELVIN_TO_CELSIUS and CELSIUS_TO_KELVIN actually work on
> decikelvins, so rename them to reflect their actual semantics.
>
> Signed-off-by: Rasmus Villemoes <linux@...musvillemoes.dk>
> ---
> drivers/acpi/thermal.c | 12 ++++++------
> drivers/platform/x86/asus-wmi.c | 2 +-
> drivers/platform/x86/intel_menlow.c | 8 ++++----
> include/linux/thermal.h | 6 +++---
> 4 files changed, 14 insertions(+), 14 deletions(-)
[snip]
> diff --git a/include/linux/thermal.h b/include/linux/thermal.h
> index f7e11c7..c978aa3 100644
> --- a/include/linux/thermal.h
> +++ b/include/linux/thermal.h
> @@ -41,9 +41,9 @@
> #define THERMAL_NO_LIMIT THERMAL_CSTATE_INVALID
>
> /* Unit conversion macros */
> -#define KELVIN_TO_CELSIUS(t) (long)(((long)t-2732 >= 0) ? \
> - ((long)t-2732+5)/10 : ((long)t-2732-5)/10)
> -#define CELSIUS_TO_KELVIN(t) ((t)*10+2732)
> +#define DECI_KELVIN_TO_CELSIUS(t) (long)(((long)t-2732 >= 0) ? \
> + ((long)t-2732+5)/10 : ((long)t-2732-5)/10)
> +#define CELSIUS_TO_DECI_KELVIN(t) ((t)*10+2732)
While you are at it, you could also make it use a statement expression
as Joe Perches suggested earlier:
http://thread.gmane.org/gmane.linux.power-management.general/43978/focus=1671955
Cheers,
Javi
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists