All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ALSA: memalloc: declare snd_sgbuf_aligned_pages() unconditionally
@ 2018-07-25 20:15 Pierre-Louis Bossart
  2018-07-26  6:28 ` Takashi Iwai
                   ` (3 more replies)
  0 siblings, 4 replies; 8+ messages in thread
From: Pierre-Louis Bossart @ 2018-07-25 20:15 UTC (permalink / raw)
  To: alsa-devel; +Cc: tiwai, liam.r.girdwood, vkoul, broonie, Pierre-Louis Bossart

Make this helper inline function available for all platforms. This
helps solve 0-day compilation issues when CONFIG_SND_DMA_SGBUF is not
defined.

Reported-by: kbuild test robot <lkp@intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
---
 include/sound/memalloc.h | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/include/sound/memalloc.h b/include/sound/memalloc.h
index 9c3db3dce32b..c669900e6cbe 100644
--- a/include/sound/memalloc.h
+++ b/include/sound/memalloc.h
@@ -67,6 +67,14 @@ struct snd_dma_buffer {
 	void *private_data;	/* private for allocator; don't touch */
 };
 
+/*
+ * return the pages matching with the given byte size
+ */
+static inline unsigned int snd_sgbuf_aligned_pages(size_t size)
+{
+	return (size + PAGE_SIZE - 1) >> PAGE_SHIFT;
+}
+
 #ifdef CONFIG_SND_DMA_SGBUF
 /*
  * Scatter-Gather generic device pages
@@ -90,14 +98,6 @@ struct snd_sg_buf {
 	struct device *dev;
 };
 
-/*
- * return the pages matching with the given byte size
- */
-static inline unsigned int snd_sgbuf_aligned_pages(size_t size)
-{
-	return (size + PAGE_SIZE - 1) >> PAGE_SHIFT;
-}
-
 /*
  * return the physical address at the corresponding offset
  */
-- 
2.14.1

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

end of thread, other threads:[~2018-07-30 18:22 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-07-25 20:15 [PATCH] ALSA: memalloc: declare snd_sgbuf_aligned_pages() unconditionally Pierre-Louis Bossart
2018-07-26  6:28 ` Takashi Iwai
2018-07-26 16:08   ` Mark Brown
2018-07-26 14:51 ` kbuild test robot
2018-07-27  5:11   ` Takashi Iwai
2018-07-27 14:54     ` Pierre-Louis Bossart
2018-07-26 16:12 ` Applied "ALSA: memalloc: declare snd_sgbuf_aligned_pages() unconditionally" to the asoc tree Mark Brown
2018-07-27  1:00 ` [PATCH] ALSA: memalloc: declare snd_sgbuf_aligned_pages() unconditionally kbuild test robot

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.