From: Axel Lin <axel.lin@gmail.com>
To: linux-kernel <linux-kernel@vger.kernel.org>
Cc: Liam Girdwood <lrg@slimlogic.co.uk>,
Mark Brown <broonie@opensource.wolfsonmicro.com>,
Wan ZongShun <mcuos.com@gmail.com>,
alsa-devel@alsa-project.org
Subject: [PATCH 5/5] ASoC: Remove unneeded !! operations while checking return value of nuc900_checkready
Date: Mon, 29 Nov 2010 17:43:39 +0800 [thread overview]
Message-ID: <1291023819.22911.11.camel@mola> (raw)
In-Reply-To: <1291023491.22911.1.camel@mola>
I think this unneededd !! operations just reduce the readability.
Signed-off-by: Axel Lin <axel.lin@gmail.com>
---
sound/soc/nuc900/nuc900-ac97.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/sound/soc/nuc900/nuc900-ac97.c b/sound/soc/nuc900/nuc900-ac97.c
index 3d9d8b1..dac6732 100644
--- a/sound/soc/nuc900/nuc900-ac97.c
+++ b/sound/soc/nuc900/nuc900-ac97.c
@@ -49,7 +49,7 @@ static unsigned short nuc900_ac97_read(struct snd_ac97 *ac97,
mutex_lock(&ac97_mutex);
val = nuc900_checkready();
- if (!!val) {
+ if (val) {
dev_err(nuc900_audio->dev, "AC97 codec is not ready\n");
goto out;
}
@@ -102,7 +102,7 @@ static void nuc900_ac97_write(struct snd_ac97 *ac97, unsigned short reg,
mutex_lock(&ac97_mutex);
tmp = nuc900_checkready();
- if (!!tmp)
+ if (tmp)
dev_err(nuc900_audio->dev, "AC97 codec is not ready\n");
/* clear the R_WB bit and write register index */
@@ -149,7 +149,7 @@ static void nuc900_ac97_warm_reset(struct snd_ac97 *ac97)
udelay(100);
val = nuc900_checkready();
- if (!!val)
+ if (val)
dev_err(nuc900_audio->dev, "AC97 codec is not ready\n");
mutex_unlock(&ac97_mutex);
--
1.7.2
next prev parent reply other threads:[~2010-11-29 9:43 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-11-29 9:38 [PATCH 0/5] Fix compile error and missing spin_unlock_irqrestore for NUC900 SoC audio Axel Lin
2010-11-29 9:39 ` [PATCH 1/5] ASoC: Fix compile error for nuc900-ac97.c Axel Lin
2010-11-29 9:40 ` [PATCH 2/5] ASoC: Fix prototype for nuc900_ac97_probe and nuc900_ac97_remove Axel Lin
2010-11-29 9:40 ` [PATCH 3/5] ASoC: Fix compile error for nuc900-pcm.c Axel Lin
2010-11-29 9:42 ` [RFC][PATCH 4/5] ASoC: Fix missing spin_unlock_irqrestore Axel Lin
2010-11-29 11:47 ` Mark Brown
2010-11-29 11:47 ` Mark Brown
2010-11-30 1:36 ` Wan ZongShun
2010-11-30 11:13 ` Mark Brown
2010-11-30 11:13 ` Mark Brown
2010-11-29 9:43 ` Axel Lin [this message]
2010-11-29 11:18 ` [PATCH 0/5] Fix compile error and missing spin_unlock_irqrestore for NUC900 SoC audio Liam Girdwood
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=1291023819.22911.11.camel@mola \
--to=axel.lin@gmail.com \
--cc=alsa-devel@alsa-project.org \
--cc=broonie@opensource.wolfsonmicro.com \
--cc=linux-kernel@vger.kernel.org \
--cc=lrg@slimlogic.co.uk \
--cc=mcuos.com@gmail.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.