diff mbox

[3/3] ASoC: pcm: Use wildcard msbits constraints

Message ID s5h4msbhk0g.wl-tiwai@suse.de (mailing list archive)
State Accepted
Commit c6068d3a7b408554a832181b98091ee5a00d8b85
Headers show

Commit Message

Takashi Iwai Dec. 31, 2014, 4:16 p.m. UTC
At Mon, 29 Dec 2014 18:43:38 +0100,
Lars-Peter Clausen wrote:
> 
> Use the new wildcard msbits constraints instead of installing a constraint
> for each available sample format width.
> 
> Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>

FYI, as this resulted in a warning, I applied the patch below in
addition.  Found in topic/msbits branch as well.


Takashi

-- 8< --
From: Takashi Iwai <tiwai@suse.de>
Subject: [PATCH] ASoC: pcm: Fix unused variable warning

sound/soc/soc-pcm.c: In function ‘soc_pcm_set_msb’:
sound/soc/soc-pcm.c:307:11: warning: unused variable ‘i’ [-Wunused-variable]

Fixes: 0e2a37513a1f ('ASoC: pcm: Use wildcard msbits constraints')
Signed-off-by: Takashi Iwai <tiwai@suse.de>
---
 sound/soc/soc-pcm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Lars-Peter Clausen Dec. 31, 2014, 4:24 p.m. UTC | #1
On 12/31/2014 05:16 PM, Takashi Iwai wrote:
> At Mon, 29 Dec 2014 18:43:38 +0100,
> Lars-Peter Clausen wrote:
>>
>> Use the new wildcard msbits constraints instead of installing a constraint
>> for each available sample format width.
>>
>> Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
>
> FYI, as this resulted in a warning, I applied the patch below in
> addition.  Found in topic/msbits branch as well.
>

Thanks. I noticed this today as well when building with a more recent gcc, 
for some reason it didn't show up with an older version.

- Lars
diff mbox

Patch

diff --git a/sound/soc/soc-pcm.c b/sound/soc/soc-pcm.c
index d62d6a5340a8..c076993a20d0 100644
--- a/sound/soc/soc-pcm.c
+++ b/sound/soc/soc-pcm.c
@@ -304,7 +304,7 @@  static bool soc_pcm_has_symmetry(struct snd_pcm_substream *substream)
 static void soc_pcm_set_msb(struct snd_pcm_substream *substream, int bits)
 {
 	struct snd_soc_pcm_runtime *rtd = substream->private_data;
-	int ret, i;
+	int ret;
 
 	if (!bits)
 		return;