All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dan Carpenter <dan.carpenter@oracle.com>
To: Jonathan Cameron <jic23@kernel.org>
Cc: Melissa Wen <melissa.srw@gmail.com>,
	devel@driverdev.osuosl.org, Lars-Peter Clausen <lars@metafoo.de>,
	Stefan Popa <stefan.popa@analog.com>,
	Michael Hennerich <Michael.Hennerich@analog.com>,
	linux-iio@vger.kernel.org,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Barry Song <21cnbao@gmail.com>,
	linux-kernel@vger.kernel.org, kernel-usp@googlegroups.com,
	Peter Meerwald-Stadler <pmeerw@pmeerw.net>,
	Hartmut Knaack <knaack.h@gmx.de>
Subject: Re: [PATCH] staging: iio: ad7150: use ternary operating to ensure 0/1 value
Date: Mon, 17 Jun 2019 11:40:34 +0300	[thread overview]
Message-ID: <20190617084033.GG28859@kadam> (raw)
In-Reply-To: <20190616111516.1af0d41b@archlinux>

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@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@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


  reply	other threads:[~2019-06-17  8:41 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-14 16:50 [PATCH] staging: iio: ad7150: use ternary operating to ensure 0/1 value Melissa Wen
2019-06-16 10:15 ` Jonathan Cameron
2019-06-17  8:40   ` Dan Carpenter [this message]
2019-06-22 10:58     ` 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=20190617084033.GG28859@kadam \
    --to=dan.carpenter@oracle.com \
    --cc=21cnbao@gmail.com \
    --cc=Michael.Hennerich@analog.com \
    --cc=devel@driverdev.osuosl.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=jic23@kernel.org \
    --cc=kernel-usp@googlegroups.com \
    --cc=knaack.h@gmx.de \
    --cc=lars@metafoo.de \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=melissa.srw@gmail.com \
    --cc=pmeerw@pmeerw.net \
    --cc=stefan.popa@analog.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.