[radeon-alex:amd-19.50 2071/2687] include/kcl/kcl_list.h:6:20: error: redefinition of 'list_bulk_move_tail'

kbuild test robot lkp at intel.com
Sat Jan 11 20:29:27 UTC 2020


Hi Prike,

FYI, the error/warning still remains.

tree:   git://people.freedesktop.org/~agd5f/linux.git amd-19.50
head:   02692309efa6ad48d47894e40fcb3832ace49c4c
commit: 034972ea50d821bd2596276c956b39f0ed9ca2dd [2071/2687] drm/amdkcl: Test whether list_bulk_move_tail() is available
config: i386-allyesconfig (attached as .config)
compiler: gcc-7 (Debian 7.5.0-3) 7.5.0
reproduce:
        git checkout 034972ea50d821bd2596276c956b39f0ed9ca2dd
        # save the attached .config to linux build tree
        make ARCH=i386 

If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp at intel.com>

All errors (new ones prefixed by >>):

                    from drivers/gpu/drm/ttm/backport/backport.h:6,
                    from <command-line>:0:
   include/drm/drm_drv.h:739:6: note: previous declaration of 'drm_dev_put' was here
    void drm_dev_put(struct drm_device *dev);
         ^~~~~~~~~~~
   In file included from drivers/gpu/drm/ttm/backport/backport.h:6:0,
                    from <command-line>:0:
   include/kcl/kcl_drm.h: In function 'drm_dev_put':
   include/kcl/kcl_drm.h:539:9: error: implicit declaration of function 'drm_dev_unref'; did you mean 'drm_dev_enter'? [-Werror=implicit-function-declaration]
     return drm_dev_unref(dev);
            ^~~~~~~~~~~~~
            drm_dev_enter
   include/kcl/kcl_drm.h:539:9: warning: 'return' with a value, in function returning void
     return drm_dev_unref(dev);
            ^~~~~~~~~~~~~~~~~~
   include/kcl/kcl_drm.h:537:20: note: declared here
    static inline void drm_dev_put(struct drm_device *dev)
                       ^~~~~~~~~~~
   In file included from drivers/gpu/drm/ttm/backport/backport.h:8:0,
                    from <command-line>:0:
   include/kcl/kcl_mm.h: At top level:
   include/kcl/kcl_mm.h:65:21: error: redefinition of 'kvmalloc'
    static inline void *kvmalloc(size_t size, gfp_t flags)
                        ^~~~~~~~
   In file included from include/drm/drm_vma_manager.h:27:0,
                    from include/kcl/kcl_drm_vma_manager.h:8,
                    from drivers/gpu/drm/ttm/backport/backport.h:5,
                    from <command-line>:0:
   include/linux/mm.h:635:21: note: previous definition of 'kvmalloc' was here
    static inline void *kvmalloc(size_t size, gfp_t flags)
                        ^~~~~~~~
   In file included from drivers/gpu/drm/ttm/backport/backport.h:8:0,
                    from <command-line>:0:
   include/kcl/kcl_mm.h:75:21: error: redefinition of 'kvzalloc'
    static inline void *kvzalloc(size_t size, gfp_t flags)
                        ^~~~~~~~
   In file included from include/drm/drm_vma_manager.h:27:0,
                    from include/kcl/kcl_drm_vma_manager.h:8,
                    from drivers/gpu/drm/ttm/backport/backport.h:5,
                    from <command-line>:0:
   include/linux/mm.h:643:21: note: previous definition of 'kvzalloc' was here
    static inline void *kvzalloc(size_t size, gfp_t flags)
                        ^~~~~~~~
   In file included from drivers/gpu/drm/ttm/backport/backport.h:8:0,
                    from <command-line>:0:
   include/kcl/kcl_mm.h:85:20: error: static declaration of 'kvfree' follows non-static declaration
    static inline void kvfree(const void *addr)
                       ^~~~~~
   In file included from include/drm/drm_vma_manager.h:27:0,
                    from include/kcl/kcl_drm_vma_manager.h:8,
                    from drivers/gpu/drm/ttm/backport/backport.h:5,
                    from <command-line>:0:
   include/linux/mm.h:663:13: note: previous declaration of 'kvfree' was here
    extern void kvfree(const void *addr);
                ^~~~~~
   In file included from drivers/gpu/drm/ttm/backport/backport.h:8:0,
                    from <command-line>:0:
   include/kcl/kcl_mm.h:105:21: error: redefinition of 'kvmalloc_array'
    static inline void *kvmalloc_array(size_t n, size_t size, gfp_t flags)
                        ^~~~~~~~~~~~~~
   In file included from include/drm/drm_vma_manager.h:27:0,
                    from include/kcl/kcl_drm_vma_manager.h:8,
                    from drivers/gpu/drm/ttm/backport/backport.h:5,
                    from <command-line>:0:
   include/linux/mm.h:648:21: note: previous definition of 'kvmalloc_array' was here
    static inline void *kvmalloc_array(size_t n, size_t size, gfp_t flags)
                        ^~~~~~~~~~~~~~
   In file included from drivers/gpu/drm/ttm/backport/backport.h:8:0,
                    from <command-line>:0:
   include/kcl/kcl_mm.h:118:21: error: redefinition of 'kvcalloc'
    static inline void *kvcalloc(size_t n, size_t size, gfp_t flags)
                        ^~~~~~~~
   In file included from include/drm/drm_vma_manager.h:27:0,
                    from include/kcl/kcl_drm_vma_manager.h:8,
                    from drivers/gpu/drm/ttm/backport/backport.h:5,
                    from <command-line>:0:
   include/linux/mm.h:658:21: note: previous definition of 'kvcalloc' was here
    static inline void *kvcalloc(size_t n, size_t size, gfp_t flags)
                        ^~~~~~~~
   In file included from drivers/gpu/drm/ttm/backport/backport.h:9:0,
                    from <command-line>:0:
   include/kcl/kcl_fence.h:161:20: error: redefinition of 'dma_fence_set_error'
    static inline void dma_fence_set_error(struct dma_fence *fence,
                       ^~~~~~~~~~~~~~~~~~~
   In file included from include/drm/drmP.h:58:0,
                    from include/kcl/kcl_drm.h:6,
                    from drivers/gpu/drm/ttm/backport/backport.h:6,
                    from <command-line>:0:
   include/linux/dma-fence.h:517:20: note: previous definition of 'dma_fence_set_error' was here
    static inline void dma_fence_set_error(struct dma_fence *fence,
                       ^~~~~~~~~~~~~~~~~~~
   In file included from drivers/gpu/drm/ttm/backport/backport.h:9:0,
                    from <command-line>:0:
   include/kcl/kcl_fence.h: In function 'dma_fence_set_error':
   include/kcl/kcl_fence.h:167:7: error: 'struct dma_fence' has no member named 'status'
     fence->status = error;
          ^~
   In file included from drivers/gpu/drm/ttm/backport/backport.h:10:0,
                    from <command-line>:0:
   include/kcl/kcl_list.h: At top level:
>> include/kcl/kcl_list.h:6:20: error: redefinition of 'list_bulk_move_tail'
    static inline void list_bulk_move_tail(struct list_head *head,
                       ^~~~~~~~~~~~~~~~~~~
   In file included from include/linux/preempt.h:11:0,
                    from include/linux/rcupdate.h:27,
                    from include/linux/rbtree.h:34,
                    from include/drm/drm_mm.h:41,
                    from include/drm/drm_vma_manager.h:26,
                    from include/kcl/kcl_drm_vma_manager.h:8,
                    from drivers/gpu/drm/ttm/backport/backport.h:5,
                    from <command-line>:0:
   include/linux/list.h:212:20: note: previous definition of 'list_bulk_move_tail' was here
    static inline void list_bulk_move_tail(struct list_head *head,
                       ^~~~~~~~~~~~~~~~~~~
   cc1: some warnings being treated as errors
--
                    from drivers/gpu/drm/ttm/backport/backport.h:6,
                    from <command-line>:0:
   include/drm/drm_drv.h:739:6: note: previous declaration of 'drm_dev_put' was here
    void drm_dev_put(struct drm_device *dev);
         ^~~~~~~~~~~
   In file included from drivers/gpu/drm/ttm/backport/backport.h:6:0,
                    from <command-line>:0:
   include/kcl/kcl_drm.h: In function 'drm_dev_put':
   include/kcl/kcl_drm.h:539:9: error: implicit declaration of function 'drm_dev_unref'; did you mean 'drm_dev_enter'? [-Werror=implicit-function-declaration]
     return drm_dev_unref(dev);
            ^~~~~~~~~~~~~
            drm_dev_enter
   include/kcl/kcl_drm.h:539:9: warning: 'return' with a value, in function returning void
     return drm_dev_unref(dev);
            ^~~~~~~~~~~~~~~~~~
   include/kcl/kcl_drm.h:537:20: note: declared here
    static inline void drm_dev_put(struct drm_device *dev)
                       ^~~~~~~~~~~
   In file included from drivers/gpu/drm/ttm/backport/backport.h:8:0,
                    from <command-line>:0:
   include/kcl/kcl_mm.h: At top level:
   include/kcl/kcl_mm.h:65:21: error: redefinition of 'kvmalloc'
    static inline void *kvmalloc(size_t size, gfp_t flags)
                        ^~~~~~~~
   In file included from include/drm/drm_vma_manager.h:27:0,
                    from include/kcl/kcl_drm_vma_manager.h:8,
                    from drivers/gpu/drm/ttm/backport/backport.h:5,
                    from <command-line>:0:
   include/linux/mm.h:635:21: note: previous definition of 'kvmalloc' was here
    static inline void *kvmalloc(size_t size, gfp_t flags)
                        ^~~~~~~~
   In file included from drivers/gpu/drm/ttm/backport/backport.h:8:0,
                    from <command-line>:0:
   include/kcl/kcl_mm.h:75:21: error: redefinition of 'kvzalloc'
    static inline void *kvzalloc(size_t size, gfp_t flags)
                        ^~~~~~~~
   In file included from include/drm/drm_vma_manager.h:27:0,
                    from include/kcl/kcl_drm_vma_manager.h:8,
                    from drivers/gpu/drm/ttm/backport/backport.h:5,
                    from <command-line>:0:
   include/linux/mm.h:643:21: note: previous definition of 'kvzalloc' was here
    static inline void *kvzalloc(size_t size, gfp_t flags)
                        ^~~~~~~~
   In file included from drivers/gpu/drm/ttm/backport/backport.h:8:0,
                    from <command-line>:0:
   include/kcl/kcl_mm.h:85:20: error: static declaration of 'kvfree' follows non-static declaration
    static inline void kvfree(const void *addr)
                       ^~~~~~
   In file included from include/drm/drm_vma_manager.h:27:0,
                    from include/kcl/kcl_drm_vma_manager.h:8,
                    from drivers/gpu/drm/ttm/backport/backport.h:5,
                    from <command-line>:0:
   include/linux/mm.h:663:13: note: previous declaration of 'kvfree' was here
    extern void kvfree(const void *addr);
                ^~~~~~
   In file included from drivers/gpu/drm/ttm/backport/backport.h:8:0,
                    from <command-line>:0:
   include/kcl/kcl_mm.h:105:21: error: redefinition of 'kvmalloc_array'
    static inline void *kvmalloc_array(size_t n, size_t size, gfp_t flags)
                        ^~~~~~~~~~~~~~
   In file included from include/drm/drm_vma_manager.h:27:0,
                    from include/kcl/kcl_drm_vma_manager.h:8,
                    from drivers/gpu/drm/ttm/backport/backport.h:5,
                    from <command-line>:0:
   include/linux/mm.h:648:21: note: previous definition of 'kvmalloc_array' was here
    static inline void *kvmalloc_array(size_t n, size_t size, gfp_t flags)
                        ^~~~~~~~~~~~~~
   In file included from drivers/gpu/drm/ttm/backport/backport.h:8:0,
                    from <command-line>:0:
   include/kcl/kcl_mm.h:118:21: error: redefinition of 'kvcalloc'
    static inline void *kvcalloc(size_t n, size_t size, gfp_t flags)
                        ^~~~~~~~
   In file included from include/drm/drm_vma_manager.h:27:0,
                    from include/kcl/kcl_drm_vma_manager.h:8,
                    from drivers/gpu/drm/ttm/backport/backport.h:5,
                    from <command-line>:0:
   include/linux/mm.h:658:21: note: previous definition of 'kvcalloc' was here
    static inline void *kvcalloc(size_t n, size_t size, gfp_t flags)
                        ^~~~~~~~
   In file included from drivers/gpu/drm/ttm/backport/backport.h:9:0,
                    from <command-line>:0:
   include/kcl/kcl_fence.h:161:20: error: redefinition of 'dma_fence_set_error'
    static inline void dma_fence_set_error(struct dma_fence *fence,
                       ^~~~~~~~~~~~~~~~~~~
   In file included from include/drm/drmP.h:58:0,
                    from include/kcl/kcl_drm.h:6,
                    from drivers/gpu/drm/ttm/backport/backport.h:6,
                    from <command-line>:0:
   include/linux/dma-fence.h:517:20: note: previous definition of 'dma_fence_set_error' was here
    static inline void dma_fence_set_error(struct dma_fence *fence,
                       ^~~~~~~~~~~~~~~~~~~
   In file included from drivers/gpu/drm/ttm/backport/backport.h:9:0,
                    from <command-line>:0:
   include/kcl/kcl_fence.h: In function 'dma_fence_set_error':
   include/kcl/kcl_fence.h:167:7: error: 'struct dma_fence' has no member named 'status'
     fence->status = error;
          ^~
   In file included from drivers/gpu/drm/ttm/backport/backport.h:10:0,
                    from <command-line>:0:
   include/kcl/kcl_list.h: At top level:
>> include/kcl/kcl_list.h:6:20: error: redefinition of 'list_bulk_move_tail'
    static inline void list_bulk_move_tail(struct list_head *head,
                       ^~~~~~~~~~~~~~~~~~~
   In file included from include/linux/preempt.h:11:0,
                    from include/linux/rcupdate.h:27,
                    from include/linux/rbtree.h:34,
                    from include/drm/drm_mm.h:41,
                    from include/drm/drm_vma_manager.h:26,
                    from include/kcl/kcl_drm_vma_manager.h:8,
                    from drivers/gpu/drm/ttm/backport/backport.h:5,
                    from <command-line>:0:
   include/linux/list.h:212:20: note: previous definition of 'list_bulk_move_tail' was here
    static inline void list_bulk_move_tail(struct list_head *head,
                       ^~~~~~~~~~~~~~~~~~~
   drivers/gpu/drm/ttm/ttm_bo_manager.c: In function 'ttm_bo_man_debug':
   drivers/gpu/drm/ttm/ttm_bo_manager.c:145:26: error: passing argument 2 of 'drm_mm_print' from incompatible pointer type [-Werror=incompatible-pointer-types]
     drm_mm_print(&rman->mm, printer);
                             ^~~~~~~
   In file included from include/drm/drm_vma_manager.h:26:0,
                    from include/kcl/kcl_drm_vma_manager.h:8,
                    from drivers/gpu/drm/ttm/backport/backport.h:5,
                    from <command-line>:0:
   include/drm/drm_mm.h:547:6: note: expected 'struct drm_printer *' but argument is of type 'struct drm_printer *'
    void drm_mm_print(const struct drm_mm *mm, struct drm_printer *p);
         ^~~~~~~~~~~~
   cc1: some warnings being treated as errors
--
                    from drivers/gpu/drm/ttm/backport/backport.h:6,
                    from <command-line>:0:
   include/drm/drm_drv.h:739:6: note: previous declaration of 'drm_dev_put' was here
    void drm_dev_put(struct drm_device *dev);
         ^~~~~~~~~~~
   In file included from drivers/gpu/drm/ttm/backport/backport.h:6:0,
                    from <command-line>:0:
   include/kcl/kcl_drm.h: In function 'drm_dev_put':
   include/kcl/kcl_drm.h:539:9: error: implicit declaration of function 'drm_dev_unref'; did you mean 'drm_dev_enter'? [-Werror=implicit-function-declaration]
     return drm_dev_unref(dev);
            ^~~~~~~~~~~~~
            drm_dev_enter
   include/kcl/kcl_drm.h:539:9: warning: 'return' with a value, in function returning void
     return drm_dev_unref(dev);
            ^~~~~~~~~~~~~~~~~~
   include/kcl/kcl_drm.h:537:20: note: declared here
    static inline void drm_dev_put(struct drm_device *dev)
                       ^~~~~~~~~~~
   In file included from drivers/gpu/drm/ttm/backport/backport.h:8:0,
                    from <command-line>:0:
   include/kcl/kcl_mm.h: At top level:
   include/kcl/kcl_mm.h:65:21: error: redefinition of 'kvmalloc'
    static inline void *kvmalloc(size_t size, gfp_t flags)
                        ^~~~~~~~
   In file included from include/drm/drm_vma_manager.h:27:0,
                    from include/kcl/kcl_drm_vma_manager.h:8,
                    from drivers/gpu/drm/ttm/backport/backport.h:5,
                    from <command-line>:0:
   include/linux/mm.h:635:21: note: previous definition of 'kvmalloc' was here
    static inline void *kvmalloc(size_t size, gfp_t flags)
                        ^~~~~~~~
   In file included from drivers/gpu/drm/ttm/backport/backport.h:8:0,
                    from <command-line>:0:
   include/kcl/kcl_mm.h:75:21: error: redefinition of 'kvzalloc'
    static inline void *kvzalloc(size_t size, gfp_t flags)
                        ^~~~~~~~
   In file included from include/drm/drm_vma_manager.h:27:0,
                    from include/kcl/kcl_drm_vma_manager.h:8,
                    from drivers/gpu/drm/ttm/backport/backport.h:5,
                    from <command-line>:0:
   include/linux/mm.h:643:21: note: previous definition of 'kvzalloc' was here
    static inline void *kvzalloc(size_t size, gfp_t flags)
                        ^~~~~~~~
   In file included from drivers/gpu/drm/ttm/backport/backport.h:8:0,
                    from <command-line>:0:
   include/kcl/kcl_mm.h:85:20: error: static declaration of 'kvfree' follows non-static declaration
    static inline void kvfree(const void *addr)
                       ^~~~~~
   In file included from include/drm/drm_vma_manager.h:27:0,
                    from include/kcl/kcl_drm_vma_manager.h:8,
                    from drivers/gpu/drm/ttm/backport/backport.h:5,
                    from <command-line>:0:
   include/linux/mm.h:663:13: note: previous declaration of 'kvfree' was here
    extern void kvfree(const void *addr);
                ^~~~~~
   In file included from drivers/gpu/drm/ttm/backport/backport.h:8:0,
                    from <command-line>:0:
   include/kcl/kcl_mm.h:105:21: error: redefinition of 'kvmalloc_array'
    static inline void *kvmalloc_array(size_t n, size_t size, gfp_t flags)
                        ^~~~~~~~~~~~~~
   In file included from include/drm/drm_vma_manager.h:27:0,
                    from include/kcl/kcl_drm_vma_manager.h:8,
                    from drivers/gpu/drm/ttm/backport/backport.h:5,
                    from <command-line>:0:
   include/linux/mm.h:648:21: note: previous definition of 'kvmalloc_array' was here
    static inline void *kvmalloc_array(size_t n, size_t size, gfp_t flags)
                        ^~~~~~~~~~~~~~
   In file included from drivers/gpu/drm/ttm/backport/backport.h:8:0,
                    from <command-line>:0:
   include/kcl/kcl_mm.h:118:21: error: redefinition of 'kvcalloc'
    static inline void *kvcalloc(size_t n, size_t size, gfp_t flags)
                        ^~~~~~~~
   In file included from include/drm/drm_vma_manager.h:27:0,
                    from include/kcl/kcl_drm_vma_manager.h:8,
                    from drivers/gpu/drm/ttm/backport/backport.h:5,
                    from <command-line>:0:
   include/linux/mm.h:658:21: note: previous definition of 'kvcalloc' was here
    static inline void *kvcalloc(size_t n, size_t size, gfp_t flags)
                        ^~~~~~~~
   In file included from drivers/gpu/drm/ttm/backport/backport.h:9:0,
                    from <command-line>:0:
   include/kcl/kcl_fence.h:161:20: error: redefinition of 'dma_fence_set_error'
    static inline void dma_fence_set_error(struct dma_fence *fence,
                       ^~~~~~~~~~~~~~~~~~~
   In file included from include/drm/drmP.h:58:0,
                    from include/kcl/kcl_drm.h:6,
                    from drivers/gpu/drm/ttm/backport/backport.h:6,
                    from <command-line>:0:
   include/linux/dma-fence.h:517:20: note: previous definition of 'dma_fence_set_error' was here
    static inline void dma_fence_set_error(struct dma_fence *fence,
                       ^~~~~~~~~~~~~~~~~~~
   In file included from drivers/gpu/drm/ttm/backport/backport.h:9:0,
                    from <command-line>:0:
   include/kcl/kcl_fence.h: In function 'dma_fence_set_error':
   include/kcl/kcl_fence.h:167:7: error: 'struct dma_fence' has no member named 'status'
     fence->status = error;
          ^~
   In file included from drivers/gpu/drm/ttm/backport/backport.h:10:0,
                    from <command-line>:0:
   include/kcl/kcl_list.h: At top level:
>> include/kcl/kcl_list.h:6:20: error: redefinition of 'list_bulk_move_tail'
    static inline void list_bulk_move_tail(struct list_head *head,
                       ^~~~~~~~~~~~~~~~~~~
   In file included from include/linux/preempt.h:11:0,
                    from include/linux/rcupdate.h:27,
                    from include/linux/rbtree.h:34,
                    from include/drm/drm_mm.h:41,
                    from include/drm/drm_vma_manager.h:26,
                    from include/kcl/kcl_drm_vma_manager.h:8,
                    from drivers/gpu/drm/ttm/backport/backport.h:5,
                    from <command-line>:0:
   include/linux/list.h:212:20: note: previous definition of 'list_bulk_move_tail' was here
    static inline void list_bulk_move_tail(struct list_head *head,
                       ^~~~~~~~~~~~~~~~~~~
   drivers/gpu/drm/ttm/ttm_bo.c: In function 'ttm_bo_mem_space_debug':
   drivers/gpu/drm/ttm/ttm_bo.c:101:25: error: invalid initializer
     struct drm_printer p = drm_debug_printer(TTM_PFX);
                            ^~~~~~~~~~~~~~~~~
   cc1: some warnings being treated as errors

vim +/list_bulk_move_tail +6 include/kcl/kcl_list.h

     3	
     4	#if !defined(HAVE_LIST_BULK_MOVE_TAIL)
     5	#include <linux/list.h>
   > 6	static inline void list_bulk_move_tail(struct list_head *head,
     7					       struct list_head *first,
     8					       struct list_head *last)
     9	{
    10			first->prev->next = last->next;
    11			last->next->prev = first->prev;
    12	
    13			head->prev->next = first;
    14			first->prev = head->prev;
    15	
    16			last->next = head;
    17			head->prev = last;
    18	}
    19	#endif
    20	

---
0-DAY kernel test infrastructure                 Open Source Technology Center
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org Intel Corporation
-------------- next part --------------
A non-text attachment was scrubbed...
Name: .config.gz
Type: application/gzip
Size: 68191 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/dri-devel/attachments/20200112/74912227/attachment-0001.gz>


More information about the dri-devel mailing list