[PATCH] staging: iio: ad7150: use ternary operating to ensure 0/1 value
Dan Carpenter
dan.carpenter at oracle.com
Mon Jun 17 08:40:34 UTC 2019
On Sun, Jun 16, 2019 at 11:15:16AM +0100, Jonathan Cameron wrote:
> On Fri, 14 Jun 2019 13:50:59 -0300
> Melissa Wen <melissa.srw at gmail.com> wrote:
>
> > Remove idiom and use ternary operator for consistently trigger 0/1 value
> > on variable declaration.
> >
> > Signed-off-by: Melissa Wen <melissa.srw at gmail.com>
> Hi Melissa,
>
> In general I would consider this unnecessary churn as, whilst
> it's no longer a favoured idiom, it is extremely common in the
> kernel.
It's still my favourite... Why wouldn't people like it? It feels like
last week I just saw someone send a bunch of:
- foo = (bar == baz) ? 1 : 0;
+ foo = (bar == baz);
patches and I thought it was an improvement at the time...
regards,
dan carpenter
More information about the devel
mailing list