All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: "Christian König" <ckoenig.leichtzumerken@gmail.com>,
	sumit.semwal@linaro.org, gustavo@padovan.org,
	linux-media@vger.kernel.org, dri-devel@lists.freedesktop.org,
	linaro-mm-sig@lists.linaro.org
Cc: kbuild-all@lists.01.org, "Christian König" <christian.koenig@amd.com>
Subject: Re: [PATCH 2/2] dma-buf/sync-file: fix warning about fence containers
Date: Sat, 12 Mar 2022 02:51:51 +0800	[thread overview]
Message-ID: <202203120217.BFa438j9-lkp@intel.com> (raw)
In-Reply-To: <20220311110244.1245-2-christian.koenig@amd.com>

Hi "Christian,

I love your patch! Yet something to improve:

[auto build test ERROR on linus/master]
[also build test ERROR on v5.17-rc7 next-20220310]
[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/Christian-K-nig/dma-buf-add-dma_fence_unwrap/20220311-190352
base:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 79b00034e9dcd2b065c1665c8b42f62b6b80a9be
config: x86_64-randconfig-m001 (https://download.01.org/0day-ci/archive/20220312/202203120217.BFa438j9-lkp@intel.com/config)
compiler: gcc-9 (Ubuntu 9.4.0-1ubuntu1~20.04) 9.4.0
reproduce (this is a W=1 build):
        # https://github.com/0day-ci/linux/commit/ca3584ac05c4a450e69b1c6bcb0672b5ab026c7c
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Christian-K-nig/dma-buf-add-dma_fence_unwrap/20220311-190352
        git checkout ca3584ac05c4a450e69b1c6bcb0672b5ab026c7c
        # save the config file to linux build tree
        mkdir build_dir
        make W=1 O=build_dir ARCH=x86_64 SHELL=/bin/bash

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>

All errors (new ones prefixed by >>):

   In file included from drivers/dma-buf/sync_file.c:8:
   include/linux/dma-fence-unwrap.h: In function 'dma_fence_unwrap_array':
>> include/linux/dma-fence-unwrap.h:44:18: error: implicit declaration of function 'dma_fence_chain_contained'; did you mean 'dma_fence_chain_init'? [-Werror=implicit-function-declaration]
      44 |  cursor->array = dma_fence_chain_contained(cursor->chain);
         |                  ^~~~~~~~~~~~~~~~~~~~~~~~~
         |                  dma_fence_chain_init
   include/linux/dma-fence-unwrap.h:44:16: warning: assignment to 'struct dma_fence *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
      44 |  cursor->array = dma_fence_chain_contained(cursor->chain);
         |                ^
>> include/linux/dma-fence-unwrap.h:46:9: error: implicit declaration of function 'dma_fence_array_first'; did you mean 'dma_fence_array_create'? [-Werror=implicit-function-declaration]
      46 |  return dma_fence_array_first(cursor->array);
         |         ^~~~~~~~~~~~~~~~~~~~~
         |         dma_fence_array_create
   include/linux/dma-fence-unwrap.h:46:9: warning: returning 'int' from a function with return type 'struct dma_fence *' makes pointer from integer without a cast [-Wint-conversion]
      46 |  return dma_fence_array_first(cursor->array);
         |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/dma-fence-unwrap.h: In function 'dma_fence_unwrap_next':
>> include/linux/dma-fence-unwrap.h:77:8: error: implicit declaration of function 'dma_fence_array_next'; did you mean 'dma_fence_unwrap_next'? [-Werror=implicit-function-declaration]
      77 |  tmp = dma_fence_array_next(cursor->array, cursor->index);
         |        ^~~~~~~~~~~~~~~~~~~~
         |        dma_fence_unwrap_next
   include/linux/dma-fence-unwrap.h:77:6: warning: assignment to 'struct dma_fence *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
      77 |  tmp = dma_fence_array_next(cursor->array, cursor->index);
         |      ^
   cc1: some warnings being treated as errors


vim +44 include/linux/dma-fence-unwrap.h

088aa14c0f5cad Christian König 2022-03-11  33  
088aa14c0f5cad Christian König 2022-03-11  34  /**
088aa14c0f5cad Christian König 2022-03-11  35   * dma_fence_unwrap_array - helper to unwrap dma_fence_arrays
088aa14c0f5cad Christian König 2022-03-11  36   * @cursor: cursor to initialize
088aa14c0f5cad Christian König 2022-03-11  37   *
088aa14c0f5cad Christian König 2022-03-11  38   * Helper function to unwrap dma_fence_array containers, don't touch directly.
088aa14c0f5cad Christian König 2022-03-11  39   * Use dma_fence_unwrap_first/next instead.
088aa14c0f5cad Christian König 2022-03-11  40   */
088aa14c0f5cad Christian König 2022-03-11  41  static inline struct dma_fence *
088aa14c0f5cad Christian König 2022-03-11  42  dma_fence_unwrap_array(struct dma_fence_unwrap * cursor)
088aa14c0f5cad Christian König 2022-03-11  43  {
088aa14c0f5cad Christian König 2022-03-11 @44  	cursor->array = dma_fence_chain_contained(cursor->chain);
088aa14c0f5cad Christian König 2022-03-11  45  	cursor->index = 0;
088aa14c0f5cad Christian König 2022-03-11 @46  	return dma_fence_array_first(cursor->array);
088aa14c0f5cad Christian König 2022-03-11  47  }
088aa14c0f5cad Christian König 2022-03-11  48  
088aa14c0f5cad Christian König 2022-03-11  49  /**
088aa14c0f5cad Christian König 2022-03-11  50   * dma_fence_unwrap_first - return the first fence from fence containers
088aa14c0f5cad Christian König 2022-03-11  51   * @head: the entrypoint into the containers
088aa14c0f5cad Christian König 2022-03-11  52   * @cursor: current position inside the containers
088aa14c0f5cad Christian König 2022-03-11  53   *
088aa14c0f5cad Christian König 2022-03-11  54   * Unwraps potential dma_fence_chain/dma_fence_array containers and return the
088aa14c0f5cad Christian König 2022-03-11  55   * first fence.
088aa14c0f5cad Christian König 2022-03-11  56   */
088aa14c0f5cad Christian König 2022-03-11  57  static inline struct dma_fence *
088aa14c0f5cad Christian König 2022-03-11  58  dma_fence_unwrap_first(struct dma_fence *head, struct dma_fence_unwrap *cursor)
088aa14c0f5cad Christian König 2022-03-11  59  {
088aa14c0f5cad Christian König 2022-03-11  60  	cursor->chain = dma_fence_get(head);
088aa14c0f5cad Christian König 2022-03-11  61  	return dma_fence_unwrap_array(cursor);
088aa14c0f5cad Christian König 2022-03-11  62  }
088aa14c0f5cad Christian König 2022-03-11  63  
088aa14c0f5cad Christian König 2022-03-11  64  /**
088aa14c0f5cad Christian König 2022-03-11  65   * dma_fence_unwrap_next - return the next fence from a fence containers
088aa14c0f5cad Christian König 2022-03-11  66   * @cursor: current position inside the containers
088aa14c0f5cad Christian König 2022-03-11  67   *
088aa14c0f5cad Christian König 2022-03-11  68   * Continue unwrapping the dma_fence_chain/dma_fence_array containers and return
088aa14c0f5cad Christian König 2022-03-11  69   * the next fence from them.
088aa14c0f5cad Christian König 2022-03-11  70   */
088aa14c0f5cad Christian König 2022-03-11  71  static inline struct dma_fence *
088aa14c0f5cad Christian König 2022-03-11  72  dma_fence_unwrap_next(struct dma_fence_unwrap *cursor)
088aa14c0f5cad Christian König 2022-03-11  73  {
088aa14c0f5cad Christian König 2022-03-11  74  	struct dma_fence *tmp;
088aa14c0f5cad Christian König 2022-03-11  75  
088aa14c0f5cad Christian König 2022-03-11  76  	++cursor->index;
088aa14c0f5cad Christian König 2022-03-11 @77  	tmp = dma_fence_array_next(cursor->array, cursor->index);
088aa14c0f5cad Christian König 2022-03-11  78  	if (tmp)
088aa14c0f5cad Christian König 2022-03-11  79  		return tmp;
088aa14c0f5cad Christian König 2022-03-11  80  
088aa14c0f5cad Christian König 2022-03-11  81  	cursor->chain = dma_fence_chain_walk(cursor->chain);
088aa14c0f5cad Christian König 2022-03-11  82  	return dma_fence_unwrap_array(cursor);
088aa14c0f5cad Christian König 2022-03-11  83  }
088aa14c0f5cad Christian König 2022-03-11  84  

---
0-DAY CI Kernel Test Service
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

  parent reply	other threads:[~2022-03-11 18:52 UTC|newest]

Thread overview: 40+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-11 11:02 [PATCH 1/2] dma-buf: add dma_fence_unwrap Christian König
2022-03-11 11:02 ` [PATCH 2/2] dma-buf/sync-file: fix warning about fence containers Christian König
2022-03-11 16:16   ` kernel test robot
2022-03-11 17:59   ` kernel test robot
2022-03-11 18:51   ` kernel test robot [this message]
2022-03-25 10:13   ` Daniel Vetter
2022-03-25 10:13     ` Daniel Vetter
2022-03-25 10:35     ` Christian König
2022-03-25 10:35       ` Christian König
2022-03-25 19:28       ` Daniel Vetter
2022-03-25 19:28         ` Daniel Vetter
2022-03-11 15:45 ` [PATCH 1/2] dma-buf: add dma_fence_unwrap kernel test robot
2022-03-11 17:28 ` kernel test robot
2022-03-14 11:14 ` Christian König
2022-03-21 10:31   ` Christian König
2022-03-25  7:42     ` Christian König
2022-03-25 10:03 ` Daniel Vetter
2022-03-25 10:03   ` Daniel Vetter
2022-03-25 10:07   ` Daniel Vetter
2022-03-25 10:07     ` Daniel Vetter
2022-03-25 10:10     ` Christian König
2022-03-25 10:10       ` Christian König
2022-03-25 10:17       ` Daniel Vetter
2022-03-25 10:17         ` Daniel Vetter
2022-03-25 12:56         ` Christian König
2022-03-25 12:56           ` Christian König
2022-03-25 16:00           ` Daniel Vetter
2022-03-25 16:00             ` Daniel Vetter
2022-03-25 15:25 ` Ville Syrjälä
2022-03-25 15:25   ` Ville Syrjälä
2022-03-25 15:28   ` Christian König
2022-03-25 15:28     ` Christian König
2022-03-28 10:28     ` Christian König
2022-03-28 10:28       ` Christian König
2022-03-28 14:22       ` Daniel Vetter
2022-03-28 14:22         ` Daniel Vetter
2022-03-28 14:26         ` Christian König
2022-03-28 14:26           ` Christian König
2022-03-28 14:28           ` Daniel Vetter
2022-03-28 14:28             ` Daniel Vetter

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=202203120217.BFa438j9-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=christian.koenig@amd.com \
    --cc=ckoenig.leichtzumerken@gmail.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=gustavo@padovan.org \
    --cc=kbuild-all@lists.01.org \
    --cc=linaro-mm-sig@lists.linaro.org \
    --cc=linux-media@vger.kernel.org \
    --cc=sumit.semwal@linaro.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.