LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Bard Liao <bardliao@realtek.com>
To: Colin King <colin.king@canonical.com>,
Oder Chiou <oder_chiou@realtek.com>,
Liam Girdwood <lgirdwood@gmail.com>,
Mark Brown <broonie@kernel.org>, Jaroslav Kysela <perex@perex.cz>,
Takashi Iwai <tiwai@suse.com>,
"alsa-devel@alsa-project.org" <alsa-devel@alsa-project.org>
Cc: "kernel-janitors@vger.kernel.org"
<kernel-janitors@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: RE: [PATCH][next] ASoC: rt5668: fix incorrect 'and' operator
Date: Fri, 20 Apr 2018 06:08:29 +0000 [thread overview]
Message-ID: <ABFD875FF5FB574BA706497D987D48D7027C9E45@RTITMBSV02.realtek.com.tw> (raw)
In-Reply-To: <20180419143431.13173-1-colin.king@canonical.com>
> -----Original Message-----
> From: Colin King [mailto:colin.king@canonical.com]
> Sent: Thursday, April 19, 2018 10:35 PM
> To: Bard Liao; 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
> Subject: [PATCH][next] ASoC: rt5668: fix incorrect 'and' operator
>
> 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>
Acked-By: Bard Liao <bardliao@realtek.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
>
>
> ------Please consider the environment before printing this e-mail.
next prev parent reply other threads:[~2018-04-20 6:10 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-04-19 14:34 Colin King
2018-04-20 6:08 ` Bard Liao [this message]
2018-04-20 17:04 ` Applied "ASoC: rt5668: fix incorrect 'and' operator" to the asoc tree 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=ABFD875FF5FB574BA706497D987D48D7027C9E45@RTITMBSV02.realtek.com.tw \
--to=bardliao@realtek.com \
--cc=alsa-devel@alsa-project.org \
--cc=broonie@kernel.org \
--cc=colin.king@canonical.com \
--cc=kernel-janitors@vger.kernel.org \
--cc=lgirdwood@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=oder_chiou@realtek.com \
--cc=perex@perex.cz \
--cc=tiwai@suse.com \
--subject='RE: [PATCH][next] ASoC: rt5668: fix incorrect '\''and'\'' operator' \
/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
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).