From: Takashi Iwai Subject: Re: [PATCH] ALSA: memalloc: declare snd_sgbuf_aligned_pages() unconditionally Date: Thu, 26 Jul 2018 08:28:41 +0200 Message-ID: References: <20180725201556.21136-1-pierre-louis.bossart@linux.intel.com> Mime-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mx1.suse.de (mx2.suse.de [195.135.220.15]) by alsa0.perex.cz (Postfix) with ESMTP id 0882E26775C for ; Thu, 26 Jul 2018 08:28:43 +0200 (CEST) In-Reply-To: <20180725201556.21136-1-pierre-louis.bossart@linux.intel.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org To: Pierre-Louis Bossart Cc: liam.r.girdwood@linux.intel.com, alsa-devel@alsa-project.org, broonie@kernel.org, vkoul@kernel.org List-Id: alsa-devel@alsa-project.org On Wed, 25 Jul 2018 22:15:56 +0200, 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. > > Reported-by: kbuild test robot > Signed-off-by: Pierre-Louis Bossart Currently it's triggered only by the new Intel patches, so no urgent material. I can put this to for-next branch, or to another immutable branch, so that Mark can pull in. Or, it's fine that Mark applies to his tree together with other Intel patches, too. Mark, what's your preference? In the last case, feel free to take my ack: Reviewed-by: Takashi Iwai thanks, Takashi > --- > 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 >