* [PATCH] ASoC:lm49453: fix build warnings
@ 2012-04-05 15:24 MR.Swami.Reddy
2012-04-05 21:00 ` Mark Brown
0 siblings, 1 reply; 2+ messages in thread
From: MR.Swami.Reddy @ 2012-04-05 15:24 UTC (permalink / raw)
To: broonie, lrg; +Cc: alsa-devel, M R Swami Reddy
From: M R Swami Reddy <mr.swami.reddy@ti.com>
sound/soc/codecs/lm49453.c: In function 'lm49453_set_dai_fmt':
sound/soc/codecs/lm49453.c:1189:4: warning: overflow in implicit
constant conversion [-Woverflow]
sound/soc/codecs/lm49453.c:1193:4: warning: overflow in implicit
constant conversion [-Woverflow]
sound/soc/codecs/lm49453.c:1197:4: warning: overflow in implicit
constant conversion [-Woverflow]
Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: M R Swami Reddy <mr.swami.reddy@ti.com>
---
sound/soc/codecs/lm49453.c | 13 +-
1 file changed, 5 insertions(+), 8 deletions(-)
diff --git a/sound/soc/codecs/lm49453.c b/sound/soc/codecs/lm49453.c
index 744063d..74409ec 100644
--- a/sound/soc/codecs/lm49453.c
+++ b/sound/soc/codecs/lm49453.c
@@ -1178,27 +1178,24 @@ static int lm49453_set_dai_fmt(struct snd_soc_dai *codec_dai, unsigned int fmt)
{
struct snd_soc_codec *codec = codec_dai->codec;
- int aif_val = 0;
+ u16 aif_val;
int mode = 0;
int clk_phase = 0;
int clk_shift = 0;
switch (fmt & SND_SOC_DAIFMT_MASTER_MASK) {
case SND_SOC_DAIFMT_CBS_CFS:
- aif_val = ~LM49453_AUDIO_PORT1_BASIC_CLK_MS |
- ~LM49453_AUDIO_PORT1_BASIC_SYNC_MS;
+ aif_val = 0;
break;
case SND_SOC_DAIFMT_CBS_CFM:
- aif_val = ~LM49453_AUDIO_PORT1_BASIC_CLK_MS |
- LM49453_AUDIO_PORT1_BASIC_SYNC_MS;
+ aif_val = LM49453_AUDIO_PORT1_BASIC_SYNC_MS;
break;
case SND_SOC_DAIFMT_CBM_CFS:
- aif_val = LM49453_AUDIO_PORT1_BASIC_CLK_MS |
- ~LM49453_AUDIO_PORT1_BASIC_SYNC_MS;
+ aif_val = LM49453_AUDIO_PORT1_BASIC_CLK_MS;
break;
case SND_SOC_DAIFMT_CBM_CFM:
aif_val = LM49453_AUDIO_PORT1_BASIC_CLK_MS |
- LM49453_AUDIO_PORT1_BASIC_SYNC_MS;
+ LM49453_AUDIO_PORT1_BASIC_SYNC_MS;
break;
default:
return -EINVAL;
^ permalink raw reply related [flat|nested] 2+ messages in thread* Re: [PATCH] ASoC:lm49453: fix build warnings
2012-04-05 15:24 [PATCH] ASoC:lm49453: fix build warnings MR.Swami.Reddy
@ 2012-04-05 21:00 ` Mark Brown
0 siblings, 0 replies; 2+ messages in thread
From: Mark Brown @ 2012-04-05 21:00 UTC (permalink / raw)
To: MR.Swami.Reddy; +Cc: alsa-devel, lrg
[-- Attachment #1.1: Type: text/plain, Size: 576 bytes --]
On Thu, Apr 05, 2012 at 08:54:09PM +0530, MR.Swami.Reddy@ti.com wrote:
> From: M R Swami Reddy <mr.swami.reddy@ti.com>
>
> sound/soc/codecs/lm49453.c: In function 'lm49453_set_dai_fmt':
> sound/soc/codecs/lm49453.c:1189:4: warning: overflow in implicit
> constant conversion [-Woverflow]
> sound/soc/codecs/lm49453.c:1193:4: warning: overflow in implicit
> constant conversion [-Woverflow]
> sound/soc/codecs/lm49453.c:1197:4: warning: overflow in implicit
> constant conversion [-Woverflow]
Applied, thanks, though I have to say the fix isn't terribly obvious.
[-- Attachment #1.2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
[-- Attachment #2: Type: text/plain, Size: 0 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2012-04-05 21:01 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-04-05 15:24 [PATCH] ASoC:lm49453: fix build warnings MR.Swami.Reddy
2012-04-05 21:00 ` Mark Brown
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).