From: Jonathan Cameron <jic23@kernel.org>
To: Alexandre Belloni <alexandre.belloni@free-electrons.com>
Cc: Jonathan Cameron <jic23@cam.ac.uk>,
Maxime Ripard <maxime.ripard@free-electrons.com>,
Thomas Petazzoni <thomas.petazzoni@free-electrons.com>,
Gregory Clement <gregory.clement@free-electrons.com>,
linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org,
Lars-Peter Clausen <lars@metafoo.de>,
stable@vger.kernel.org
Subject: Re: [PATCH] iio: Fix iio_channel_has_info
Date: Tue, 02 Jul 2013 22:10:24 +0100 [thread overview]
Message-ID: <51D341C0.1060904@kernel.org> (raw)
In-Reply-To: <1372688430-13120-1-git-send-email-alexandre.belloni@free-electrons.com>
On 07/01/2013 03:20 PM, Alexandre Belloni wrote:
> Since the info_mask split, iio_channel_has_info() is not working correctly.
> info_mask_separate and info_mask_shared_by_type, it is not possible to compare
> them directly with the iio_chan_info_enum enum. Correct that bit using the BIT()
> macro.
>
> Cc: <stable@vger.kernel.org> # 3.10.x
> Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
ouch / oops is about all I can say to this one. Ideally might have had a note
in the description about what the effect of this bug is (breakage in the inkern interface)
Thanks and applied to the fixes-togreg branch of iio.git
> ---
> include/linux/iio/iio.h | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/include/linux/iio/iio.h b/include/linux/iio/iio.h
> index 8d171f4..3d35b70 100644
> --- a/include/linux/iio/iio.h
> +++ b/include/linux/iio/iio.h
> @@ -211,8 +211,8 @@ struct iio_chan_spec {
> static inline bool iio_channel_has_info(const struct iio_chan_spec *chan,
> enum iio_chan_info_enum type)
> {
> - return (chan->info_mask_separate & type) |
> - (chan->info_mask_shared_by_type & type);
> + return (chan->info_mask_separate & BIT(type)) |
> + (chan->info_mask_shared_by_type & BIT(type));
> }
>
> #define IIO_ST(si, rb, sb, sh) \
>
prev parent reply other threads:[~2013-07-02 21:10 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-07-01 14:20 [PATCH] iio: Fix iio_channel_has_info Alexandre Belloni
2013-07-02 21:10 ` 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=51D341C0.1060904@kernel.org \
--to=jic23@kernel.org \
--cc=alexandre.belloni@free-electrons.com \
--cc=gregory.clement@free-electrons.com \
--cc=jic23@cam.ac.uk \
--cc=lars@metafoo.de \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=maxime.ripard@free-electrons.com \
--cc=stable@vger.kernel.org \
--cc=thomas.petazzoni@free-electrons.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.