alsa-devel.alsa-project.org archive mirror
 help / color / mirror / Atom feed
From: <MR.Swami.Reddy@ti.com>
To: broonie@opensource.wolfsonmicro.com, lrg@ti.com
Cc: alsa-devel@alsa-project.org, M R Swami Reddy <mr.swami.reddy@ti.com>
Subject: [PATCH] ASoC:lm49453: fix build warnings
Date: Thu, 5 Apr 2012 20:54:09 +0530	[thread overview]
Message-ID: <1333639449-25254-1-git-send-email-MR.Swami.Reddy@ti.com> (raw)

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;

             reply	other threads:[~2012-04-05 15:23 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-04-05 15:24 MR.Swami.Reddy [this message]
2012-04-05 21:00 ` [PATCH] ASoC:lm49453: fix build warnings 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=1333639449-25254-1-git-send-email-MR.Swami.Reddy@ti.com \
    --to=mr.swami.reddy@ti.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@opensource.wolfsonmicro.com \
    --cc=lrg@ti.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;
as well as URLs for NNTP newsgroup(s).