Skip to contentSkip to conversation

ASoC: trivial compile warning fixes

PATCH In review Takashi Iwai 4 participants 12 messages May 6, 2019 – May 7, 2019

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

cover ASoC: trivial compile warning fixes

Hi,

here are the three fixes for trivial compile warnings I caught during build test.

Takashi

===

Takashi Iwai (3):
ASoC: da7219: Fix a compile warning at CONFIG_COMMON_CLK=n
ASoC: SOF: Fix a compile warning with CONFIG_PCI=n
ASoC: rockchip: Fix an uninitialized variable compile warning

 sound/soc/codecs/da7219.c         | 2 ++
 sound/soc/rockchip/rockchip_pdm.c | 2 +-
 sound/soc/sof/ops.c               | 2 +-
 3 files changed, 4 insertions(+), 2 deletions(-)
Signature · 1 line
2.16.4
#1 lore raw

PATCH 1/3 ASoC: da7219: Fix a compile warning at CONFIG_COMMON_CLK=n

A trivial fix for the randconfig build error:
sound/soc/codecs/da7219.c:2366:6: warning: unused variable ‘i’ [-Wunused-variable]

Fixes d90ba6c8b53e ("ASoC: da7219: Expose BCLK and WCLK control through CCF")
---
 sound/soc/codecs/da7219.c | 2 ++
 1 file changed, 2 insertions(+)
sound/soc/codecs/da7219.c +2 -0
index cf2948c00262..7d9d1f84eed8 100644
@@ -2363,7 +2363,9 @@ static int da7219_probe(struct snd_soc_component *component)
 static void da7219_remove(struct snd_soc_component *component)
 {
 	struct da7219_priv *da7219 = snd_soc_component_get_drvdata(component);
+#ifdef CONFIG_COMMON_CLK
 	int i;
+#endif
 
 	da7219_aad_exit(component);
 
Signature · 6 lines
2.16.4

_______________________________________________
Alsa-devel mailing list
[email protected]
https://mailman.alsa-project.org/mailman/listinfo/alsa-devel
maintainer
#2 lore raw

Applied "ASoC: da7219: Fix a compile warning at CONFIG_COMMON_CLK=n" to the asoc tree

The patch

ASoC: da7219: Fix a compile warning at CONFIG_COMMON_CLK=n

has been applied to the asoc tree at

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

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

Quoted 1 line

From ab0c433f32f86370152bc9cb4900e5fe9a11055c Mon Sep 17 00:00:00 2001

From: Takashi Iwai <[email protected]>
Date: Mon, 6 May 2019 17:02:22 +0200
Subject: [PATCH] ASoC: da7219: Fix a compile warning at CONFIG_COMMON_CLK=n
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

A trivial fix for the randconfig build error:
sound/soc/codecs/da7219.c:2366:6: warning: unused variable ‘i’ [-Wunused-variable]

Fixes d90ba6c8b53e ("ASoC: da7219: Expose BCLK and WCLK control through CCF")
---
 sound/soc/codecs/da7219.c | 2 ++
 1 file changed, 2 insertions(+)
sound/soc/codecs/da7219.c +2 -0
index 206d01c6eb7e..43c03e7b2f0e 100644
@@ -2357,7 +2357,9 @@ static int da7219_probe(struct snd_soc_component *component)
 static void da7219_remove(struct snd_soc_component *component)
 {
 	struct da7219_priv *da7219 = snd_soc_component_get_drvdata(component);
+#ifdef CONFIG_COMMON_CLK
 	int i;
+#endif
 
 	da7219_aad_exit(component);
 
Signature · 1 line
2.20.1
maintainer
#3 lore raw

Applied "ASoC: da7219: Fix a compile warning at CONFIG_COMMON_CLK=n" to the asoc tree

In reply to Takashi Iwai

The patch

ASoC: da7219: Fix a compile warning at CONFIG_COMMON_CLK=n

has been applied to the asoc tree at

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

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

Quoted 1 line

From ab0c433f32f86370152bc9cb4900e5fe9a11055c Mon Sep 17 00:00:00 2001

From: Takashi Iwai <[email protected]>
Date: Mon, 6 May 2019 17:02:22 +0200
Subject: [PATCH] ASoC: da7219: Fix a compile warning at CONFIG_COMMON_CLK=n
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

A trivial fix for the randconfig build error:
sound/soc/codecs/da7219.c:2366:6: warning: unused variable ‘i’ [-Wunused-variable]

Fixes d90ba6c8b53e ("ASoC: da7219: Expose BCLK and WCLK control through CCF")
---
 sound/soc/codecs/da7219.c | 2 ++
 1 file changed, 2 insertions(+)
sound/soc/codecs/da7219.c +2 -0
index 206d01c6eb7e..43c03e7b2f0e 100644
@@ -2357,7 +2357,9 @@ static int da7219_probe(struct snd_soc_component *component)
 static void da7219_remove(struct snd_soc_component *component)
 {
 	struct da7219_priv *da7219 = snd_soc_component_get_drvdata(component);
+#ifdef CONFIG_COMMON_CLK
 	int i;
+#endif
 
 	da7219_aad_exit(component);
 
Signature · 1 line
2.20.1
#4 lore raw

PATCH 2/3 ASoC: SOF: Fix a compile warning with CONFIG_PCI=n

In reply to Takashi Iwai

A trivial fix for the randconfig build error:
sound/soc/sof/ops.c:20:6: warning: ‘ret’ is used uninitialized in this function [-Wuninitialized]

Fixes d1d95fcb63e3 ("ASoC: SOF: Add DSP HW abstraction operations")
---
 sound/soc/sof/ops.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
sound/soc/sof/ops.c +1 -1
index 80f907740b82..7a27c3b719e7 100644
@@ -17,7 +17,7 @@ bool snd_sof_pci_update_bits_unlocked(struct snd_sof_dev *sdev, u32 offset,
 {
 	struct pci_dev *pci = to_pci_dev(sdev->dev);
 	unsigned int old, new;
-	u32 ret;
+	u32 ret = 0;
 
 	pci_read_config_dword(pci, offset, &ret);
 	old = ret;
Signature · 6 lines
2.16.4

_______________________________________________
Alsa-devel mailing list
[email protected]
https://mailman.alsa-project.org/mailman/listinfo/alsa-devel
Acked-by on v1 2/3
#5 lore raw

Re: [PATCH 2/3] ASoC: SOF: Fix a compile warning with CONFIG_PCI=n

Quoted 5 lines · Takashi Iwai

A trivial fix for the randconfig build error:
sound/soc/sof/ops.c:20:6: warning: ‘ret’ is used uninitialized in this function [-Wuninitialized]

Fixes d1d95fcb63e3 ("ASoC: SOF: Add DSP HW abstraction operations")

I remember fixing this, probably never applied it to the right branch :-( Thanks Takashi.

Quoted 10 lines
---
  sound/soc/sof/ops.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
sound/soc/sof/ops.c +0 -0
index 80f907740b82..7a27c3b719e7 100644

sound/soc/sof/ops.c bool snd_sof_pci_update_bits_unlocked(struct snd_sof_dev *sdev, u32 offset, · line 23

Quoted 8 lines
sound/soc/sof/ops.c +1 -1
@@ -17,7 +17,7 @@ bool snd_sof_pci_update_bits_unlocked(struct snd_sof_dev *sdev, u32 offset,
  {
  	struct pci_dev *pci = to_pci_dev(sdev->dev);
  	unsigned int old, new;
-	u32 ret;
+	u32 ret = 0;
 
  	pci_read_config_dword(pci, offset, &ret);
  	old = ret;

_______________________________________________
Alsa-devel mailing list
[email protected]
https://mailman.alsa-project.org/mailman/listinfo/alsa-devel

#6 lore raw

Re: [PATCH 2/3] ASoC: SOF: Fix a compile warning with CONFIG_PCI=n

In reply to Takashi Iwai
Quoted 3 lines · Takashi Iwai

A trivial fix for the randconfig build error:
sound/soc/sof/ops.c:20:6: warning: ‘ret’ is used uninitialized in
this function [-Wuninitialized]

Looks good. Thanks, Takashi.

Ranjani

Quoted 20 lines
Fixes d1d95fcb63e3 ("ASoC: SOF: Add DSP HW abstraction operations")
---
 sound/soc/sof/ops.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
sound/soc/sof/ops.c +1 -1
index 80f907740b82..7a27c3b719e7 100644
@@ -17,7 +17,7 @@ bool snd_sof_pci_update_bits_unlocked(struct
 snd_sof_dev *sdev, u32 offset,
 {
 	struct pci_dev *pci = to_pci_dev(sdev->dev);
 	unsigned int old, new;
-	u32 ret;
+	u32 ret = 0;
 
 	pci_read_config_dword(pci, offset, &ret);
Quoted 1 line

old = ret;

_______________________________________________
Alsa-devel mailing list
[email protected]
https://mailman.alsa-project.org/mailman/listinfo/alsa-devel

maintainer
#7 lore raw

Applied "ASoC: SOF: Fix a compile warning with CONFIG_PCI=n" to the asoc tree

In reply to Takashi Iwai

The patch

ASoC: SOF: Fix a compile warning with CONFIG_PCI=n

has been applied to the asoc tree at

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

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

Quoted 1 line

From c41d384c39f17ffb5326531da2374a1ab5859403 Mon Sep 17 00:00:00 2001

From: Takashi Iwai <[email protected]>
Date: Mon, 6 May 2019 17:02:23 +0200
Subject: [PATCH] ASoC: SOF: Fix a compile warning with CONFIG_PCI=n
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

A trivial fix for the randconfig build error:
sound/soc/sof/ops.c:20:6: warning: ‘ret’ is used uninitialized in this function [-Wuninitialized]

Fixes d1d95fcb63e3 ("ASoC: SOF: Add DSP HW abstraction operations")
---
 sound/soc/sof/ops.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
sound/soc/sof/ops.c +1 -1
index 80f907740b82..7a27c3b719e7 100644
@@ -17,7 +17,7 @@ bool snd_sof_pci_update_bits_unlocked(struct snd_sof_dev *sdev, u32 offset,
 {
 	struct pci_dev *pci = to_pci_dev(sdev->dev);
 	unsigned int old, new;
-	u32 ret;
+	u32 ret = 0;
 
 	pci_read_config_dword(pci, offset, &ret);
 	old = ret;
Signature · 1 line
2.20.1
maintainer
#8 lore raw

Applied "ASoC: SOF: Fix a compile warning with CONFIG_PCI=n" to the asoc tree

In reply to Takashi Iwai

The patch

ASoC: SOF: Fix a compile warning with CONFIG_PCI=n

has been applied to the asoc tree at

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

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

Quoted 1 line

From c41d384c39f17ffb5326531da2374a1ab5859403 Mon Sep 17 00:00:00 2001

From: Takashi Iwai <[email protected]>
Date: Mon, 6 May 2019 17:02:23 +0200
Subject: [PATCH] ASoC: SOF: Fix a compile warning with CONFIG_PCI=n
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

A trivial fix for the randconfig build error:
sound/soc/sof/ops.c:20:6: warning: ‘ret’ is used uninitialized in this function [-Wuninitialized]

Fixes d1d95fcb63e3 ("ASoC: SOF: Add DSP HW abstraction operations")
---
 sound/soc/sof/ops.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
sound/soc/sof/ops.c +1 -1
index 80f907740b82..7a27c3b719e7 100644
@@ -17,7 +17,7 @@ bool snd_sof_pci_update_bits_unlocked(struct snd_sof_dev *sdev, u32 offset,
 {
 	struct pci_dev *pci = to_pci_dev(sdev->dev);
 	unsigned int old, new;
-	u32 ret;
+	u32 ret = 0;
 
 	pci_read_config_dword(pci, offset, &ret);
 	old = ret;
Signature · 1 line
2.20.1
#9 lore raw

PATCH 3/3 ASoC: rockchip: Fix an uninitialized variable compile warning

In reply to Takashi Iwai

Paper over a trivial case leading to an uninitialized variable compile
warning:
sound/soc/rockchip/rockchip_pdm.c:179:3: warning: ‘clk_out’ may be used uninitialized in this function [-Wmaybe-uninitialized]

Fixes 624e8e00acaf ("ASoC: rockchip: pdm: fixup pdm fractional div")
---
 sound/soc/rockchip/rockchip_pdm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
sound/soc/rockchip/rockchip_pdm.c +1 -1
index 6c0f242db5ef..b9c1d8ad77c1 100644
@@ -158,7 +158,7 @@ static int rockchip_pdm_hw_params(struct snd_pcm_substream *substream,
 	struct rk_pdm_dev *pdm = to_info(dai);
 	unsigned int val = 0;
 	unsigned int clk_rate, clk_div, samplerate;
-	unsigned int clk_src, clk_out;
+	unsigned int clk_src, clk_out = 0;
 	unsigned long m, n;
 	bool change;
 	int ret;
Signature · 6 lines
2.16.4

_______________________________________________
Alsa-devel mailing list
[email protected]
https://mailman.alsa-project.org/mailman/listinfo/alsa-devel
maintainer
#10 lore raw

Applied "ASoC: rockchip: Fix an uninitialized variable compile warning" to the asoc tree

The patch

ASoC: rockchip: Fix an uninitialized variable compile warning

has been applied to the asoc tree at

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

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

Quoted 1 line

From f153bf49ddf6169544b24ef5ea26fa3eb4996b95 Mon Sep 17 00:00:00 2001

From: Takashi Iwai <[email protected]>
Date: Mon, 6 May 2019 17:02:24 +0200
Subject: [PATCH] ASoC: rockchip: Fix an uninitialized variable compile warning
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Paper over a trivial case leading to an uninitialized variable compile
warning:
sound/soc/rockchip/rockchip_pdm.c:179:3: warning: ‘clk_out’ may be used uninitialized in this function [-Wmaybe-uninitialized]

Fixes 624e8e00acaf ("ASoC: rockchip: pdm: fixup pdm fractional div")
---
 sound/soc/rockchip/rockchip_pdm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
sound/soc/rockchip/rockchip_pdm.c +1 -1
index 6c0f242db5ef..b9c1d8ad77c1 100644
@@ -158,7 +158,7 @@ static int rockchip_pdm_hw_params(struct snd_pcm_substream *substream,
 	struct rk_pdm_dev *pdm = to_info(dai);
 	unsigned int val = 0;
 	unsigned int clk_rate, clk_div, samplerate;
-	unsigned int clk_src, clk_out;
+	unsigned int clk_src, clk_out = 0;
 	unsigned long m, n;
 	bool change;
 	int ret;
Signature · 1 line
2.20.1
maintainer
#11 lore raw

Applied "ASoC: rockchip: Fix an uninitialized variable compile warning" to the asoc tree

In reply to Takashi Iwai

The patch

ASoC: rockchip: Fix an uninitialized variable compile warning

has been applied to the asoc tree at

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

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

Quoted 1 line

From f153bf49ddf6169544b24ef5ea26fa3eb4996b95 Mon Sep 17 00:00:00 2001

From: Takashi Iwai <[email protected]>
Date: Mon, 6 May 2019 17:02:24 +0200
Subject: [PATCH] ASoC: rockchip: Fix an uninitialized variable compile warning
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Paper over a trivial case leading to an uninitialized variable compile
warning:
sound/soc/rockchip/rockchip_pdm.c:179:3: warning: ‘clk_out’ may be used uninitialized in this function [-Wmaybe-uninitialized]

Fixes 624e8e00acaf ("ASoC: rockchip: pdm: fixup pdm fractional div")
---
 sound/soc/rockchip/rockchip_pdm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
sound/soc/rockchip/rockchip_pdm.c +1 -1
index 6c0f242db5ef..b9c1d8ad77c1 100644
@@ -158,7 +158,7 @@ static int rockchip_pdm_hw_params(struct snd_pcm_substream *substream,
 	struct rk_pdm_dev *pdm = to_info(dai);
 	unsigned int val = 0;
 	unsigned int clk_rate, clk_div, samplerate;
-	unsigned int clk_src, clk_out;
+	unsigned int clk_src, clk_out = 0;
 	unsigned long m, n;
 	bool change;
 	int ret;
Signature · 1 line
2.20.1