* [PATCH][next] ASoC: rt5668: fix incorrect 'and' operator
@ 2018-04-19 14:34 Colin King
2018-04-20 6:08 ` Bard Liao
2018-04-20 17:04 ` Applied "ASoC: rt5668: fix incorrect 'and' operator" to the asoc tree Mark Brown
0 siblings, 2 replies; 3+ messages in thread
From: Colin King @ 2018-04-19 14:34 UTC (permalink / raw)
To: Bard Liao, Oder Chiou, Liam Girdwood, Mark Brown, Jaroslav Kysela,
Takashi Iwai, alsa-devel
Cc: kernel-janitors, linux-kernel
From: Colin Ian King <colin.king@canonical.com>
Currently logical and is being used instead of bitwise and. Fix this.
Detected by CoverityScan, CID#1468008 ("Logical vs bitwise operator")
Fixes: d59fb2856223 ("ASoC: rt5668: add rt5668B codec driver")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
sound/soc/codecs/rt5668.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sound/soc/codecs/rt5668.c b/sound/soc/codecs/rt5668.c
index 52a343f96eb2..3c19d03f2446 100644
--- a/sound/soc/codecs/rt5668.c
+++ b/sound/soc/codecs/rt5668.c
@@ -1194,7 +1194,7 @@ static int set_filter_clk(struct snd_soc_dapm_widget *w,
int ref, val, reg, idx = -EINVAL;
static const int div[] = {1, 2, 3, 4, 6, 8, 12, 16, 24, 32, 48};
- val = snd_soc_component_read32(component, RT5668_GPIO_CTRL_1) &&
+ val = snd_soc_component_read32(component, RT5668_GPIO_CTRL_1) &
RT5668_GP4_PIN_MASK;
if (w->shift = RT5668_PWR_ADC_S1F_BIT &&
val = RT5668_GP4_PIN_ADCDAT2)
--
2.17.0
^ permalink raw reply related [flat|nested] 3+ messages in thread* RE: [PATCH][next] ASoC: rt5668: fix incorrect 'and' operator
2018-04-19 14:34 [PATCH][next] ASoC: rt5668: fix incorrect 'and' operator Colin King
@ 2018-04-20 6:08 ` Bard Liao
2018-04-20 17:04 ` Applied "ASoC: rt5668: fix incorrect 'and' operator" to the asoc tree Mark Brown
1 sibling, 0 replies; 3+ messages in thread
From: Bard Liao @ 2018-04-20 6:08 UTC (permalink / raw)
To: Colin King, Oder Chiou, Liam Girdwood, Mark Brown,
Jaroslav Kysela, Takashi Iwai, alsa-devel@alsa-project.org
Cc: kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org
PiAtLS0tLU9yaWdpbmFsIE1lc3NhZ2UtLS0tLQ0KPiBGcm9tOiBDb2xpbiBLaW5nIFttYWlsdG86
Y29saW4ua2luZ0BjYW5vbmljYWwuY29tXQ0KPiBTZW50OiBUaHVyc2RheSwgQXByaWwgMTksIDIw
MTggMTA6MzUgUE0NCj4gVG86IEJhcmQgTGlhbzsgT2RlciBDaGlvdTsgTGlhbSBHaXJkd29vZDsg
TWFyayBCcm93bjsgSmFyb3NsYXYgS3lzZWxhOw0KPiBUYWthc2hpIEl3YWk7IGFsc2EtZGV2ZWxA
YWxzYS1wcm9qZWN0Lm9yZw0KPiBDYzoga2VybmVsLWphbml0b3JzQHZnZXIua2VybmVsLm9yZzsg
bGludXgta2VybmVsQHZnZXIua2VybmVsLm9yZw0KPiBTdWJqZWN0OiBbUEFUQ0hdW25leHRdIEFT
b0M6IHJ0NTY2ODogZml4IGluY29ycmVjdCAnYW5kJyBvcGVyYXRvcg0KPiANCj4gRnJvbTogQ29s
aW4gSWFuIEtpbmcgPGNvbGluLmtpbmdAY2Fub25pY2FsLmNvbT4NCj4gDQo+IEN1cnJlbnRseSBs
b2dpY2FsIGFuZCBpcyBiZWluZyB1c2VkIGluc3RlYWQgb2YgYml0d2lzZSBhbmQuIEZpeCB0aGlz
Lg0KPiANCj4gRGV0ZWN0ZWQgYnkgQ292ZXJpdHlTY2FuLCBDSUQjMTQ2ODAwOCAoIkxvZ2ljYWwg
dnMgYml0d2lzZSBvcGVyYXRvciIpDQo+IA0KPiBGaXhlczogZDU5ZmIyODU2MjIzICgiQVNvQzog
cnQ1NjY4OiBhZGQgcnQ1NjY4QiBjb2RlYyBkcml2ZXIiKQ0KPiBTaWduZWQtb2ZmLWJ5OiB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AJCXZhbCA9PSBSVDU2
NjhfR1A0X1BJTl9BRENEQVQyKQ0KPiAtLQ0KPiAyLjE3LjANCj4gDQo+IA0KPiAtLS0tLS1QbGVh
c2UgY29uc2lkZXIgdGhlIGVudmlyb25tZW50IGJlZm9yZSBwcmludGluZyB0aGlzIGUtbWFpbC4N
Cg=
^ permalink raw reply [flat|nested] 3+ messages in thread
* Applied "ASoC: rt5668: fix incorrect 'and' operator" to the asoc tree
2018-04-19 14:34 [PATCH][next] ASoC: rt5668: fix incorrect 'and' operator Colin King
2018-04-20 6:08 ` Bard Liao
@ 2018-04-20 17:04 ` Mark Brown
1 sibling, 0 replies; 3+ messages in thread
From: Mark Brown @ 2018-04-20 17:04 UTC (permalink / raw)
To: Colin Ian King; +Cc: Mark Brown, Bard Liao, Oder Chiou, Liam Girdwood
The patch
ASoC: rt5668: fix incorrect 'and' operator
has been applied to the asoc tree at
https://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 4bb3f73a2da740e38f2e418bd0c468826046687a Mon Sep 17 00:00:00 2001
From: Colin Ian King <colin.king@canonical.com>
Date: Thu, 19 Apr 2018 15:34:31 +0100
Subject: [PATCH] ASoC: rt5668: fix incorrect 'and' operator
Currently logical and is being used instead of bitwise and. Fix this.
Detected by CoverityScan, CID#1468008 ("Logical vs bitwise operator")
Fixes: d59fb2856223 ("ASoC: rt5668: add rt5668B codec driver")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
---
sound/soc/codecs/rt5668.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sound/soc/codecs/rt5668.c b/sound/soc/codecs/rt5668.c
index 52a343f96eb2..3c19d03f2446 100644
--- a/sound/soc/codecs/rt5668.c
+++ b/sound/soc/codecs/rt5668.c
@@ -1194,7 +1194,7 @@ static int set_filter_clk(struct snd_soc_dapm_widget *w,
int ref, val, reg, idx = -EINVAL;
static const int div[] = {1, 2, 3, 4, 6, 8, 12, 16, 24, 32, 48};
- val = snd_soc_component_read32(component, RT5668_GPIO_CTRL_1) &&
+ val = snd_soc_component_read32(component, RT5668_GPIO_CTRL_1) &
RT5668_GP4_PIN_MASK;
if (w->shift = RT5668_PWR_ADC_S1F_BIT &&
val = RT5668_GP4_PIN_ADCDAT2)
--
2.17.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
end of thread, other threads:[~2018-04-20 17:04 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-04-19 14:34 [PATCH][next] ASoC: rt5668: fix incorrect 'and' operator Colin King
2018-04-20 6:08 ` Bard Liao
2018-04-20 17:04 ` Applied "ASoC: rt5668: fix incorrect 'and' operator" to the asoc tree Mark Brown
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox