* [PATCH] ASoC: SOF: Intel: byt: fix unused-function warnings
@ 2020-05-29 20:04 Arnd Bergmann
2020-05-29 23:02 ` Mark Brown
0 siblings, 1 reply; 2+ messages in thread
From: Arnd Bergmann @ 2020-05-29 20:04 UTC (permalink / raw)
To: Pierre-Louis Bossart, Liam Girdwood, Ranjani Sridharan,
Kai Vehmanen, Daniel Baluta, Mark Brown
Cc: alsa-devel, Arnd Bergmann, Keyon Jie, YueHaibing, Takashi Iwai,
linux-kernel, sound-open-firmware
Several functions in this driver are only referenced for baytrail-class
configurations and building configurations with only merrifield enabled
causes a warning:
sound/soc/sof/intel/byt.c:447:12: error: unused function 'byt_suspend' [-Werror,-Wunused-function]
static int byt_suspend(struct snd_sof_dev *sdev, u32 target_state)
^
sound/soc/sof/intel/byt.c:454:12: error: unused function 'byt_resume' [-Werror,-Wunused-function]
static int byt_resume(struct snd_sof_dev *sdev)
^
sound/soc/sof/intel/byt.c:464:12: error: unused function 'byt_remove' [-Werror,-Wunused-function]
static int byt_remove(struct snd_sof_dev *sdev)
Move these into a corresponding #ifdef section.
Fixes: c691f0c6e267 ("ASoC: SOF: Intel: BYT: add .remove op")
Fixes: ddcccd543f5d ("ASoC: SOF: Intel: byt: Add PM callbacks")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
sound/soc/sof/intel/byt.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/sound/soc/sof/intel/byt.c b/sound/soc/sof/intel/byt.c
index e6ba8382b1de..6ae62a8a9daf 100644
--- a/sound/soc/sof/intel/byt.c
+++ b/sound/soc/sof/intel/byt.c
@@ -432,6 +432,7 @@ static void byt_set_mach_params(const struct snd_soc_acpi_mach *mach,
mach_params->platform = dev_name(dev);
}
+#if IS_ENABLED(CONFIG_SND_SOC_SOF_BAYTRAIL)
static void byt_reset_dsp_disable_int(struct snd_sof_dev *sdev)
{
/* Disable Interrupt from both sides */
@@ -467,6 +468,7 @@ static int byt_remove(struct snd_sof_dev *sdev)
return 0;
}
+#endif
/* Baytrail DAIs */
static struct snd_soc_dai_driver byt_dai[] = {
--
2.26.2
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] ASoC: SOF: Intel: byt: fix unused-function warnings
2020-05-29 20:04 [PATCH] ASoC: SOF: Intel: byt: fix unused-function warnings Arnd Bergmann
@ 2020-05-29 23:02 ` Mark Brown
0 siblings, 0 replies; 2+ messages in thread
From: Mark Brown @ 2020-05-29 23:02 UTC (permalink / raw)
To: Arnd Bergmann
Cc: Pierre-Louis Bossart, alsa-devel, Kai Vehmanen, Liam Girdwood,
YueHaibing, Takashi Iwai, Keyon Jie, Ranjani Sridharan,
Daniel Baluta, linux-kernel, sound-open-firmware
[-- Attachment #1: Type: text/plain, Size: 266 bytes --]
On Fri, May 29, 2020 at 10:04:17PM +0200, Arnd Bergmann wrote:
> Several functions in this driver are only referenced for baytrail-class
> configurations and building configurations with only merrifield enabled
> causes a warning:
Pierre fixed this earlier today.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-05-29 23:03 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-05-29 20:04 [PATCH] ASoC: SOF: Intel: byt: fix unused-function warnings Arnd Bergmann
2020-05-29 23:02 ` Mark Brown
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox