All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2] ALSA: memalloc: declare snd_sgbuf_aligned_pages() unconditionally
@ 2018-07-27 16:28 Pierre-Louis Bossart
  2018-07-28 14:48 ` Mark Brown
  0 siblings, 1 reply; 3+ messages in thread
From: Pierre-Louis Bossart @ 2018-07-27 16:28 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>
---
v2: add <asm/page.h> to solve compilation issue on ALPHA reported by 0-day

 include/sound/memalloc.h | 18 ++++++++++--------
 1 file changed, 10 insertions(+), 8 deletions(-)

diff --git a/include/sound/memalloc.h b/include/sound/memalloc.h
index 9c3db3dce32b..67561b997915 100644
--- a/include/sound/memalloc.h
+++ b/include/sound/memalloc.h
@@ -24,6 +24,8 @@
 #ifndef __SOUND_MEMALLOC_H
 #define __SOUND_MEMALLOC_H
 
+#include <asm/page.h>
+
 struct device;
 
 /*
@@ -67,6 +69,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 +100,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] 3+ messages in thread

* Re: [PATCH v2] ALSA: memalloc: declare snd_sgbuf_aligned_pages() unconditionally
  2018-07-27 16:28 [PATCH v2] ALSA: memalloc: declare snd_sgbuf_aligned_pages() unconditionally Pierre-Louis Bossart
@ 2018-07-28 14:48 ` Mark Brown
  2018-07-30  6:48   ` Takashi Iwai
  0 siblings, 1 reply; 3+ messages in thread
From: Mark Brown @ 2018-07-28 14:48 UTC (permalink / raw)
  To: Pierre-Louis Bossart; +Cc: tiwai, liam.r.girdwood, alsa-devel, vkoul


[-- Attachment #1.1: Type: text/plain, Size: 518 bytes --]

On Fri, Jul 27, 2018 at 11:28:05AM -0500, Pierre-Louis Bossart wrote:
> Make this helper inline function available for all platforms. This
> helps solve 0-day compilation issues when CONFIG_SND_DMA_SGBUF is not
> defined.

Please do not submit new versions of already applied patches, please
submit incremental updates to the existing code.  Modifying existing
commits creates problems for other users building on top of those
commits so it's best practice to only change pubished git commits if
absolutely essential.

[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

[-- Attachment #2: Type: text/plain, Size: 0 bytes --]



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

* Re: [PATCH v2] ALSA: memalloc: declare snd_sgbuf_aligned_pages() unconditionally
  2018-07-28 14:48 ` Mark Brown
@ 2018-07-30  6:48   ` Takashi Iwai
  0 siblings, 0 replies; 3+ messages in thread
From: Takashi Iwai @ 2018-07-30  6:48 UTC (permalink / raw)
  To: Mark Brown; +Cc: liam.r.girdwood, vkoul, alsa-devel, Pierre-Louis Bossart

On Sat, 28 Jul 2018 16:48:43 +0200,
Mark Brown wrote:
> 
> On Fri, Jul 27, 2018 at 11:28:05AM -0500, Pierre-Louis Bossart wrote:
> > Make this helper inline function available for all platforms. This
> > helps solve 0-day compilation issues when CONFIG_SND_DMA_SGBUF is not
> > defined.
> 
> Please do not submit new versions of already applied patches, please
> submit incremental updates to the existing code.  Modifying existing
> commits creates problems for other users building on top of those
> commits so it's best practice to only change pubished git commits if
> absolutely essential.

I asked Pierre for resubmission in a couple of days ago since your
usual notification post wasn't sent / received for the v1 post by some
reason...

In anyway, I submitted the incremental fix now.


thanks,

Takashi

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

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

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-07-27 16:28 [PATCH v2] ALSA: memalloc: declare snd_sgbuf_aligned_pages() unconditionally Pierre-Louis Bossart
2018-07-28 14:48 ` Mark Brown
2018-07-30  6:48   ` Takashi Iwai

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.