This is a note to let you know that I've just added the patch titled ALSA: pcm: Fix build error on m68k and others to the 5.4-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: alsa-pcm-fix-build-error-on-m68k-and-others.patch and it can be found in the queue-5.4 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let <stable@xxxxxxxxxxxxxxx> know about it. >From 467fd0e82b6265b8e6cc078a70bd7592574d5c83 Mon Sep 17 00:00:00 2001 From: Takashi Iwai <tiwai@xxxxxxx> Date: Tue, 7 Jul 2020 13:12:25 +0200 Subject: ALSA: pcm: Fix build error on m68k and others From: Takashi Iwai <tiwai@xxxxxxx> commit 467fd0e82b6265b8e6cc078a70bd7592574d5c83 upstream. The commit 3ad796cbc36a ("ALSA: pcm: Use SG-buffer only when direct DMA is available") introduced a check of the DMA type and this caused a build error on m68k (and possibly some others) due to the lack of dma_is_direct() definition. Since the check is needed only for CONFIG_SND_DMA_SGBUF enablement (i.e. solely x86), use #ifdef instead of IS_ENABLED() for avoiding such a build error. Fixes: 3ad796cbc36a ("ALSA: pcm: Use SG-buffer only when direct DMA is available") Reported-by: kernel test robot <lkp@xxxxxxxxx> Link: https://lore.kernel.org/r/20200707111225.26826-1-tiwai@xxxxxxx Signed-off-by: Takashi Iwai <tiwai@xxxxxxx> Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> --- sound/core/pcm_memory.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) --- a/sound/core/pcm_memory.c +++ b/sound/core/pcm_memory.c @@ -66,8 +66,9 @@ static int do_alloc_pages(struct snd_car __update_allocated_size(card, size); mutex_unlock(&card->memory_mutex); - if (IS_ENABLED(CONFIG_SND_DMA_SGBUF) && - (type == SNDRV_DMA_TYPE_DEV_SG || type == SNDRV_DMA_TYPE_DEV_UC_SG) && + +#ifdef CONFIG_SND_DMA_SGBUF + if ((type == SNDRV_DMA_TYPE_DEV_SG || type == SNDRV_DMA_TYPE_DEV_UC_SG) && !dma_is_direct(get_dma_ops(dev))) { /* mutate to continuous page allocation */ dev_dbg(dev, "Use continuous page allocator\n"); @@ -76,6 +77,7 @@ static int do_alloc_pages(struct snd_car else type = SNDRV_DMA_TYPE_DEV_UC; } +#endif /* CONFIG_SND_DMA_SGBUF */ err = snd_dma_alloc_pages(type, dev, size, dmab); if (!err) { Patches currently in stable-queue which might be from tiwai@xxxxxxx are queue-5.4/alsa-pcm-use-sg-buffer-only-when-direct-dma-is-avail.patch queue-5.4/alsa-pcm-fix-potential-data-race-at-pcm-memory-alloc.patch queue-5.4/revert-alsa-pcm-use-sg-buffer-only-when-direct-dma-is-available.patch queue-5.4/alsa-usb-audio-add-support-for-mythware-xa001au-capture-and-playback-interfaces.patch queue-5.4/alsa-emu10k1-roll-up-loops-in-dsp-setup-code-for-aud.patch queue-5.4/alsa-pcm-check-for-null-pointer-of-pointer-substream-before-dereferencing-it.patch queue-5.4/alsa-hda-fix-a-possible-null-pointer-dereference-due.patch queue-5.4/alsa-pcm-fix-build-error-on-m68k-and-others.patch queue-5.4/alsa-pcm-set-per-card-upper-limit-of-pcm-buffer-allo.patch queue-5.4/alsa-hda-fix-unhandled-register-update-during-auto-s.patch queue-5.4/alsa-hda-realtek-add-quirks-for-unis-h3c-desktop-b76.patch