public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Evgeniy Polyakov <zbr@ioremap.net>
To: Harvey Harrison <harvey.harrison@gmail.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	linux-kernel@vger.kernel.org,
	Ian Dall <ian@beware.dropbear.id.au>
Subject: Re: [1/1] w1: w1 temp calculation overflow fix.
Date: Tue, 10 Feb 2009 01:09:59 +0300	[thread overview]
Message-ID: <20090209220959.GB15633@ioremap.net> (raw)
In-Reply-To: <1234216124.5574.12.camel@brick>

On Mon, Feb 09, 2009 at 01:48:44PM -0800, Harvey Harrison (harvey.harrison@gmail.com) wrote:
> >  {
> > -	s16 t = (rom[1] << 8) | rom[0];
> > +	int t = ((s16)rom[1] << 8) | rom[0];
> 
> Alternatively,
> 
> 	int t = (s16)le16_to_cpup((__le16 *)rom);

Well, yes, but for the consistency with the other conversation functions
I think above is more appropriate.

-- 
	Evgeniy Polyakov

  reply	other threads:[~2009-02-09 22:10 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-02-09 21:42 [1/1] w1: w1 temp calculation overflow fix Evgeniy Polyakov
2009-02-09 21:48 ` Harvey Harrison
2009-02-09 22:09   ` Evgeniy Polyakov [this message]
2009-02-09 21:56 ` Andrew Morton
2009-02-09 22:08   ` Evgeniy Polyakov
2009-02-09 22:48     ` Andrew Morton
2009-02-09 23:31       ` Andrew Morton
2009-02-10  8:54         ` Evgeniy Polyakov
2009-02-11  6:41         ` Ian Dall

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=20090209220959.GB15633@ioremap.net \
    --to=zbr@ioremap.net \
    --cc=akpm@linux-foundation.org \
    --cc=harvey.harrison@gmail.com \
    --cc=ian@beware.dropbear.id.au \
    --cc=linux-kernel@vger.kernel.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox