[PATCH 0/6] ASoC: amd: remove warnings with make W=1
Yet another cleanup series, with good findings of variables not used for anything.
Pierre-Louis Bossart (6): ASoC: amd: acp-da7219-max98357a: fix 'defined but not used' warning ASoC: amd: acp-rt5645: fix 'defined but not used' warning ASoC: amd: raven: acp3x-pcm-dma: fix 'set but not used' warning ASoC: amd: raven: acp3x-i2s: fix 'set but not used' warning ASoC: amd: raven: acp3x-pcm-dma: remove unused-but-set variable ASoC: amd: raven: acp3x-i2s: remove unused-but-set variable
sound/soc/amd/acp-da7219-max98357a.c | 2 ++ sound/soc/amd/acp-rt5645.c | 2 ++ sound/soc/amd/raven/acp3x-i2s.c | 4 ---- sound/soc/amd/raven/acp3x-pcm-dma.c | 4 ---- 4 files changed, 4 insertions(+), 8 deletions(-)
Fix W=1 warning
Signed-off-by: Pierre-Louis Bossart pierre-louis.bossart@linux.intel.com --- sound/soc/amd/acp-da7219-max98357a.c | 2 ++ 1 file changed, 2 insertions(+)
diff --git a/sound/soc/amd/acp-da7219-max98357a.c b/sound/soc/amd/acp-da7219-max98357a.c index 9414d7269c4f..7d8986379d80 100644 --- a/sound/soc/amd/acp-da7219-max98357a.c +++ b/sound/soc/amd/acp-da7219-max98357a.c @@ -450,11 +450,13 @@ static int cz_probe(struct platform_device *pdev) return 0; }
+#ifdef CONFIG_ACPI static const struct acpi_device_id cz_audio_acpi_match[] = { { "AMD7219", 0 }, {}, }; MODULE_DEVICE_TABLE(acpi, cz_audio_acpi_match); +#endif
static struct platform_driver cz_pcm_driver = { .driver = {
Fix W=1 warning
Signed-off-by: Pierre-Louis Bossart pierre-louis.bossart@linux.intel.com --- sound/soc/amd/acp-rt5645.c | 2 ++ 1 file changed, 2 insertions(+)
diff --git a/sound/soc/amd/acp-rt5645.c b/sound/soc/amd/acp-rt5645.c index 73b31f88a6b5..87f0060e771f 100644 --- a/sound/soc/amd/acp-rt5645.c +++ b/sound/soc/amd/acp-rt5645.c @@ -182,11 +182,13 @@ static int cz_probe(struct platform_device *pdev) return 0; }
+#ifdef CONFIG_ACPI static const struct acpi_device_id cz_audio_acpi_match[] = { { "AMDI1002", 0 }, {}, }; MODULE_DEVICE_TABLE(acpi, cz_audio_acpi_match); +#endif
static struct platform_driver cz_pcm_driver = { .driver = {
Fix W=1 warning. the card variable is useless here.
Signed-off-by: Pierre-Louis Bossart pierre-louis.bossart@linux.intel.com --- sound/soc/amd/raven/acp3x-pcm-dma.c | 2 -- 1 file changed, 2 deletions(-)
diff --git a/sound/soc/amd/raven/acp3x-pcm-dma.c b/sound/soc/amd/raven/acp3x-pcm-dma.c index 5bd458e0fe31..1f0fe5aaab1d 100644 --- a/sound/soc/amd/raven/acp3x-pcm-dma.c +++ b/sound/soc/amd/raven/acp3x-pcm-dma.c @@ -302,14 +302,12 @@ static snd_pcm_uframes_t acp3x_dma_pointer(struct snd_soc_component *component, struct snd_pcm_substream *substream) { struct snd_soc_pcm_runtime *prtd; - struct snd_soc_card *card; struct i2s_stream_instance *rtd; u32 pos; u32 buffersize; u64 bytescount;
prtd = substream->private_data; - card = prtd->card; rtd = substream->runtime->private_data;
buffersize = frames_to_bytes(substream->runtime,
Fix W=1 warning. the card variable is useless here
Signed-off-by: Pierre-Louis Bossart pierre-louis.bossart@linux.intel.com --- sound/soc/amd/raven/acp3x-i2s.c | 2 -- 1 file changed, 2 deletions(-)
diff --git a/sound/soc/amd/raven/acp3x-i2s.c b/sound/soc/amd/raven/acp3x-i2s.c index 14607563abd2..a0e14cc91d95 100644 --- a/sound/soc/amd/raven/acp3x-i2s.c +++ b/sound/soc/amd/raven/acp3x-i2s.c @@ -150,13 +150,11 @@ static int acp3x_i2s_trigger(struct snd_pcm_substream *substream, { struct i2s_stream_instance *rtd; struct snd_soc_pcm_runtime *prtd; - struct snd_soc_card *card; u32 ret, val, period_bytes, reg_val, ier_val, water_val; u32 buf_size, buf_reg;
prtd = substream->private_data; rtd = substream->runtime->private_data; - card = prtd->card; period_bytes = frames_to_bytes(substream->runtime, substream->runtime->period_size); buf_size = frames_to_bytes(substream->runtime,
Fix W=1 warning. The variable prtd is not used, remove.
Signed-off-by: Pierre-Louis Bossart pierre-louis.bossart@linux.intel.com --- sound/soc/amd/raven/acp3x-pcm-dma.c | 2 -- 1 file changed, 2 deletions(-)
diff --git a/sound/soc/amd/raven/acp3x-pcm-dma.c b/sound/soc/amd/raven/acp3x-pcm-dma.c index 1f0fe5aaab1d..17290c829c4b 100644 --- a/sound/soc/amd/raven/acp3x-pcm-dma.c +++ b/sound/soc/amd/raven/acp3x-pcm-dma.c @@ -301,13 +301,11 @@ static int acp3x_dma_hw_params(struct snd_soc_component *component, static snd_pcm_uframes_t acp3x_dma_pointer(struct snd_soc_component *component, struct snd_pcm_substream *substream) { - struct snd_soc_pcm_runtime *prtd; struct i2s_stream_instance *rtd; u32 pos; u32 buffersize; u64 bytescount;
- prtd = substream->private_data; rtd = substream->runtime->private_data;
buffersize = frames_to_bytes(substream->runtime,
Fix W=1 warning. The variable prtd is set but not used.
Signed-off-by: Pierre-Louis Bossart pierre-louis.bossart@linux.intel.com --- sound/soc/amd/raven/acp3x-i2s.c | 2 -- 1 file changed, 2 deletions(-)
diff --git a/sound/soc/amd/raven/acp3x-i2s.c b/sound/soc/amd/raven/acp3x-i2s.c index a0e14cc91d95..c3eb9b347eaa 100644 --- a/sound/soc/amd/raven/acp3x-i2s.c +++ b/sound/soc/amd/raven/acp3x-i2s.c @@ -149,11 +149,9 @@ static int acp3x_i2s_trigger(struct snd_pcm_substream *substream, int cmd, struct snd_soc_dai *dai) { struct i2s_stream_instance *rtd; - struct snd_soc_pcm_runtime *prtd; u32 ret, val, period_bytes, reg_val, ier_val, water_val; u32 buf_size, buf_reg;
- prtd = substream->private_data; rtd = substream->runtime->private_data; period_bytes = frames_to_bytes(substream->runtime, substream->runtime->period_size);
On Thu, 2 Jul 2020 11:44:27 -0500, Pierre-Louis Bossart wrote:
Yet another cleanup series, with good findings of variables not used for anything.
Pierre-Louis Bossart (6): ASoC: amd: acp-da7219-max98357a: fix 'defined but not used' warning ASoC: amd: acp-rt5645: fix 'defined but not used' warning ASoC: amd: raven: acp3x-pcm-dma: fix 'set but not used' warning ASoC: amd: raven: acp3x-i2s: fix 'set but not used' warning ASoC: amd: raven: acp3x-pcm-dma: remove unused-but-set variable ASoC: amd: raven: acp3x-i2s: remove unused-but-set variable
[...]
Applied to
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next
Thanks!
[1/6] ASoC: amd: acp-da7219-max98357a: fix 'defined but not used' warning commit: dc1aff7f0d1b79e17026e08b14d7bb60ccdae1c8 [2/6] ASoC: amd: acp-rt5645: fix 'defined but not used' warning commit: 41e4a5b32af6ccec4e11a1cbd20c5569d20faa24 [3/6] ASoC: amd: raven: acp3x-pcm-dma: fix 'set but not used' warning commit: 5ec2978f1e7494065d1b44e20b047e5840fd7ca7 [4/6] ASoC: amd: raven: acp3x-i2s: fix 'set but not used' warning commit: fadecf947a72f54843afa12c6732c52914d5024d [5/6] ASoC: amd: raven: acp3x-pcm-dma: remove unused-but-set variable commit: 16607237f3b6a56ace8cdbd19bb793cb9bb3f18e [6/6] ASoC: amd: raven: acp3x-i2s: remove unused-but-set variable commit: 343403e2dad897a3c6c974a43d760b4fb96b996b
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
participants (2)
-
Mark Brown
-
Pierre-Louis Bossart