Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1467247 > unrolled thread

Re: [PATCH] staging: comedi: dt2811: add parentheses to fix logic on s->subdev_flags

Started byGreg Kroah-Hartman <gregkh@linuxfoundation.org>
First post2016-08-21 23:20 +0200
Last post2016-08-21 23:20 +0200
Articles 1 — 1 participant

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: [PATCH] staging: comedi: dt2811: add parentheses to fix logic on  s->subdev_flags Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-08-21 23:20 +0200

#1467247 — Re: [PATCH] staging: comedi: dt2811: add parentheses to fix logic on s->subdev_flags

FromGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Date2016-08-21 23:20 +0200
SubjectRe: [PATCH] staging: comedi: dt2811: add parentheses to fix logic on s->subdev_flags
Message-ID<s8IjU-5CK-7@gated-at.bofh.it>
On Mon, Jul 25, 2016 at 11:25:25PM +0100, Colin King wrote:
> From: Colin Ian King <colin.king@canonical.com>
> 
> We need to add parentheses around ternary operations because currently
> the expression SDF_READABLE | (it->options[2] == 1) always evaluates to
> true, meaning s->subdev_flags is always assigned SDF_DIFF. Putting the
> parentheses around the ternarary operations results in the intended
> expression of SDF_REABLE logically or'd with one of SDF_DIFF,
> SDF_COMMON or SDF_GROUND.
> 
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
> Fixes: 7c9574090d30 ("staging: comedi: dt2811: simplify A/D reference configuration")
> Cc: <stable@vger.kernel.org> # 4.7+
> Reviewed-by: Ian Abbott <abbotti@mev.co.uk>


Dan sent a patch for this before you did :(

And this went into 4.8-rc1, not 4.7.

thanks,

greg k-h

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web