From: kbuild test robot <lkp@intel.com>
To: Takashi Iwai <tiwai@suse.de>
Cc: alsa-devel@alsa-project.org, kbuild-all@lists.01.org
Subject: Re: [alsa-devel] [PATCH 5/8] ALSA: pcm: Move PCM_RUNTIME_CHECK() macro into local header
Date: Sun, 17 Nov 2019 18:28:49 +0800 [thread overview]
Message-ID: <201911171818.hyLJKxvT%lkp@intel.com> (raw)
In-Reply-To: <20191117085308.23915-6-tiwai@suse.de>
[-- Attachment #1: Type: text/plain, Size: 6559 bytes --]
Hi Takashi,
I love your patch! Yet something to improve:
[auto build test ERROR on sound/for-next]
[also build test ERROR on next-20191115]
[cannot apply to v5.4-rc7]
[if your patch is applied to the wrong git tree, please drop us a note to help
improve the system. BTW, we also suggest to use '--base' option to specify the
base tree in git format-patch, please see https://stackoverflow.com/a/37406982]
url: https://github.com/0day-ci/linux/commits/Takashi-Iwai/ALSA-pcm-API-cleanups-and-extensions/20191117-170136
base: https://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound.git for-next
config: arc-randconfig-a0031-20191117 (attached as .config)
compiler: arc-elf-gcc (GCC) 7.4.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# save the attached .config to linux build tree
GCC_VERSION=7.4.0 make.cross ARCH=arc
If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp@intel.com>
All error/warnings (new ones prefixed by >>):
In file included from include/linux/init.h:5:0,
from include/linux/io.h:10,
from sound/core/pcm_memory.c:7:
sound/core/pcm_memory.c: In function 'snd_pcm_lib_malloc_pages':
>> sound/core/pcm_memory.c:351:6: error: implicit declaration of function 'PCM_RUNTIME_CHECK' [-Werror=implicit-function-declaration]
if (PCM_RUNTIME_CHECK(substream))
^
include/linux/compiler.h:58:52: note: in definition of macro '__trace_if_var'
#define __trace_if_var(cond) (__builtin_constant_p(cond) ? (cond) : __trace_if_value(cond))
^~~~
>> sound/core/pcm_memory.c:351:2: note: in expansion of macro 'if'
if (PCM_RUNTIME_CHECK(substream))
^~
cc1: some warnings being treated as errors
vim +/PCM_RUNTIME_CHECK +351 sound/core/pcm_memory.c
51e9f2e665bf2b Takashi Iwai 2008-07-30 334
^1da177e4c3f41 Linus Torvalds 2005-04-16 335 /**
^1da177e4c3f41 Linus Torvalds 2005-04-16 336 * snd_pcm_lib_malloc_pages - allocate the DMA buffer
^1da177e4c3f41 Linus Torvalds 2005-04-16 337 * @substream: the substream to allocate the DMA buffer to
^1da177e4c3f41 Linus Torvalds 2005-04-16 338 * @size: the requested buffer size in bytes
^1da177e4c3f41 Linus Torvalds 2005-04-16 339 *
^1da177e4c3f41 Linus Torvalds 2005-04-16 340 * Allocates the DMA buffer on the BUS type given earlier to
^1da177e4c3f41 Linus Torvalds 2005-04-16 341 * snd_pcm_lib_preallocate_xxx_pages().
^1da177e4c3f41 Linus Torvalds 2005-04-16 342 *
eb7c06e8e9c93b Yacine Belkadi 2013-03-11 343 * Return: 1 if the buffer is changed, 0 if not changed, or a negative
^1da177e4c3f41 Linus Torvalds 2005-04-16 344 * code on failure.
^1da177e4c3f41 Linus Torvalds 2005-04-16 345 */
877211f5e1b119 Takashi Iwai 2005-11-17 346 int snd_pcm_lib_malloc_pages(struct snd_pcm_substream *substream, size_t size)
^1da177e4c3f41 Linus Torvalds 2005-04-16 347 {
877211f5e1b119 Takashi Iwai 2005-11-17 348 struct snd_pcm_runtime *runtime;
^1da177e4c3f41 Linus Torvalds 2005-04-16 349 struct snd_dma_buffer *dmab = NULL;
^1da177e4c3f41 Linus Torvalds 2005-04-16 350
7eaa943c8ed8e9 Takashi Iwai 2008-08-08 @351 if (PCM_RUNTIME_CHECK(substream))
7eaa943c8ed8e9 Takashi Iwai 2008-08-08 352 return -EINVAL;
7eaa943c8ed8e9 Takashi Iwai 2008-08-08 353 if (snd_BUG_ON(substream->dma_buffer.dev.type ==
7eaa943c8ed8e9 Takashi Iwai 2008-08-08 354 SNDRV_DMA_TYPE_UNKNOWN))
7eaa943c8ed8e9 Takashi Iwai 2008-08-08 355 return -EINVAL;
^1da177e4c3f41 Linus Torvalds 2005-04-16 356 runtime = substream->runtime;
^1da177e4c3f41 Linus Torvalds 2005-04-16 357
^1da177e4c3f41 Linus Torvalds 2005-04-16 358 if (runtime->dma_buffer_p) {
^1da177e4c3f41 Linus Torvalds 2005-04-16 359 /* perphaps, we might free the large DMA memory region
^1da177e4c3f41 Linus Torvalds 2005-04-16 360 to save some space here, but the actual solution
^1da177e4c3f41 Linus Torvalds 2005-04-16 361 costs us less time */
^1da177e4c3f41 Linus Torvalds 2005-04-16 362 if (runtime->dma_buffer_p->bytes >= size) {
^1da177e4c3f41 Linus Torvalds 2005-04-16 363 runtime->dma_bytes = size;
^1da177e4c3f41 Linus Torvalds 2005-04-16 364 return 0; /* ok, do not change */
^1da177e4c3f41 Linus Torvalds 2005-04-16 365 }
^1da177e4c3f41 Linus Torvalds 2005-04-16 366 snd_pcm_lib_free_pages(substream);
^1da177e4c3f41 Linus Torvalds 2005-04-16 367 }
877211f5e1b119 Takashi Iwai 2005-11-17 368 if (substream->dma_buffer.area != NULL &&
877211f5e1b119 Takashi Iwai 2005-11-17 369 substream->dma_buffer.bytes >= size) {
^1da177e4c3f41 Linus Torvalds 2005-04-16 370 dmab = &substream->dma_buffer; /* use the pre-allocated buffer */
^1da177e4c3f41 Linus Torvalds 2005-04-16 371 } else {
ca2c0966562cfb Takashi Iwai 2005-09-09 372 dmab = kzalloc(sizeof(*dmab), GFP_KERNEL);
^1da177e4c3f41 Linus Torvalds 2005-04-16 373 if (! dmab)
^1da177e4c3f41 Linus Torvalds 2005-04-16 374 return -ENOMEM;
^1da177e4c3f41 Linus Torvalds 2005-04-16 375 dmab->dev = substream->dma_buffer.dev;
^1da177e4c3f41 Linus Torvalds 2005-04-16 376 if (snd_dma_alloc_pages(substream->dma_buffer.dev.type,
^1da177e4c3f41 Linus Torvalds 2005-04-16 377 substream->dma_buffer.dev.dev,
^1da177e4c3f41 Linus Torvalds 2005-04-16 378 size, dmab) < 0) {
^1da177e4c3f41 Linus Torvalds 2005-04-16 379 kfree(dmab);
^1da177e4c3f41 Linus Torvalds 2005-04-16 380 return -ENOMEM;
^1da177e4c3f41 Linus Torvalds 2005-04-16 381 }
^1da177e4c3f41 Linus Torvalds 2005-04-16 382 }
^1da177e4c3f41 Linus Torvalds 2005-04-16 383 snd_pcm_set_runtime_buffer(substream, dmab);
^1da177e4c3f41 Linus Torvalds 2005-04-16 384 runtime->dma_bytes = size;
^1da177e4c3f41 Linus Torvalds 2005-04-16 385 return 1; /* area was changed */
^1da177e4c3f41 Linus Torvalds 2005-04-16 386 }
e88e8ae639a490 Takashi Iwai 2006-04-28 387 EXPORT_SYMBOL(snd_pcm_lib_malloc_pages);
e88e8ae639a490 Takashi Iwai 2006-04-28 388
:::::: The code at line 351 was first introduced by commit
:::::: 7eaa943c8ed8e91e05d0f5d0dc7a18e3319b45cf ALSA: Kill snd_assert() in sound/core/*
:::::: TO: Takashi Iwai <tiwai@suse.de>
:::::: CC: Jaroslav Kysela <perex@perex.cz>
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org Intel Corporation
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 27868 bytes --]
[-- Attachment #3: Type: text/plain, Size: 161 bytes --]
_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
https://mailman.alsa-project.org/mailman/listinfo/alsa-devel
next prev parent reply other threads:[~2019-11-17 10:30 UTC|newest]
Thread overview: 38+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-11-17 8:53 [alsa-devel] [PATCH 0/8] ALSA: pcm: API cleanups and extensions Takashi Iwai
2019-11-17 8:53 ` [alsa-devel] [PATCH 1/8] ALSA: pcm: Introduce managed buffer allocation mode Takashi Iwai
2019-11-18 16:24 ` Pierre-Louis Bossart
2019-11-18 18:46 ` Takashi Iwai
2019-11-17 8:53 ` [alsa-devel] [PATCH 2/8] ALSA: docs: Update for " Takashi Iwai
2019-11-17 8:53 ` [alsa-devel] [PATCH 3/8] ALSA: pcm: Allow NULL ioctl ops Takashi Iwai
2019-11-17 8:53 ` [alsa-devel] [PATCH 4/8] ALSA: docs: Update document about the default PCM " Takashi Iwai
2019-11-17 8:53 ` [alsa-devel] [PATCH 5/8] ALSA: pcm: Move PCM_RUNTIME_CHECK() macro into local header Takashi Iwai
2019-11-17 9:42 ` kbuild test robot
2019-11-17 10:05 ` Takashi Iwai
2019-11-17 10:28 ` kbuild test robot [this message]
2019-11-17 8:53 ` [alsa-devel] [PATCH 6/8] ALSA: pcm: Add the support for sync-stop operation Takashi Iwai
2019-11-18 16:33 ` Pierre-Louis Bossart
2019-11-18 18:47 ` Takashi Iwai
2019-11-17 8:53 ` [alsa-devel] [PATCH 7/8] ALSA: pcm: Add card sync_irq field Takashi Iwai
2019-11-18 16:38 ` Pierre-Louis Bossart
2019-11-18 18:52 ` Takashi Iwai
2019-11-18 19:20 ` Sridharan, Ranjani
2019-11-18 19:49 ` Takashi Iwai
2019-11-18 19:55 ` Sridharan, Ranjani
2019-11-18 20:40 ` Takashi Iwai
2019-11-18 23:47 ` Ranjani Sridharan
2019-11-19 6:44 ` Takashi Iwai
2019-11-19 7:40 ` Ranjani Sridharan
2019-11-19 8:24 ` Takashi Iwai
2019-11-19 9:39 ` Takashi Iwai
2019-11-19 16:36 ` Ranjani Sridharan
2019-11-19 21:27 ` Takashi Iwai
2019-11-19 21:43 ` Sridharan, Ranjani
2019-11-21 19:22 ` Sridharan, Ranjani
2019-11-21 20:34 ` Takashi Iwai
2019-11-21 20:46 ` Sridharan, Ranjani
2019-11-21 21:13 ` Takashi Iwai
2019-11-21 21:17 ` Sridharan, Ranjani
2019-11-21 21:28 ` Takashi Iwai
2019-11-21 21:45 ` Sridharan, Ranjani
2019-11-22 4:08 ` Jie, Yang
2019-11-17 8:53 ` [alsa-devel] [PATCH 8/8] ALSA: docs: Update about the new PCM sync_stop ops Takashi Iwai
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=201911171818.hyLJKxvT%lkp@intel.com \
--to=lkp@intel.com \
--cc=alsa-devel@alsa-project.org \
--cc=kbuild-all@lists.01.org \
--cc=tiwai@suse.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).