[alsa-devel] [PATCH 0/3] 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(-)
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") Signed-off-by: Takashi Iwai tiwai@suse.de --- sound/soc/codecs/da7219.c | 2 ++ 1 file changed, 2 insertions(+)
diff --git a/sound/soc/codecs/da7219.c b/sound/soc/codecs/da7219.c index cf2948c00262..7d9d1f84eed8 100644 --- a/sound/soc/codecs/da7219.c +++ b/sound/soc/codecs/da7219.c @@ -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);
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
From ab0c433f32f86370152bc9cb4900e5fe9a11055c Mon Sep 17 00:00:00 2001
From: Takashi Iwai tiwai@suse.de 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") Signed-off-by: Takashi Iwai tiwai@suse.de Signed-off-by: Mark Brown broonie@kernel.org --- sound/soc/codecs/da7219.c | 2 ++ 1 file changed, 2 insertions(+)
diff --git a/sound/soc/codecs/da7219.c b/sound/soc/codecs/da7219.c index 206d01c6eb7e..43c03e7b2f0e 100644 --- a/sound/soc/codecs/da7219.c +++ b/sound/soc/codecs/da7219.c @@ -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);
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
From ab0c433f32f86370152bc9cb4900e5fe9a11055c Mon Sep 17 00:00:00 2001
From: Takashi Iwai tiwai@suse.de 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") Signed-off-by: Takashi Iwai tiwai@suse.de Signed-off-by: Mark Brown broonie@kernel.org --- sound/soc/codecs/da7219.c | 2 ++ 1 file changed, 2 insertions(+)
diff --git a/sound/soc/codecs/da7219.c b/sound/soc/codecs/da7219.c index 206d01c6eb7e..43c03e7b2f0e 100644 --- a/sound/soc/codecs/da7219.c +++ b/sound/soc/codecs/da7219.c @@ -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);
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") Signed-off-by: Takashi Iwai tiwai@suse.de --- sound/soc/sof/ops.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sound/soc/sof/ops.c b/sound/soc/sof/ops.c index 80f907740b82..7a27c3b719e7 100644 --- a/sound/soc/sof/ops.c +++ b/sound/soc/sof/ops.c @@ -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;
On 5/6/19 10:02 AM, Takashi Iwai wrote:
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") Signed-off-by: Takashi Iwai tiwai@suse.de
I remember fixing this, probably never applied it to the right branch :-( Thanks Takashi.
Acked-by: Pierre-Louis Bossart pierre-louis.bossart@linux.intel.com
sound/soc/sof/ops.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sound/soc/sof/ops.c b/sound/soc/sof/ops.c index 80f907740b82..7a27c3b719e7 100644 --- a/sound/soc/sof/ops.c +++ b/sound/soc/sof/ops.c @@ -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;
On Mon, 2019-05-06 at 17:02 +0200, Takashi Iwai wrote:
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
Fixes: d1d95fcb63e3 ("ASoC: SOF: Add DSP HW abstraction operations") Signed-off-by: Takashi Iwai tiwai@suse.de
sound/soc/sof/ops.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sound/soc/sof/ops.c b/sound/soc/sof/ops.c index 80f907740b82..7a27c3b719e7 100644 --- a/sound/soc/sof/ops.c +++ b/sound/soc/sof/ops.c @@ -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;
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
From c41d384c39f17ffb5326531da2374a1ab5859403 Mon Sep 17 00:00:00 2001
From: Takashi Iwai tiwai@suse.de 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") Signed-off-by: Takashi Iwai tiwai@suse.de Acked-by: Pierre-Louis Bossart pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown broonie@kernel.org --- sound/soc/sof/ops.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sound/soc/sof/ops.c b/sound/soc/sof/ops.c index 80f907740b82..7a27c3b719e7 100644 --- a/sound/soc/sof/ops.c +++ b/sound/soc/sof/ops.c @@ -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;
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
From c41d384c39f17ffb5326531da2374a1ab5859403 Mon Sep 17 00:00:00 2001
From: Takashi Iwai tiwai@suse.de 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") Signed-off-by: Takashi Iwai tiwai@suse.de Acked-by: Pierre-Louis Bossart pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown broonie@kernel.org --- sound/soc/sof/ops.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sound/soc/sof/ops.c b/sound/soc/sof/ops.c index 80f907740b82..7a27c3b719e7 100644 --- a/sound/soc/sof/ops.c +++ b/sound/soc/sof/ops.c @@ -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;
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") Signed-off-by: Takashi Iwai tiwai@suse.de --- sound/soc/rockchip/rockchip_pdm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sound/soc/rockchip/rockchip_pdm.c b/sound/soc/rockchip/rockchip_pdm.c index 6c0f242db5ef..b9c1d8ad77c1 100644 --- a/sound/soc/rockchip/rockchip_pdm.c +++ b/sound/soc/rockchip/rockchip_pdm.c @@ -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;
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
From f153bf49ddf6169544b24ef5ea26fa3eb4996b95 Mon Sep 17 00:00:00 2001
From: Takashi Iwai tiwai@suse.de 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") Signed-off-by: Takashi Iwai tiwai@suse.de Signed-off-by: Mark Brown broonie@kernel.org --- sound/soc/rockchip/rockchip_pdm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sound/soc/rockchip/rockchip_pdm.c b/sound/soc/rockchip/rockchip_pdm.c index 6c0f242db5ef..b9c1d8ad77c1 100644 --- a/sound/soc/rockchip/rockchip_pdm.c +++ b/sound/soc/rockchip/rockchip_pdm.c @@ -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;
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
From f153bf49ddf6169544b24ef5ea26fa3eb4996b95 Mon Sep 17 00:00:00 2001
From: Takashi Iwai tiwai@suse.de 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") Signed-off-by: Takashi Iwai tiwai@suse.de Signed-off-by: Mark Brown broonie@kernel.org --- sound/soc/rockchip/rockchip_pdm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sound/soc/rockchip/rockchip_pdm.c b/sound/soc/rockchip/rockchip_pdm.c index 6c0f242db5ef..b9c1d8ad77c1 100644 --- a/sound/soc/rockchip/rockchip_pdm.c +++ b/sound/soc/rockchip/rockchip_pdm.c @@ -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;
participants (4)
-
Mark Brown
-
Pierre-Louis Bossart
-
Ranjani Sridharan
-
Takashi Iwai