All of lore.kernel.org
 help / color / mirror / Atom feed
From: Arnd Bergmann <arnd@arndb.de>
To: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>,
	Liam Girdwood <lgirdwood@gmail.com>,
	Ranjani Sridharan <ranjani.sridharan@linux.intel.com>,
	Kai Vehmanen <kai.vehmanen@linux.intel.com>,
	Daniel Baluta <daniel.baluta@nxp.com>,
	Mark Brown <broonie@kernel.org>
Cc: Arnd Bergmann <arnd@arndb.de>, Jaroslav Kysela <perex@perex.cz>,
	Takashi Iwai <tiwai@suse.com>,
	Keyon Jie <yang.jie@linux.intel.com>,
	YueHaibing <yuehaibing@huawei.com>,
	sound-open-firmware@alsa-project.org,
	alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org
Subject: [PATCH] ASoC: SOF: Intel: byt: fix unused-function warnings
Date: Fri, 29 May 2020 22:04:17 +0200	[thread overview]
Message-ID: <20200529200433.19068-1-arnd@arndb.de> (raw)

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


WARNING: multiple messages have this Message-ID (diff)
From: Arnd Bergmann <arnd@arndb.de>
To: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>,
	Liam Girdwood <lgirdwood@gmail.com>,
	Ranjani Sridharan <ranjani.sridharan@linux.intel.com>,
	Kai Vehmanen <kai.vehmanen@linux.intel.com>,
	Daniel Baluta <daniel.baluta@nxp.com>,
	Mark Brown <broonie@kernel.org>
Cc: alsa-devel@alsa-project.org, Arnd Bergmann <arnd@arndb.de>,
	Keyon Jie <yang.jie@linux.intel.com>,
	YueHaibing <yuehaibing@huawei.com>, Takashi Iwai <tiwai@suse.com>,
	linux-kernel@vger.kernel.org,
	sound-open-firmware@alsa-project.org
Subject: [PATCH] ASoC: SOF: Intel: byt: fix unused-function warnings
Date: Fri, 29 May 2020 22:04:17 +0200	[thread overview]
Message-ID: <20200529200433.19068-1-arnd@arndb.de> (raw)

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


             reply	other threads:[~2020-05-29 20:05 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-29 20:04 Arnd Bergmann [this message]
2020-05-29 20:04 ` [PATCH] ASoC: SOF: Intel: byt: fix unused-function warnings Arnd Bergmann
2020-05-29 23:02 ` Mark Brown
2020-05-29 23:02   ` Mark Brown

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200529200433.19068-1-arnd@arndb.de \
    --to=arnd@arndb.de \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@kernel.org \
    --cc=daniel.baluta@nxp.com \
    --cc=kai.vehmanen@linux.intel.com \
    --cc=lgirdwood@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=perex@perex.cz \
    --cc=pierre-louis.bossart@linux.intel.com \
    --cc=ranjani.sridharan@linux.intel.com \
    --cc=sound-open-firmware@alsa-project.org \
    --cc=tiwai@suse.com \
    --cc=yang.jie@linux.intel.com \
    --cc=yuehaibing@huawei.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.