All of lore.kernel.org
 help / color / mirror / Atom feed
From: John Hsu <KCHSU0@nuvoton.com>
To: Mark Brown <broonie@kernel.org>
Cc: AP MS30 Linux ALSA <alsa-devel@alsa-project.org>,
	Anatol Pomozov <anatol.pomozov@gmail.com>,
	Ben Zhang <benzh@chromium.org>,
	Liam Girdwood <lgirdwood@gmail.com>,
	AC30 YHChuang <YHCHuang@nuvoton.com>,
	AC30 CTLin0 <CTLIN0@nuvoton.com>, Yong Zhi <yong.zhi@intel.com>,
	MS40 MHKuo <MHKuo@nuvoton.com>
Subject: Re: [PATCH] ASoC: nau8825: jack connection decision with different insertion logic
Date: Mon, 4 Jul 2016 10:43:06 +0800	[thread overview]
Message-ID: <5779CD3A.4020909@nuvoton.com> (raw)
In-Reply-To: <20160701155734.GV6247@sirena.org.uk>

On 7/1/2016 11:57 PM, Mark Brown wrote:
> On Thu, Jun 30, 2016 at 03:51:51PM +0800, John Hsu wrote:
>
>   
>> Yes, it'll be more readable. I have a question. Why to add !! in
>> front of bit wise operation? What does it mean?
>>     
>
> It's redundant in almost all cases.  It translates an integer value
> into a 0/1 value (so if you've got a value of 2 it'll end up as 1) by
> doing a double not.  This very rarely matters unless you're storing the
> value in an integer and comparing it to 1 to check for truth, otherwise
> C will translate any non-zero value into true in any logic context.
>   

Thank you for the explanation. I get the purpose now and will change
the expression of function for clear intent.

  reply	other threads:[~2016-07-04  2:43 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-29  3:20 [PATCH] ASoC: nau8825: jack connection decision with different insertion logic John Hsu
2016-06-29  3:45 ` Anatol Pomozov
2016-06-30  7:51   ` John Hsu
2016-07-01 15:57     ` Mark Brown
2016-07-04  2:43       ` John Hsu [this message]
2016-07-06  2:54       ` Anatol Pomozov
  -- strict thread matches above, loose matches on Subject: below --
2016-07-06  2:09 John Hsu

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=5779CD3A.4020909@nuvoton.com \
    --to=kchsu0@nuvoton.com \
    --cc=CTLIN0@nuvoton.com \
    --cc=MHKuo@nuvoton.com \
    --cc=YHCHuang@nuvoton.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=anatol.pomozov@gmail.com \
    --cc=benzh@chromium.org \
    --cc=broonie@kernel.org \
    --cc=lgirdwood@gmail.com \
    --cc=yong.zhi@intel.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.