All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ASoC: intel: initialize return value properly
@ 2017-11-06 13:30 ` Arnd Bergmann
  0 siblings, 0 replies; 5+ messages in thread
From: Arnd Bergmann @ 2017-11-06 13:30 UTC (permalink / raw)
  To: Mark Brown, Vinod Koul, Guneshwor Singh
  Cc: Arnd Bergmann, Liam Girdwood, Jaroslav Kysela, Takashi Iwai,
	Naveen Manohar, Subhransu S. Prusty, Harsha Priya N,
	Pierre-Louis Bossart, alsa-devel, linux-kernel

When CONFIG_SND_SOC_HDAC_HDMI is disabled, we can run into an
uninitialized variable:

sound/soc/intel/skylake/skl.c: In function 'skl_resume':
sound/soc/intel/skylake/skl.c:326:6: error: 'ret' may be used uninitialized in this function [-Werror=maybe-uninitialized]

I have run into this on today's linux-next kernel, but it appears
that this is an older problem that was just hard to trigger
with randconfig builds as CONFIG_SND_SOC_HDAC_HDMI would in
effect be impossible to disable when having SND_SOC_INTEL_SKYLAKE
enabled.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 sound/soc/intel/skylake/skl.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/sound/soc/intel/skylake/skl.c b/sound/soc/intel/skylake/skl.c
index 31d8634e8aa1..acb0ab470ca6 100644
--- a/sound/soc/intel/skylake/skl.c
+++ b/sound/soc/intel/skylake/skl.c
@@ -355,6 +355,7 @@ static int skl_resume(struct device *dev)
 
 		if (ebus->cmd_dma_state)
 			snd_hdac_bus_init_cmd_io(&ebus->bus);
+		ret = 0;
 	} else {
 		ret = _skl_resume(ebus);
 
-- 
2.9.0

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH] ASoC: intel: initialize return value properly
@ 2017-11-06 13:30 ` Arnd Bergmann
  0 siblings, 0 replies; 5+ messages in thread
From: Arnd Bergmann @ 2017-11-06 13:30 UTC (permalink / raw)
  To: Mark Brown, Vinod Koul, Guneshwor Singh
  Cc: Pierre-Louis Bossart, alsa-devel, Arnd Bergmann, Harsha Priya N,
	linux-kernel, Takashi Iwai, Liam Girdwood, Naveen Manohar,
	Subhransu S. Prusty

When CONFIG_SND_SOC_HDAC_HDMI is disabled, we can run into an
uninitialized variable:

sound/soc/intel/skylake/skl.c: In function 'skl_resume':
sound/soc/intel/skylake/skl.c:326:6: error: 'ret' may be used uninitialized in this function [-Werror=maybe-uninitialized]

I have run into this on today's linux-next kernel, but it appears
that this is an older problem that was just hard to trigger
with randconfig builds as CONFIG_SND_SOC_HDAC_HDMI would in
effect be impossible to disable when having SND_SOC_INTEL_SKYLAKE
enabled.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 sound/soc/intel/skylake/skl.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/sound/soc/intel/skylake/skl.c b/sound/soc/intel/skylake/skl.c
index 31d8634e8aa1..acb0ab470ca6 100644
--- a/sound/soc/intel/skylake/skl.c
+++ b/sound/soc/intel/skylake/skl.c
@@ -355,6 +355,7 @@ static int skl_resume(struct device *dev)
 
 		if (ebus->cmd_dma_state)
 			snd_hdac_bus_init_cmd_io(&ebus->bus);
+		ret = 0;
 	} else {
 		ret = _skl_resume(ebus);
 
-- 
2.9.0

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH] ASoC: intel: initialize return value properly
  2017-11-06 13:30 ` Arnd Bergmann
  (?)
@ 2017-11-07  3:56 ` Vinod Koul
  -1 siblings, 0 replies; 5+ messages in thread
From: Vinod Koul @ 2017-11-07  3:56 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: Mark Brown, Guneshwor Singh, Liam Girdwood, Jaroslav Kysela,
	Takashi Iwai, Naveen Manohar, Subhransu S. Prusty,
	Harsha Priya N, Pierre-Louis Bossart, alsa-devel, linux-kernel

On Mon, Nov 06, 2017 at 02:30:36PM +0100, Arnd Bergmann wrote:
> When CONFIG_SND_SOC_HDAC_HDMI is disabled, we can run into an
> uninitialized variable:
> 
> sound/soc/intel/skylake/skl.c: In function 'skl_resume':
> sound/soc/intel/skylake/skl.c:326:6: error: 'ret' may be used uninitialized in this function [-Werror=maybe-uninitialized]
> 
> I have run into this on today's linux-next kernel, but it appears
> that this is an older problem that was just hard to trigger
> with randconfig builds as CONFIG_SND_SOC_HDAC_HDMI would in
> effect be impossible to disable when having SND_SOC_INTEL_SKYLAKE
> enabled.

do we need this in changelog :)

Anyway this sound fine to me, so:

Acked-By: Vinod Koul <vinod.koul@intel.com>

> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> ---
>  sound/soc/intel/skylake/skl.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/sound/soc/intel/skylake/skl.c b/sound/soc/intel/skylake/skl.c
> index 31d8634e8aa1..acb0ab470ca6 100644
> --- a/sound/soc/intel/skylake/skl.c
> +++ b/sound/soc/intel/skylake/skl.c
> @@ -355,6 +355,7 @@ static int skl_resume(struct device *dev)
>  
>  		if (ebus->cmd_dma_state)
>  			snd_hdac_bus_init_cmd_io(&ebus->bus);
> +		ret = 0;
>  	} else {
>  		ret = _skl_resume(ebus);
>  
> -- 
> 2.9.0
> 

-- 
~Vinod

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Applied "ASoC: intel: initialize return value properly" to the asoc tree
  2017-11-06 13:30 ` Arnd Bergmann
@ 2017-11-16 19:28   ` Mark Brown
  -1 siblings, 0 replies; 5+ messages in thread
From: Mark Brown @ 2017-11-16 19:28 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: Mark Brown, Mark Brown, Vinod Koul, Guneshwor Singh,
	Pierre-Louis Bossart, alsa-devel, Harsha Priya N, linux-kernel,
	Takashi Iwai, Liam Girdwood, Naveen Manohar, Subhransu S. Prusty,
	alsa-devel

The patch

   ASoC: intel: initialize return value properly

has been applied to the asoc tree at

   https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git 

All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.  

You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying
to this mail.

Thanks,
Mark

>From cc20c4df1627dd515ea90dd20e2684a8a1c76693 Mon Sep 17 00:00:00 2001
From: Arnd Bergmann <arnd@arndb.de>
Date: Mon, 6 Nov 2017 14:30:36 +0100
Subject: [PATCH] ASoC: intel: initialize return value properly

When CONFIG_SND_SOC_HDAC_HDMI is disabled, we can run into an
uninitialized variable:

sound/soc/intel/skylake/skl.c: In function 'skl_resume':
sound/soc/intel/skylake/skl.c:326:6: error: 'ret' may be used uninitialized in this function [-Werror=maybe-uninitialized]

I have run into this on today's linux-next kernel, but it appears
that this is an older problem that was just hard to trigger
with randconfig builds as CONFIG_SND_SOC_HDAC_HDMI would in
effect be impossible to disable when having SND_SOC_INTEL_SKYLAKE
enabled.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Acked-By: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
---
 sound/soc/intel/skylake/skl.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/sound/soc/intel/skylake/skl.c b/sound/soc/intel/skylake/skl.c
index 31d8634e8aa1..acb0ab470ca6 100644
--- a/sound/soc/intel/skylake/skl.c
+++ b/sound/soc/intel/skylake/skl.c
@@ -355,6 +355,7 @@ static int skl_resume(struct device *dev)
 
 		if (ebus->cmd_dma_state)
 			snd_hdac_bus_init_cmd_io(&ebus->bus);
+		ret = 0;
 	} else {
 		ret = _skl_resume(ebus);
 
-- 
2.14.1

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Applied "ASoC: intel: initialize return value properly" to the asoc tree
@ 2017-11-16 19:28   ` Mark Brown
  0 siblings, 0 replies; 5+ messages in thread
From: Mark Brown @ 2017-11-16 19:28 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: alsa-devel, Liam Girdwood, Vinod Koul, Takashi Iwai,
	Guneshwor Singh, Pierre-Louis Bossart, linux-kernel,
	Harsha Priya N, Mark Brown, Naveen Manohar, Subhransu S. Prusty

The patch

   ASoC: intel: initialize return value properly

has been applied to the asoc tree at

   https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git 

All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.  

You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying
to this mail.

Thanks,
Mark

>From cc20c4df1627dd515ea90dd20e2684a8a1c76693 Mon Sep 17 00:00:00 2001
From: Arnd Bergmann <arnd@arndb.de>
Date: Mon, 6 Nov 2017 14:30:36 +0100
Subject: [PATCH] ASoC: intel: initialize return value properly

When CONFIG_SND_SOC_HDAC_HDMI is disabled, we can run into an
uninitialized variable:

sound/soc/intel/skylake/skl.c: In function 'skl_resume':
sound/soc/intel/skylake/skl.c:326:6: error: 'ret' may be used uninitialized in this function [-Werror=maybe-uninitialized]

I have run into this on today's linux-next kernel, but it appears
that this is an older problem that was just hard to trigger
with randconfig builds as CONFIG_SND_SOC_HDAC_HDMI would in
effect be impossible to disable when having SND_SOC_INTEL_SKYLAKE
enabled.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Acked-By: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
---
 sound/soc/intel/skylake/skl.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/sound/soc/intel/skylake/skl.c b/sound/soc/intel/skylake/skl.c
index 31d8634e8aa1..acb0ab470ca6 100644
--- a/sound/soc/intel/skylake/skl.c
+++ b/sound/soc/intel/skylake/skl.c
@@ -355,6 +355,7 @@ static int skl_resume(struct device *dev)
 
 		if (ebus->cmd_dma_state)
 			snd_hdac_bus_init_cmd_io(&ebus->bus);
+		ret = 0;
 	} else {
 		ret = _skl_resume(ebus);
 
-- 
2.14.1

^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2017-11-16 19:32 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-11-06 13:30 [PATCH] ASoC: intel: initialize return value properly Arnd Bergmann
2017-11-06 13:30 ` Arnd Bergmann
2017-11-07  3:56 ` Vinod Koul
2017-11-16 19:28 ` Applied "ASoC: intel: initialize return value properly" to the asoc tree Mark Brown
2017-11-16 19:28   ` Mark Brown

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.