linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Baoquan He <bhe@redhat.com>
To: Mark Brown <broonie@kernel.org>
Cc: lgirdwood@gmail.com, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] regulator: core: Assign bool value to variable has_full_constraints
Date: Mon, 4 Jul 2016 16:38:26 +0800	[thread overview]
Message-ID: <20160704083826.GC4634@x1.redhat.com> (raw)
In-Reply-To: <20160704081238.GQ6247@sirena.org.uk>

On 07/04/16 at 10:12am, Mark Brown wrote:
> On Mon, Jul 04, 2016 at 10:05:25AM +0800, Baoquan He wrote:
> 
> > In commit 21cf891a (regulator: Make regulator_has_full_constraints a bool)
> > type of variable has_full_constraints is changed to bool, so assign 'true'
> > to has_full_constraints here.
> 
> There is no need to make changes like this, C has full support for using
> integers in a boolean context - using true here would've been just as
> meaningful with an integer variable and using a number for a boolean
> variable is fully equivalent.

By the way, I still think it makes code more read-able to assign a bool
value to a bool variable. In your words, C truly has full support for
using integers in a boolean context, then commit 21cf891a is not
necessary to be made to change.

  parent reply	other threads:[~2016-07-04  8:38 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-04  2:05 [PATCH] regulator: core: Assign bool value to variable has_full_constraints Baoquan He
2016-07-04  8:12 ` Mark Brown
2016-07-04  8:28   ` Baoquan He
2016-07-04  8:38   ` Baoquan He [this message]
2016-07-04  9:09     ` Mark Brown

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=20160704083826.GC4634@x1.redhat.com \
    --to=bhe@redhat.com \
    --cc=broonie@kernel.org \
    --cc=lgirdwood@gmail.com \
    --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).