alsa-devel.alsa-project.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ASoC: soc-compress: avoid false-positive Wuninitialized warning
       [not found] <202004201540.vYPhhYMs%lkp@intel.com>
@ 2020-04-22  7:35 ` Rong Chen
  2020-04-22 22:18   ` Kuninori Morimoto
                     ` (2 more replies)
  2020-04-24  0:54 ` [PATCH v2] " Rong Chen
  1 sibling, 3 replies; 7+ messages in thread
From: Rong Chen @ 2020-04-22  7:35 UTC (permalink / raw)
  To: Vinod Koul, Liam Girdwood, Mark Brown, Jaroslav Kysela,
	Takashi Iwai, alsa-devel, linux-kernel
  Cc: kbuild test robot, Kuninori Morimoto, Rong Chen

gcc-6.5 and earlier show a new warning:

sound/soc/soc-compress.c: In function ‘soc_compr_open’:
sound/soc/soc-compress.c:75:28: warning: ‘component’ is used uninitialized in this function [-Wuninitialized]
  struct snd_soc_component *component, *save = NULL;
                              ^~~~~~~~~

Simplest fix is to initialize it to avoid the warning.

Reported-by: kbuild test robot <lkp@intel.com>
Cc: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/lkml/202004201540.vYPhhYMs%25lkp@intel.com
Signed-off-by: Rong Chen <rong.a.chen@intel.com>
---
 sound/soc/soc-compress.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sound/soc/soc-compress.c b/sound/soc/soc-compress.c
index 50062eb79adb..e7bd80ed7f2e 100644
--- a/sound/soc/soc-compress.c
+++ b/sound/soc/soc-compress.c
@@ -72,7 +72,7 @@ static int soc_compr_components_free(struct snd_compr_stream *cstream,
 static int soc_compr_open(struct snd_compr_stream *cstream)
 {
 	struct snd_soc_pcm_runtime *rtd = cstream->private_data;
-	struct snd_soc_component *component, *save = NULL;
+	struct snd_soc_component *component = NULL, *save = NULL;
 	struct snd_soc_dai *cpu_dai = rtd->cpu_dai;
 	int ret, i;
 
-- 
2.20.1


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

* Re: [PATCH] ASoC: soc-compress: avoid false-positive Wuninitialized warning
  2020-04-22  7:35 ` [PATCH] ASoC: soc-compress: avoid false-positive Wuninitialized warning Rong Chen
@ 2020-04-22 22:18   ` Kuninori Morimoto
  2020-04-23 13:49   ` Mark Brown
  2020-04-24 12:19   ` Mark Brown
  2 siblings, 0 replies; 7+ messages in thread
From: Kuninori Morimoto @ 2020-04-22 22:18 UTC (permalink / raw)
  To: Rong Chen
  Cc: alsa-devel, kbuild test robot, linux-kernel, Takashi Iwai,
	Liam Girdwood, Vinod Koul, Mark Brown


Hi

> gcc-6.5 and earlier show a new warning:
> 
> sound/soc/soc-compress.c: In function ‘soc_compr_open’:
> sound/soc/soc-compress.c:75:28: warning: ‘component’ is used uninitialized in this function [-Wuninitialized]
>   struct snd_soc_component *component, *save = NULL;
>                               ^~~~~~~~~
> 
> Simplest fix is to initialize it to avoid the warning.
> 
> Reported-by: kbuild test robot <lkp@intel.com>
> Cc: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
> Link: https://lore.kernel.org/lkml/202004201540.vYPhhYMs%25lkp@intel.com
> Signed-off-by: Rong Chen <rong.a.chen@intel.com>
> ---

Acked-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>

Thank you for your help !!

Best regards
---
Kuninori Morimoto

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

* Re: [PATCH] ASoC: soc-compress: avoid false-positive Wuninitialized warning
  2020-04-22  7:35 ` [PATCH] ASoC: soc-compress: avoid false-positive Wuninitialized warning Rong Chen
  2020-04-22 22:18   ` Kuninori Morimoto
@ 2020-04-23 13:49   ` Mark Brown
  2020-04-24 12:19   ` Mark Brown
  2 siblings, 0 replies; 7+ messages in thread
From: Mark Brown @ 2020-04-23 13:49 UTC (permalink / raw)
  To: Rong Chen
  Cc: alsa-devel, kbuild test robot, Kuninori Morimoto, Liam Girdwood,
	linux-kernel, Takashi Iwai, Vinod Koul

[-- Attachment #1: Type: text/plain, Size: 639 bytes --]

On Wed, Apr 22, 2020 at 03:35:43PM +0800, Rong Chen wrote:
> gcc-6.5 and earlier show a new warning:
> 
> sound/soc/soc-compress.c: In function ‘soc_compr_open’:
> sound/soc/soc-compress.c:75:28: warning: ‘component’ is used uninitialized in this function [-Wuninitialized]
>   struct snd_soc_component *component, *save = NULL;
>                               ^~~~~~~~~

> Simplest fix is to initialize it to avoid the warning.

This doesn't apply against current code, please check and resend.  TBH
I'm not 100% sure the benefit here is worth it, this is a very old
compiler and it seems like a bug in the compiler.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

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

* [PATCH v2] ASoC: soc-compress: avoid false-positive Wuninitialized warning
       [not found] <202004201540.vYPhhYMs%lkp@intel.com>
  2020-04-22  7:35 ` [PATCH] ASoC: soc-compress: avoid false-positive Wuninitialized warning Rong Chen
@ 2020-04-24  0:54 ` Rong Chen
  2020-04-24  4:34   ` Kuninori Morimoto
  2020-04-24 12:19   ` Mark Brown
  1 sibling, 2 replies; 7+ messages in thread
From: Rong Chen @ 2020-04-24  0:54 UTC (permalink / raw)
  To: Vinod Koul, Liam Girdwood, Mark Brown, Jaroslav Kysela,
	Takashi Iwai, alsa-devel, linux-kernel
  Cc: kbuild test robot, Kuninori Morimoto, Rong Chen

gcc-6.5 and earlier show a new warning:

sound/soc/soc-compress.c: In function ‘soc_compr_open’:
sound/soc/soc-compress.c:75:28: warning: ‘component’ is used uninitialized in this function [-Wuninitialized]
  struct snd_soc_component *component, *save = NULL;
                              ^~~~~~~~~

Simplest fix is to initialize it to avoid the warning.

Reported-by: kbuild test robot <lkp@intel.com>
Cc: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/lkml/202004201540.vYPhhYMs%25lkp@intel.com
Signed-off-by: Rong Chen <rong.a.chen@intel.com>
---
 sound/soc/soc-compress.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sound/soc/soc-compress.c b/sound/soc/soc-compress.c
index ceaf976db0bb..8431ff72be63 100644
--- a/sound/soc/soc-compress.c
+++ b/sound/soc/soc-compress.c
@@ -72,7 +72,7 @@ static int soc_compr_components_free(struct snd_compr_stream *cstream,
 static int soc_compr_open(struct snd_compr_stream *cstream)
 {
 	struct snd_soc_pcm_runtime *rtd = cstream->private_data;
-	struct snd_soc_component *component, *save = NULL;
+	struct snd_soc_component *component = NULL, *save = NULL;
 	struct snd_soc_dai *cpu_dai = asoc_rtd_to_cpu(rtd, 0);
 	int ret, i;
 
-- 
2.20.1


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

* Re: [PATCH v2] ASoC: soc-compress: avoid false-positive Wuninitialized warning
  2020-04-24  0:54 ` [PATCH v2] " Rong Chen
@ 2020-04-24  4:34   ` Kuninori Morimoto
  2020-04-24 12:19   ` Mark Brown
  1 sibling, 0 replies; 7+ messages in thread
From: Kuninori Morimoto @ 2020-04-24  4:34 UTC (permalink / raw)
  To: Rong Chen
  Cc: alsa-devel, kbuild test robot, linux-kernel, Takashi Iwai,
	Liam Girdwood, Vinod Koul, Mark Brown


Hi

> gcc-6.5 and earlier show a new warning:
> 
> sound/soc/soc-compress.c: In function ‘soc_compr_open’:
> sound/soc/soc-compress.c:75:28: warning: ‘component’ is used uninitialized in this function [-Wuninitialized]
>   struct snd_soc_component *component, *save = NULL;
>                               ^~~~~~~~~
> 
> Simplest fix is to initialize it to avoid the warning.
> 
> Reported-by: kbuild test robot <lkp@intel.com>
> Cc: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
> Link: https://lore.kernel.org/lkml/202004201540.vYPhhYMs%25lkp@intel.com
> Signed-off-by: Rong Chen <rong.a.chen@intel.com>
> ---

Acked-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>

Thank you for your help !!

Best regards
---
Kuninori Morimoto

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

* Re: [PATCH] ASoC: soc-compress: avoid false-positive Wuninitialized warning
  2020-04-22  7:35 ` [PATCH] ASoC: soc-compress: avoid false-positive Wuninitialized warning Rong Chen
  2020-04-22 22:18   ` Kuninori Morimoto
  2020-04-23 13:49   ` Mark Brown
@ 2020-04-24 12:19   ` Mark Brown
  2 siblings, 0 replies; 7+ messages in thread
From: Mark Brown @ 2020-04-24 12:19 UTC (permalink / raw)
  To: linux-kernel, Rong Chen, Liam Girdwood, Takashi Iwai, Vinod Koul,
	alsa-devel, Jaroslav Kysela
  Cc: kbuild test robot, Kuninori Morimoto

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 1373 bytes --]

On Wed, 22 Apr 2020 15:35:43 +0800, Rong Chen wrote:
> gcc-6.5 and earlier show a new warning:
> 
> sound/soc/soc-compress.c: In function ‘soc_compr_open’:
> sound/soc/soc-compress.c:75:28: warning: ‘component’ is used uninitialized in this function [-Wuninitialized]
>   struct snd_soc_component *component, *save = NULL;
>                               ^~~~~~~~~
> 
> [...]

Applied to

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

Thanks!

[1/1] ASoC: soc-compress: avoid false-positive Wuninitialized warning
      commit: 3e645a4add53eec22f3818c9da01c19191525096

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

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

* Re: [PATCH v2] ASoC: soc-compress: avoid false-positive Wuninitialized warning
  2020-04-24  0:54 ` [PATCH v2] " Rong Chen
  2020-04-24  4:34   ` Kuninori Morimoto
@ 2020-04-24 12:19   ` Mark Brown
  1 sibling, 0 replies; 7+ messages in thread
From: Mark Brown @ 2020-04-24 12:19 UTC (permalink / raw)
  To: linux-kernel, Rong Chen, Takashi Iwai, Liam Girdwood, Vinod Koul,
	alsa-devel, Jaroslav Kysela
  Cc: kbuild test robot, Kuninori Morimoto

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 1373 bytes --]

On Fri, 24 Apr 2020 08:54:37 +0800, Rong Chen wrote:
> gcc-6.5 and earlier show a new warning:
> 
> sound/soc/soc-compress.c: In function ‘soc_compr_open’:
> sound/soc/soc-compress.c:75:28: warning: ‘component’ is used uninitialized in this function [-Wuninitialized]
>   struct snd_soc_component *component, *save = NULL;
>                               ^~~~~~~~~
> 
> [...]

Applied to

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

Thanks!

[1/1] ASoC: soc-compress: avoid false-positive Wuninitialized warning
      commit: 3e645a4add53eec22f3818c9da01c19191525096

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

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

end of thread, other threads:[~2020-04-24 12:21 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <202004201540.vYPhhYMs%lkp@intel.com>
2020-04-22  7:35 ` [PATCH] ASoC: soc-compress: avoid false-positive Wuninitialized warning Rong Chen
2020-04-22 22:18   ` Kuninori Morimoto
2020-04-23 13:49   ` Mark Brown
2020-04-24 12:19   ` Mark Brown
2020-04-24  0:54 ` [PATCH v2] " Rong Chen
2020-04-24  4:34   ` Kuninori Morimoto
2020-04-24 12:19   ` 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).