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]
Date:	Mon, 19 Oct 2009 11:16:17 +0200
From:	Andreas Mohr <andi@...as.de>
To:	Peter Feuerer <peter@...e.net>
Cc:	Borislav Petkov <petkovbb@...il.com>, linux-kernel@...r.kernel.org,
	Andreas Mohr <andi@...as.de>
Subject: Re: [Patch] acerhdf: Return temperature in milidegree

Hi,

On Mon, Oct 19, 2009 at 10:21:16AM +0200, Peter Feuerer wrote:
> 
> Hi Boris,
> 
> what do you think about this patch?

Personally I'm hurting a bit due to the open-coded "* 1000" transition
in all places.

I'd add a helper macro
#define TEMP_DEGREE_TO_SYS(x) ((x) * 1000)
and use that in all places where it matters.

Advantage:
- either no mistyping (10000 instead of 1000) _or_ bug occurring in _all_
  places where this macro is used
- easily grepped-for
- easily changed once the system granularity gets updated

Andreas Mohr
--
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

Powered by Openwall GNU/*/Linux Powered by OpenVZ