linux-iio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Lars-Peter Clausen <lars@metafoo.de>
To: Dan Carpenter <dan.carpenter@oracle.com>
Cc: Michael Hennerich <Michael.Hennerich@analog.com>,
	Jonathan Cameron <jic23@kernel.org>,
	Hartmut Knaack <knaack.h@gmx.de>,
	Peter Meerwald <pmeerw@pmeerw.net>,
	linux-iio@vger.kernel.org, kernel-janitors@vger.kernel.org,
	Rasmus Villemoes <linux@rasmusvillemoes.dk>
Subject: Re: [patch] iio: imu: adis16400: Fix sign extension
Date: Fri, 30 Jan 2015 09:34:01 +0100	[thread overview]
Message-ID: <54CB41F9.1060800@metafoo.de> (raw)
In-Reply-To: <20150130083058.GD21357@mwanda>

On 01/30/2015 09:30 AM, Dan Carpenter wrote:
> Because of C's type promotion rules, the code shifts in
> "((val16 & 0xFFF) << 4) >> 4;" cancel each other out and they're a
> no-op.
>
> The intention here was to sign-extend then 11th bit so we can use the
> sign_extend32() function.
>
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
> ---
> Please review this carefully.  I'm pretty sure it's correct but this is
> the first time I've ever used the sign_extend32() function.

Hi,

Rasmus already fixed this a couple of days ago.

Thanks,
- Lars

  reply	other threads:[~2015-01-30  8:34 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-30  8:30 [patch] iio: imu: adis16400: Fix sign extension Dan Carpenter
2015-01-30  8:34 ` Lars-Peter Clausen [this message]
2015-01-30  9:22   ` Dan Carpenter
2015-01-30  9:31     ` Rasmus Villemoes
2015-01-30 10:23       ` Dan Carpenter
  -- strict thread matches above, loose matches on Subject: below --
2015-01-22 23:34 [PATCH] " Rasmus Villemoes
2015-01-23  8:56 ` Lars-Peter Clausen
2015-01-26 21:07   ` Jonathan Cameron

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=54CB41F9.1060800@metafoo.de \
    --to=lars@metafoo.de \
    --cc=Michael.Hennerich@analog.com \
    --cc=dan.carpenter@oracle.com \
    --cc=jic23@kernel.org \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=knaack.h@gmx.de \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux@rasmusvillemoes.dk \
    --cc=pmeerw@pmeerw.net \
    /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;
as well as URLs for NNTP newsgroup(s).