From: Mark Brown <broonie@kernel.org>
To: Dan Carpenter <dan.carpenter@oracle.com>
Cc: Mark Brown <broonie@kernel.org>,
Liam Girdwood <lgirdwood@gmail.com>,
Srinivas Kandagatla <srinivas.kandagatla@linaro.org>,
alsa-devel@alsa-project.org, Axel Lin <axel.lin@ingics.com>,
Damien Riegel <damien.riegel@savoirfairelinux.com>,
kernel-janitors@vger.kernel.org,
Takashi Iwai <tiwai@suse.com>Mark Brown <broonie@kernel.org>,
Arvind Yadav <arvind.yadav.cs@gmail.com>,
Takashi Sakamoto <o-takashi@sakamocchi.jp>,
Bhumika Goyal <bhumirks@gmail.com>alsa-devel@alsa-project.org
Subject: Applied "ASoC: codecs: msm8916-wcd-analog: always true condition" to the asoc tree
Date: Thu, 24 Aug 2017 10:50:10 +0000 [thread overview]
Message-ID: <E1dkpiE-0000tb-Ii@debutante> (raw)
In-Reply-To: <20170824100741.s4v24owbvocshr5n@mwanda>
The patch
ASoC: codecs: msm8916-wcd-analog: always true condition
has been applied to the asoc tree at
git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git
All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.
You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.
If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.
Please add any relevant lists and maintainers to the CCs when replying
to this mail.
Thanks,
Mark
From 56026714bd45fccda710114982789c5145285560 Mon Sep 17 00:00:00 2001
From: Dan Carpenter <dan.carpenter@oracle.com>
Date: Thu, 24 Aug 2017 13:07:41 +0300
Subject: [PATCH] ASoC: codecs: msm8916-wcd-analog: always true condition
Static checkers complain that unsigned int val is always >= 0. The
context is that snd_soc_read() returns -1U on error. This is harmless
because we're checking that CDC_A_MBHC_RESULT_1_BTN_RESULT_MASK is not
set, and it will always be set for -1U. I could have just removed the
check against -1 but I preserved it because I thought it helped with
readability.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
---
sound/soc/codecs/msm8916-wcd-analog.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sound/soc/codecs/msm8916-wcd-analog.c b/sound/soc/codecs/msm8916-wcd-analog.c
index f834a639b350..cd4d60ef4c77 100644
--- a/sound/soc/codecs/msm8916-wcd-analog.c
+++ b/sound/soc/codecs/msm8916-wcd-analog.c
@@ -949,7 +949,7 @@ static irqreturn_t mbhc_btn_release_irq_handler(int irq, void *arg)
u32 val = snd_soc_read(codec, CDC_A_MBHC_RESULT_1);
/* check if its BTN0 thats released */
- if ((val >= 0) && !(val & CDC_A_MBHC_RESULT_1_BTN_RESULT_MASK))
+ if ((val != -1) && !(val & CDC_A_MBHC_RESULT_1_BTN_RESULT_MASK))
priv->mbhc_btn0_pressed = false;
} else {
--
2.14.1
prev parent reply other threads:[~2017-08-24 10:50 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-08-24 10:07 [PATCH] ASoC: codecs: msm8916-wcd-analog: always true condition Dan Carpenter
2017-08-24 10:50 ` Mark Brown [this message]
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=E1dkpiE-0000tb-Ii@debutante \
--to=broonie@kernel.org \
--cc=alsa-devel@alsa-project.org \
--cc=axel.lin@ingics.com \
--cc=damien.riegel@savoirfairelinux.com \
--cc=dan.carpenter@oracle.com \
--cc=kernel-janitors@vger.kernel.org \
--cc=lgirdwood@gmail.com \
--cc=srinivas.kandagatla@linaro.org \
--cc=tiwai@suse.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox