All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ASoC: fix 0-day warnings with snd_soc_new_compress()
@ 2018-05-29 23:30 Pierre-Louis Bossart
  2018-05-30  3:16 ` Vinod
  2018-05-30 11:02 ` Applied "ASoC: fix 0-day warnings with snd_soc_new_compress()" to the asoc tree Mark Brown
  0 siblings, 2 replies; 7+ messages in thread
From: Pierre-Louis Bossart @ 2018-05-29 23:30 UTC (permalink / raw)
  To: alsa-devel; +Cc: tiwai, liam.r.girdwood, vkoul, broonie, Pierre-Louis Bossart

All conditionally-defined routines in include/sound/soc.h expose a
static inline fallback to avoid 0-day warnings and compilation issues,
except snd_soc_new_compress().

Fixes: 5db6aab6f36f ('ASoC: topology: Add support for compressed PCMs')
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
---
 include/sound/soc.h | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/include/sound/soc.h b/include/sound/soc.h
index 600a7ebd10c0..1378dcd2128a 100644
--- a/include/sound/soc.h
+++ b/include/sound/soc.h
@@ -462,6 +462,11 @@ struct snd_soc_component *snd_soc_lookup_component(struct device *dev,
 int soc_new_pcm(struct snd_soc_pcm_runtime *rtd, int num);
 #ifdef CONFIG_SND_SOC_COMPRESS
 int snd_soc_new_compress(struct snd_soc_pcm_runtime *rtd, int num);
+#else
+static inline int snd_soc_new_compress(struct snd_soc_pcm_runtime *rtd, int num)
+{
+	return 0;
+}
 #endif
 
 void snd_soc_disconnect_sync(struct device *dev);
-- 
2.14.1

^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2018-05-30 13:56 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-05-29 23:30 [PATCH] ASoC: fix 0-day warnings with snd_soc_new_compress() Pierre-Louis Bossart
2018-05-30  3:16 ` Vinod
2018-05-30 12:12   ` Pierre-Louis Bossart
2018-05-30 12:22     ` Takashi Iwai
2018-05-30 12:48       ` Pierre-Louis Bossart
2018-05-30 13:56       ` Mark Brown
2018-05-30 11:02 ` Applied "ASoC: fix 0-day warnings with snd_soc_new_compress()" to the asoc tree Mark Brown

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.