Skip to contentSkip to conversation

Fix compilation warning for sound/soc/codecs/wm8400.c

PATCH In review Subrata Modak 3 participants 3 messages Jul 15, 2009

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/6 Fix compilation warning for sound/soc/codecs/wm8400.c

Following fix is inspired by David Howells fix few days back:
http://lkml.org/lkml/2009/7/9/109,

---

sound/soc/codecs/wm8400.c +1 -1
@@ -1015,7 +1015,7 @@ static int wm8400_set_dai_pll(struct snd
 {
 	struct snd_soc_codec *codec = codec_dai->codec;
 	struct wm8400_priv *wm8400 = codec->private_data;
-	struct fll_factors factors;
+	struct fll_factors uninitialized_var(factors);
 	int ret;
 	u16 reg;
 

---
Regards--
Subrata

#1 lore raw

Hello Subrata,

Quoted 3 lines · Subrata Modak

Following fix is inspired by David Howells fix few days back:
http://lkml.org/lkml/2009/7/9/109,

Please check further of this thread :

http://marc.info/?l=linux-kernel&m=124756210124518&w=2

Quoted 7 lines

---

sound/soc/codecs/wm8400.c static int wm8400_set_dai_pll(struct snd · line 1021

Quoted 8 lines
sound/soc/codecs/wm8400.c +1 -1
@@ -1015,7 +1015,7 @@ static int wm8400_set_dai_pll(struct snd
 {
 	struct snd_soc_codec *codec = codec_dai->codec;
 	struct wm8400_priv *wm8400 = codec->private_data;
-	struct fll_factors factors;
+	struct fll_factors uninitialized_var(factors);
 	int ret;
 	u16 reg;
 

This kind of warnings born due to not handling the variables properly. Please try to understand the root cause of this warning, just shutting this warning is of no use.

Please revise your patches, If you face any problems let me know.

Thanks,
--
JSR

#2 lore raw
Quoted 5 lines · Jaswinder Singh Rajput

Hello Subrata,

This kind of warnings born due to not handling the variables properly. Please try to understand the root cause of this warning, just shutting this warning is of no use.

...as I said last time you submitted rougly the same patch. Please also remember that sometimes these problems are false positives caused by issues with the compiler flow analysis (as appears to be the case here).