linux-iio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jonathan Cameron <jic23@kernel.org>
To: Cristina Ciocan <cristina.ciocan@intel.com>, linux-iio@vger.kernel.org
Cc: lars@metafoo.de, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] iio: Fix IIO_EVENT_CODE_EXTRACT_DIR bit mask
Date: Sat, 15 Nov 2014 16:04:48 +0000	[thread overview]
Message-ID: <546779A0.1040507@kernel.org> (raw)
In-Reply-To: <1415714862-5709-1-git-send-email-cristina.ciocan@intel.com>

On 11/11/14 14:07, Cristina Ciocan wrote:
> The direction field is set on 7 bits, thus we need to AND it with 0111 111 mask
> in order to retrieve it, that is 0x7F, not 0xCF as it is now.
> 
> Fixes: ade7ef7ba (staging:iio: Differential channel handling)
> Signed-off-by: Cristina Ciocan <cristina.ciocan@intel.com>
Applied to the fixes togreg branch of iio,git.

Thanks,

Jonathan
> ---
>  include/linux/iio/events.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/include/linux/iio/events.h b/include/linux/iio/events.h
> index 8bbd7bc..03fa332 100644
> --- a/include/linux/iio/events.h
> +++ b/include/linux/iio/events.h
> @@ -72,7 +72,7 @@ struct iio_event_data {
> 
>  #define IIO_EVENT_CODE_EXTRACT_TYPE(mask) ((mask >> 56) & 0xFF)
> 
> -#define IIO_EVENT_CODE_EXTRACT_DIR(mask) ((mask >> 48) & 0xCF)
> +#define IIO_EVENT_CODE_EXTRACT_DIR(mask) ((mask >> 48) & 0x7F)
> 
>  #define IIO_EVENT_CODE_EXTRACT_CHAN_TYPE(mask) ((mask >> 32) & 0xFF)
> 
> --
> 1.8.1.2
> 


      reply	other threads:[~2014-11-15 16:04 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-11-11 14:07 [PATCH] iio: Fix IIO_EVENT_CODE_EXTRACT_DIR bit mask Cristina Ciocan
2014-11-15 16:04 ` Jonathan Cameron [this message]

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=546779A0.1040507@kernel.org \
    --to=jic23@kernel.org \
    --cc=cristina.ciocan@intel.com \
    --cc=lars@metafoo.de \
    --cc=linux-iio@vger.kernel.org \
    --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;
as well as URLs for NNTP newsgroup(s).