All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andreas Mohr <andi@lisas.de>
To: Peter Feuerer <peter@piie.net>
Cc: Borislav Petkov <petkovbb@gmail.com>,
	linux-kernel@vger.kernel.org, Andreas Mohr <andi@lisas.de>
Subject: Re: [Patch] acerhdf: Return temperature in milidegree
Date: Mon, 19 Oct 2009 11:16:17 +0200	[thread overview]
Message-ID: <20091019091617.GA13277@rhlx01.hs-esslingen.de> (raw)
In-Reply-To: <20091019102116.222ff9c3.peter@piie.net>

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

  reply	other threads:[~2009-10-19  9:16 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-10-19  8:21 [Patch] acerhdf: Return temperature in milidegree Peter Feuerer
2009-10-19  9:16 ` Andreas Mohr [this message]
2009-10-19 21:24   ` Peter Feuerer
2009-10-20  5:25     ` Andreas Mohr
2009-10-19 18:51 ` Borislav Petkov
2009-10-19 21:11   ` Peter Feuerer
2009-10-20  7:27     ` Borislav Petkov
2009-11-02 11:02       ` Peter Feuerer
2009-11-02 12:49         ` Borislav Petkov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20091019091617.GA13277@rhlx01.hs-esslingen.de \
    --to=andi@lisas.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=peter@piie.net \
    --cc=petkovbb@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.