From dc1aff7f0d1b79e17026e08b14d7bb60ccdae1c8 Mon Sep 17 00:00:00 2001 From: Pierre-Louis Bossart Date: Thu, 2 Jul 2020 11:44:28 -0500 Subject: [PATCH 1/6] ASoC: amd: acp-da7219-max98357a: fix 'defined but not used' warning Fix W=1 warning Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20200702164433.162815-2-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown --- 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 = { From 41e4a5b32af6ccec4e11a1cbd20c5569d20faa24 Mon Sep 17 00:00:00 2001 From: Pierre-Louis Bossart Date: Thu, 2 Jul 2020 11:44:29 -0500 Subject: [PATCH 2/6] ASoC: amd: acp-rt5645: fix 'defined but not used' warning Fix W=1 warning Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20200702164433.162815-3-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown --- 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 = { From 5ec2978f1e7494065d1b44e20b047e5840fd7ca7 Mon Sep 17 00:00:00 2001 From: Pierre-Louis Bossart Date: Thu, 2 Jul 2020 11:44:30 -0500 Subject: [PATCH 3/6] ASoC: amd: raven: acp3x-pcm-dma: fix 'set but not used' warning Fix W=1 warning. the card variable is useless here. Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20200702164433.162815-4-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown --- 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, From fadecf947a72f54843afa12c6732c52914d5024d Mon Sep 17 00:00:00 2001 From: Pierre-Louis Bossart Date: Thu, 2 Jul 2020 11:44:31 -0500 Subject: [PATCH 4/6] ASoC: amd: raven: acp3x-i2s: fix 'set but not used' warning Fix W=1 warning. the card variable is useless here Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20200702164433.162815-5-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown --- 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, From 16607237f3b6a56ace8cdbd19bb793cb9bb3f18e Mon Sep 17 00:00:00 2001 From: Pierre-Louis Bossart Date: Thu, 2 Jul 2020 11:44:32 -0500 Subject: [PATCH 5/6] ASoC: amd: raven: acp3x-pcm-dma: remove unused-but-set variable Fix W=1 warning. The variable prtd is not used, remove. Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20200702164433.162815-6-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown --- 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, From 343403e2dad897a3c6c974a43d760b4fb96b996b Mon Sep 17 00:00:00 2001 From: Pierre-Louis Bossart Date: Thu, 2 Jul 2020 11:44:33 -0500 Subject: [PATCH 6/6] ASoC: amd: raven: acp3x-i2s: remove unused-but-set variable Fix W=1 warning. The variable prtd is set but not used. Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20200702164433.162815-7-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown --- 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);