From: kernel test robot <lkp@intel.com>
To: Jason Ekstrand <jason@jlekstrand.net>, dri-devel@lists.freedesktop.org
Cc: clang-built-linux@googlegroups.com, kbuild-all@lists.01.org,
Jason Ekstrand <jason@jlekstrand.net>
Subject: Re: [PATCH 2/4] dma-buf: add dma_resv_get_singleton_rcu (v4)
Date: Sun, 23 May 2021 02:59:00 +0800 [thread overview]
Message-ID: <202105230237.yH9HBJPO-lkp@intel.com> (raw)
In-Reply-To: <20210520190007.534046-3-jason@jlekstrand.net>
[-- Attachment #1: Type: text/plain, Size: 5247 bytes --]
Hi Jason,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on tegra-drm/drm/tegra/for-next]
[also build test WARNING on linus/master v5.13-rc2 next-20210521]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]
url: https://github.com/0day-ci/linux/commits/Jason-Ekstrand/dma-buf-Add-an-API-for-exporting-sync-files-v8/20210522-201251
base: git://anongit.freedesktop.org/tegra/linux.git drm/tegra/for-next
config: x86_64-randconfig-a013-20210522 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project e84a9b9bb3051c35dea993cdad7b3d2575638f85)
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# install x86_64 cross compiling tool for clang build
# apt-get install binutils-x86-64-linux-gnu
# https://github.com/0day-ci/linux/commit/925221f402201e7b1f665619dda2c5ee6d6324f1
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Jason-Ekstrand/dma-buf-Add-an-API-for-exporting-sync-files-v8/20210522-201251
git checkout 925221f402201e7b1f665619dda2c5ee6d6324f1
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=x86_64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
All warnings (new ones prefixed by >>):
>> drivers/dma-buf/dma-resv.c:550: warning: expecting prototype for dma_resv_get_singleton(). Prototype was for dma_resv_get_singleton_rcu() instead
vim +550 drivers/dma-buf/dma-resv.c
534
535 /**
536 * dma_resv_get_singleton - get a single fence for the dma_resv object
537 * @obj: the reservation object
538 * @extra: extra fence to add to the resulting array
539 * @result: resulting dma_fence
540 *
541 * Get a single fence representing all unsignaled fences in the dma_resv object
542 * plus the given extra fence. If we got only one fence return a new
543 * reference to that, otherwise return a dma_fence_array object.
544 *
545 * RETURNS
546 * Returns -NOMEM if allocations fail, zero otherwise.
547 */
548 int dma_resv_get_singleton_rcu(struct dma_resv *obj, struct dma_fence *extra,
549 struct dma_fence **result)
> 550 {
551 struct dma_fence **resv_fences, *fence, *chain, **fences;
552 struct dma_fence_array *array;
553 unsigned int num_resv_fences, num_fences;
554 unsigned int ret, i, j;
555
556 ret = dma_resv_get_fences_rcu(obj, NULL, &num_resv_fences, &resv_fences);
557 if (ret)
558 return ret;
559
560 num_fences = 0;
561 *result = NULL;
562
563 if (num_resv_fences == 0 && !extra)
564 return 0;
565
566 for (i = 0; i < num_resv_fences; ++i) {
567 dma_fence_deep_dive_for_each(fence, chain, j, resv_fences[i]) {
568 if (dma_fence_is_signaled(fence))
569 continue;
570
571 *result = fence;
572 ++num_fences;
573 }
574 }
575
576 if (extra) {
577 dma_fence_deep_dive_for_each(fence, chain, j, extra) {
578 if (dma_fence_is_signaled(fence))
579 continue;
580
581 *result = fence;
582 ++num_fences;
583 }
584 }
585
586 if (num_fences <= 1) {
587 *result = dma_fence_get(*result);
588 goto put_resv_fences;
589 }
590
591 fences = kmalloc_array(num_fences, sizeof(struct dma_fence*),
592 GFP_KERNEL);
593 if (!fences) {
594 *result = NULL;
595 ret = -ENOMEM;
596 goto put_resv_fences;
597 }
598
599 num_fences = 0;
600 for (i = 0; i < num_resv_fences; ++i) {
601 dma_fence_deep_dive_for_each(fence, chain, j, resv_fences[i]) {
602 if (!dma_fence_is_signaled(fence))
603 fences[num_fences++] = dma_fence_get(fence);
604 }
605 }
606
607 if (extra) {
608 dma_fence_deep_dive_for_each(fence, chain, j, extra) {
609 if (dma_fence_is_signaled(fence))
610 fences[num_fences++] = dma_fence_get(fence);
611 }
612 }
613
614 if (num_fences <= 1) {
615 *result = num_fences ? fences[0] : NULL;
616 kfree(fences);
617 goto put_resv_fences;
618 }
619
620 array = dma_fence_array_create(num_fences, fences,
621 dma_fence_context_alloc(1),
622 1, false);
623 if (array) {
624 *result = &array->base;
625 } else {
626 *result = NULL;
627 while (num_fences--)
628 dma_fence_put(fences[num_fences]);
629 kfree(fences);
630 ret = -ENOMEM;
631 }
632
633 put_resv_fences:
634 while (num_resv_fences--)
635 dma_fence_put(resv_fences[num_resv_fences]);
636 kfree(resv_fences);
637
638 return ret;
639 }
640 EXPORT_SYMBOL_GPL(dma_resv_get_singleton_rcu);
641
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 40297 bytes --]
WARNING: multiple messages have this Message-ID (diff)
From: kernel test robot <lkp@intel.com>
To: kbuild-all@lists.01.org
Subject: Re: [PATCH 2/4] dma-buf: add dma_resv_get_singleton_rcu (v4)
Date: Sun, 23 May 2021 02:59:00 +0800 [thread overview]
Message-ID: <202105230237.yH9HBJPO-lkp@intel.com> (raw)
In-Reply-To: <20210520190007.534046-3-jason@jlekstrand.net>
[-- Attachment #1: Type: text/plain, Size: 5397 bytes --]
Hi Jason,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on tegra-drm/drm/tegra/for-next]
[also build test WARNING on linus/master v5.13-rc2 next-20210521]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]
url: https://github.com/0day-ci/linux/commits/Jason-Ekstrand/dma-buf-Add-an-API-for-exporting-sync-files-v8/20210522-201251
base: git://anongit.freedesktop.org/tegra/linux.git drm/tegra/for-next
config: x86_64-randconfig-a013-20210522 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project e84a9b9bb3051c35dea993cdad7b3d2575638f85)
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# install x86_64 cross compiling tool for clang build
# apt-get install binutils-x86-64-linux-gnu
# https://github.com/0day-ci/linux/commit/925221f402201e7b1f665619dda2c5ee6d6324f1
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Jason-Ekstrand/dma-buf-Add-an-API-for-exporting-sync-files-v8/20210522-201251
git checkout 925221f402201e7b1f665619dda2c5ee6d6324f1
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=x86_64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
All warnings (new ones prefixed by >>):
>> drivers/dma-buf/dma-resv.c:550: warning: expecting prototype for dma_resv_get_singleton(). Prototype was for dma_resv_get_singleton_rcu() instead
vim +550 drivers/dma-buf/dma-resv.c
534
535 /**
536 * dma_resv_get_singleton - get a single fence for the dma_resv object
537 * @obj: the reservation object
538 * @extra: extra fence to add to the resulting array
539 * @result: resulting dma_fence
540 *
541 * Get a single fence representing all unsignaled fences in the dma_resv object
542 * plus the given extra fence. If we got only one fence return a new
543 * reference to that, otherwise return a dma_fence_array object.
544 *
545 * RETURNS
546 * Returns -NOMEM if allocations fail, zero otherwise.
547 */
548 int dma_resv_get_singleton_rcu(struct dma_resv *obj, struct dma_fence *extra,
549 struct dma_fence **result)
> 550 {
551 struct dma_fence **resv_fences, *fence, *chain, **fences;
552 struct dma_fence_array *array;
553 unsigned int num_resv_fences, num_fences;
554 unsigned int ret, i, j;
555
556 ret = dma_resv_get_fences_rcu(obj, NULL, &num_resv_fences, &resv_fences);
557 if (ret)
558 return ret;
559
560 num_fences = 0;
561 *result = NULL;
562
563 if (num_resv_fences == 0 && !extra)
564 return 0;
565
566 for (i = 0; i < num_resv_fences; ++i) {
567 dma_fence_deep_dive_for_each(fence, chain, j, resv_fences[i]) {
568 if (dma_fence_is_signaled(fence))
569 continue;
570
571 *result = fence;
572 ++num_fences;
573 }
574 }
575
576 if (extra) {
577 dma_fence_deep_dive_for_each(fence, chain, j, extra) {
578 if (dma_fence_is_signaled(fence))
579 continue;
580
581 *result = fence;
582 ++num_fences;
583 }
584 }
585
586 if (num_fences <= 1) {
587 *result = dma_fence_get(*result);
588 goto put_resv_fences;
589 }
590
591 fences = kmalloc_array(num_fences, sizeof(struct dma_fence*),
592 GFP_KERNEL);
593 if (!fences) {
594 *result = NULL;
595 ret = -ENOMEM;
596 goto put_resv_fences;
597 }
598
599 num_fences = 0;
600 for (i = 0; i < num_resv_fences; ++i) {
601 dma_fence_deep_dive_for_each(fence, chain, j, resv_fences[i]) {
602 if (!dma_fence_is_signaled(fence))
603 fences[num_fences++] = dma_fence_get(fence);
604 }
605 }
606
607 if (extra) {
608 dma_fence_deep_dive_for_each(fence, chain, j, extra) {
609 if (dma_fence_is_signaled(fence))
610 fences[num_fences++] = dma_fence_get(fence);
611 }
612 }
613
614 if (num_fences <= 1) {
615 *result = num_fences ? fences[0] : NULL;
616 kfree(fences);
617 goto put_resv_fences;
618 }
619
620 array = dma_fence_array_create(num_fences, fences,
621 dma_fence_context_alloc(1),
622 1, false);
623 if (array) {
624 *result = &array->base;
625 } else {
626 *result = NULL;
627 while (num_fences--)
628 dma_fence_put(fences[num_fences]);
629 kfree(fences);
630 ret = -ENOMEM;
631 }
632
633 put_resv_fences:
634 while (num_resv_fences--)
635 dma_fence_put(resv_fences[num_resv_fences]);
636 kfree(resv_fences);
637
638 return ret;
639 }
640 EXPORT_SYMBOL_GPL(dma_resv_get_singleton_rcu);
641
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org
[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 40297 bytes --]
next prev parent reply other threads:[~2021-05-22 18:59 UTC|newest]
Thread overview: 39+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-05-20 19:00 [PATCH 0/4] dma-buf: Add an API for exporting sync files (v8) Jason Ekstrand
2021-05-20 19:00 ` [PATCH 1/4] dma-buf: add dma_fence_array_for_each (v2) Jason Ekstrand
2021-05-21 7:51 ` Christian König
2021-05-21 16:27 ` Jason Ekstrand
2021-05-21 18:11 ` Christian König
2021-05-20 19:00 ` [PATCH 2/4] dma-buf: add dma_resv_get_singleton_rcu (v4) Jason Ekstrand
2021-05-21 17:48 ` Daniel Vetter
2021-05-24 20:04 ` Jason Ekstrand
2021-05-25 12:38 ` Daniel Vetter
2021-05-25 15:50 ` Christian König
2021-05-22 14:38 ` kernel test robot
2021-05-22 14:38 ` kernel test robot
2021-05-22 18:59 ` kernel test robot [this message]
2021-05-22 18:59 ` kernel test robot
2021-05-20 19:00 ` [PATCH 3/4] dma-buf: Add an API for exporting sync files (v9) Jason Ekstrand
2021-05-20 19:00 ` [PATCH 4/4] RFC: dma-buf: Add an API for importing sync files (v6) Jason Ekstrand
2021-05-22 20:05 ` Daniel Stone
2021-05-23 17:15 ` EPOLL for drm_syncfile (was Re: [PATCH 4/4] RFC: dma-buf: Add an API for importing sync files (v6)) Christian König
2021-05-23 21:34 ` Daniel Stone
2021-05-25 5:55 ` Daniel Vetter
2021-05-26 9:45 ` Simon Ser
2021-05-24 17:11 ` [PATCH 4/4] RFC: dma-buf: Add an API for importing sync files (v6) Jason Ekstrand
2021-05-25 6:27 ` Daniel Vetter
2021-05-26 11:08 ` Daniel Stone
2021-05-26 12:35 ` Daniel Vetter
2021-05-26 13:08 ` Daniel Stone
2021-05-26 13:44 ` Daniel Vetter
2021-05-26 15:13 ` Daniel Stone
2021-05-26 16:52 ` Daniel Vetter
2021-05-26 18:01 ` Daniel Stone
2021-05-27 7:21 ` Christian König
2021-05-26 13:52 ` Daniel Stone
2021-05-26 15:24 ` Jason Ekstrand
2021-05-26 18:14 ` Daniel Stone
2021-05-27 4:32 ` Jason Ekstrand
2021-05-27 10:19 ` Daniel Vetter
2021-05-27 10:39 ` Christian König
2021-05-26 12:21 ` Vlad Zahorodnii
2021-05-21 21:32 ` [PATCH 0/4] dma-buf: Add an API for exporting sync files (v8) Jason Ekstrand
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=202105230237.yH9HBJPO-lkp@intel.com \
--to=lkp@intel.com \
--cc=clang-built-linux@googlegroups.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=jason@jlekstrand.net \
--cc=kbuild-all@lists.01.org \
/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 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.