From: Takashi Iwai <tiwai@suse.de>
To: Mark Brown <broonie@kernel.org>
Cc: Nicolin Chen <nicoleotsuka@gmail.com>,
alsa-devel@alsa-project.org, Xiubo Li <Xiubo.Lee@gmail.com>,
Liam Girdwood <lgirdwood@gmail.com>, Timur Tabi <timur@tabi.org>
Subject: [PATCH] ASoC: fsl: Correct FSL_SAI_CR2_MSEL_MASK definition
Date: Wed, 3 Jun 2015 14:51:01 +0200 [thread overview]
Message-ID: <1433335861-31474-1-git-send-email-tiwai@suse.de> (raw)
The bit mask FSL_SAI_CR2_MSEL_MASK is defined as (0xff << 26) and this
obviously overflows the 32bit integer. Also this clears other bits
than the needed ones (FSL_SAI_CR2_MSEL_XXX) wrongly.
This patch fixes the definition only to mask bits 26 and 27.
Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=84351
Reported-by: David Binderman <dcb314@hotmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
---
sound/soc/fsl/fsl_sai.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sound/soc/fsl/fsl_sai.h b/sound/soc/fsl/fsl_sai.h
index 34667209b607..0e33a17ddd01 100644
--- a/sound/soc/fsl/fsl_sai.h
+++ b/sound/soc/fsl/fsl_sai.h
@@ -72,7 +72,7 @@
/* SAI Transmit and Recieve Configuration 2 Register */
#define FSL_SAI_CR2_SYNC BIT(30)
-#define FSL_SAI_CR2_MSEL_MASK (0xff << 26)
+#define FSL_SAI_CR2_MSEL_MASK (0x03 << 26)
#define FSL_SAI_CR2_MSEL_BUS 0
#define FSL_SAI_CR2_MSEL_MCLK1 BIT(26)
#define FSL_SAI_CR2_MSEL_MCLK2 BIT(27)
--
2.4.2
next reply other threads:[~2015-06-03 12:51 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-06-03 12:51 Takashi Iwai [this message]
2015-06-03 18:47 ` [PATCH] ASoC: fsl: Correct FSL_SAI_CR2_MSEL_MASK definition Nicolin Chen
2015-06-03 19:29 ` Takashi Iwai
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=1433335861-31474-1-git-send-email-tiwai@suse.de \
--to=tiwai@suse.de \
--cc=Xiubo.Lee@gmail.com \
--cc=alsa-devel@alsa-project.org \
--cc=broonie@kernel.org \
--cc=lgirdwood@gmail.com \
--cc=nicoleotsuka@gmail.com \
--cc=timur@tabi.org \
/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