[radeon-alex:amd-mainline-dkms-5.0 3697/4201] include/kcl/kcl_mm_types.h:53:26: error: static declaration of 'vmf_insert_pfn' follows non-static declaration

kbuild test robot lkp at intel.com
Sat Nov 9 02:16:11 UTC 2019


Hi Flora,

FYI, the error/warning still remains.

tree:   git://people.freedesktop.org/~agd5f/linux.git amd-mainline-dkms-5.0
head:   7af3b66aba4c3982167d540c01ea71735e9a1264
commit: f460c248a3f0bca3a875602cf40693de672485c4 [3697/4201] drm/amd/autoconf: refactor dma_fence header check
config: i386-allmodconfig (attached as .config)
compiler: gcc-7 (Debian 7.4.0-14) 7.4.0
reproduce:
        git checkout f460c248a3f0bca3a875602cf40693de672485c4
        # 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 >>):

   include/kcl/kcl_drm.h:422:9: error: implicit declaration of function 'drm_gem_object_unreference_unlocked'; did you mean 'drm_gem_object_put_unlocked'? [-Werror=implicit-function-declaration]
     return drm_gem_object_unreference_unlocked(obj);
            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
            drm_gem_object_put_unlocked
   include/kcl/kcl_drm.h:422:9: warning: 'return' with a value, in function returning void
     return drm_gem_object_unreference_unlocked(obj);
            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/kcl/kcl_drm.h:419:20: note: declared here
    static inline void kcl_drm_gem_object_put_unlocked(struct drm_gem_object *obj)
                       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/kcl/kcl_drm.h: At top level:
   include/kcl/kcl_drm.h:536:34: error: redefinition of 'drm_debug_printer'
    static inline struct drm_printer drm_debug_printer(const char *prefix)
                                     ^~~~~~~~~~~~~~~~~
   In file included from include/drm/drm_mm.h:49:0,
                    from include/drm/drmP.h:72,
                    from include/kcl/kcl_drm.h:6,
                    from drivers/gpu/drm/ttm/backport/backport.h:6,
                    from <command-line>:0:
   include/drm/drm_print.h:217:34: note: previous definition of 'drm_debug_printer' was here
    static inline struct drm_printer drm_debug_printer(const char *prefix)
                                     ^~~~~~~~~~~~~~~~~
   In file included from drivers/gpu/drm/ttm/backport/backport.h:8:0,
                    from <command-line>:0:
   include/kcl/kcl_kref.h:7:28: error: redefinition of 'kref_read'
    static inline unsigned int kref_read(const struct kref *kref)
                               ^~~~~~~~~
   In file included from include/linux/dma-fence.h:28:0,
                    from include/kcl/kcl_fence.h:9,
                    from drivers/gpu/drm/ttm/backport/backport.h:5,
                    from <command-line>:0:
   include/linux/kref.h:36:28: note: previous definition of 'kref_read' was here
    static inline unsigned int kref_read(const struct kref *kref)
                               ^~~~~~~~~
   In file included from drivers/gpu/drm/ttm/backport/backport.h:8:0,
                    from <command-line>:0:
   include/kcl/kcl_kref.h: In function 'kref_read':
   include/kcl/kcl_kref.h:9:21: error: passing argument 1 of 'atomic_read' from incompatible pointer type [-Werror=incompatible-pointer-types]
     return atomic_read(&kref->refcount);
                        ^
   In file included from arch/x86/include/asm/atomic.h:265:0,
                    from arch/x86/include/asm/msr.h:67,
                    from arch/x86/include/asm/processor.h:21,
                    from arch/x86/include/asm/cpufeature.h:5,
                    from arch/x86/include/asm/thread_info.h:53,
                    from include/linux/thread_info.h:38,
                    from arch/x86/include/asm/preempt.h:7,
                    from include/linux/preempt.h:78,
                    from include/linux/spinlock.h:51,
                    from include/linux/wait.h:9,
                    from include/linux/dma-fence.h:25,
                    from include/kcl/kcl_fence.h:9,
                    from drivers/gpu/drm/ttm/backport/backport.h:5,
                    from <command-line>:0:
   include/asm-generic/atomic-instrumented.h:19:28: note: expected 'const atomic_t * {aka const struct <anonymous> *}' but argument is of type 'const refcount_t * {aka const struct refcount_struct *}'
    static __always_inline int atomic_read(const atomic_t *v)
                               ^~~~~~~~~~~
   In file included from drivers/gpu/drm/ttm/backport/backport.h:11:0,
                    from <command-line>:0:
   include/kcl/kcl_mm_types.h: At top level:
   include/kcl/kcl_mm_types.h:10:3: error: conflicting types for 'pfn_t'
    } pfn_t;
      ^~~~~
   In file included from include/asm-generic/memory_model.h:5:0,
                    from arch/x86/include/asm/page.h:76,
                    from arch/x86/include/asm/thread_info.h:12,
                    from include/linux/thread_info.h:38,
                    from arch/x86/include/asm/preempt.h:7,
                    from include/linux/preempt.h:78,
                    from include/linux/spinlock.h:51,
                    from include/linux/wait.h:9,
                    from include/linux/dma-fence.h:25,
                    from include/kcl/kcl_fence.h:9,
                    from drivers/gpu/drm/ttm/backport/backport.h:5,
                    from <command-line>:0:
   include/linux/pfn.h:15:3: note: previous declaration of 'pfn_t' was here
    } pfn_t;
      ^~~~~
   In file included from drivers/gpu/drm/ttm/backport/backport.h:11:0,
                    from <command-line>:0:
   include/kcl/kcl_mm_types.h:35:26: error: conflicting types for 'vmf_insert_mixed'
    static inline vm_fault_t vmf_insert_mixed(struct vm_area_struct *vma,
                             ^~~~~~~~~~~~~~~~
   In file included from include/linux/scatterlist.h:8:0,
                    from include/linux/dma-mapping.h:11,
                    from include/drm/drmP.h:37,
                    from include/kcl/kcl_drm.h:6,
                    from drivers/gpu/drm/ttm/backport/backport.h:6,
                    from <command-line>:0:
   include/linux/mm.h:2572:12: note: previous declaration of 'vmf_insert_mixed' was here
    vm_fault_t vmf_insert_mixed(struct vm_area_struct *vma, unsigned long addr,
               ^~~~~~~~~~~~~~~~
   In file included from drivers/gpu/drm/ttm/backport/backport.h:11:0,
                    from <command-line>:0:
   include/kcl/kcl_mm_types.h: In function 'vmf_insert_mixed':
   include/kcl/kcl_mm_types.h:41:8: error: implicit declaration of function 'vm_insert_mixed'; did you mean 'vmf_insert_mixed'? [-Werror=implicit-function-declaration]
     err = vm_insert_mixed(vma, addr, pfn_t_to_pfn(pfn));
           ^~~~~~~~~~~~~~~
           vmf_insert_mixed
   include/kcl/kcl_mm_types.h: At top level:
>> include/kcl/kcl_mm_types.h:53:26: error: static declaration of 'vmf_insert_pfn' follows non-static declaration
    static inline vm_fault_t vmf_insert_pfn(struct vm_area_struct *vma,
                             ^~~~~~~~~~~~~~
   In file included from include/linux/scatterlist.h:8:0,
                    from include/linux/dma-mapping.h:11,
                    from include/drm/drmP.h:37,
                    from include/kcl/kcl_drm.h:6,
                    from drivers/gpu/drm/ttm/backport/backport.h:6,
                    from <command-line>:0:
   include/linux/mm.h:2568:12: note: previous declaration of 'vmf_insert_pfn' was here
    vm_fault_t vmf_insert_pfn(struct vm_area_struct *vma, unsigned long addr,
               ^~~~~~~~~~~~~~
   In file included from drivers/gpu/drm/ttm/backport/backport.h:11:0,
                    from <command-line>:0:
   include/kcl/kcl_mm_types.h: In function 'vmf_insert_pfn':
   include/kcl/kcl_mm_types.h:56:13: error: implicit declaration of function 'vm_insert_pfn'; did you mean 'vmf_insert_pfn'? [-Werror=implicit-function-declaration]
      int err = vm_insert_pfn(vma, addr, pfn);
                ^~~~~~~~~~~~~
                vmf_insert_pfn
   In file included from drivers/gpu/drm/ttm/backport/backport.h:12:0,
                    from <command-line>:0:
   include/kcl/kcl_mm.h: In function 'kcl_get_user_pages':
   include/kcl/kcl_mm.h:36:24: warning: passing argument 1 of 'get_user_pages' makes integer from pointer without a cast [-Wint-conversion]
     return get_user_pages(tsk, mm, start, nr_pages,
                           ^~~
   In file included from include/linux/scatterlist.h:8:0,
                    from include/linux/dma-mapping.h:11,
                    from include/drm/drmP.h:37,
                    from include/kcl/kcl_drm.h:6,
                    from drivers/gpu/drm/ttm/backport/backport.h:6,
                    from <command-line>:0:
   include/linux/mm.h:1532:6: note: expected 'long unsigned int' but argument is of type 'struct task_struct *'
    long get_user_pages(unsigned long start, unsigned long nr_pages,
         ^~~~~~~~~~~~~~
   In file included from drivers/gpu/drm/ttm/backport/backport.h:12:0,
                    from <command-line>:0:
   include/kcl/kcl_mm.h:36:29: warning: passing argument 2 of 'get_user_pages' makes integer from pointer without a cast [-Wint-conversion]
     return get_user_pages(tsk, mm, start, nr_pages,
                                ^~
   In file included from include/linux/scatterlist.h:8:0,
                    from include/linux/dma-mapping.h:11,
                    from include/drm/drmP.h:37,
                    from include/kcl/kcl_drm.h:6,
                    from drivers/gpu/drm/ttm/backport/backport.h:6,
                    from <command-line>:0:
   include/linux/mm.h:1532:6: note: expected 'long unsigned int' but argument is of type 'struct mm_struct *'
    long get_user_pages(unsigned long start, unsigned long nr_pages,
         ^~~~~~~~~~~~~~
   In file included from drivers/gpu/drm/ttm/backport/backport.h:12:0,
                    from <command-line>:0:
   include/kcl/kcl_mm.h:36:40: warning: passing argument 4 of 'get_user_pages' makes pointer from integer without a cast [-Wint-conversion]
     return get_user_pages(tsk, mm, start, nr_pages,
                                           ^~~~~~~~
   In file included from include/linux/scatterlist.h:8:0,
                    from include/linux/dma-mapping.h:11,
                    from include/drm/drmP.h:37,
                    from include/kcl/kcl_drm.h:6,
                    from drivers/gpu/drm/ttm/backport/backport.h:6,
                    from <command-line>:0:
   include/linux/mm.h:1532:6: note: expected 'struct page **' but argument is of type 'long unsigned int'
    long get_user_pages(unsigned long start, unsigned long nr_pages,
         ^~~~~~~~~~~~~~
   In file included from drivers/gpu/drm/ttm/backport/backport.h:12:0,
                    from <command-line>:0:
   include/kcl/kcl_mm.h:37:4: warning: passing argument 5 of 'get_user_pages' makes pointer from integer without a cast [-Wint-conversion]
       write, force, pages, vmas);
       ^~~~~
   In file included from include/linux/scatterlist.h:8:0,
                    from include/linux/dma-mapping.h:11,
                    from include/drm/drmP.h:37,
                    from include/kcl/kcl_drm.h:6,
                    from drivers/gpu/drm/ttm/backport/backport.h:6,
                    from <command-line>:0:
   include/linux/mm.h:1532:6: note: expected 'struct vm_area_struct **' but argument is of type 'int'
    long get_user_pages(unsigned long start, unsigned long nr_pages,
         ^~~~~~~~~~~~~~
   In file included from drivers/gpu/drm/ttm/backport/backport.h:12:0,
                    from <command-line>:0:
   include/kcl/kcl_mm.h:36:9: error: too many arguments to function 'get_user_pages'
     return get_user_pages(tsk, mm, start, nr_pages,
            ^~~~~~~~~~~~~~
   In file included from include/linux/scatterlist.h:8:0,
                    from include/linux/dma-mapping.h:11,
                    from include/drm/drmP.h:37,
                    from include/kcl/kcl_drm.h:6,
                    from drivers/gpu/drm/ttm/backport/backport.h:6,
                    from <command-line>:0:
   include/linux/mm.h:1532:6: note: declared here
    long get_user_pages(unsigned long start, unsigned long nr_pages,
         ^~~~~~~~~~~~~~
   In file included from drivers/gpu/drm/ttm/backport/backport.h:12:0,
                    from <command-line>:0:
   include/kcl/kcl_mm.h: At top level:
   include/kcl/kcl_mm.h:43:28: error: redefinition of 'memalloc_nofs_save'
    static inline unsigned int memalloc_nofs_save(void)
                               ^~~~~~~~~~~~~~~~~~
   In file included from include/kcl/kcl_mm.h:6:0,
                    from drivers/gpu/drm/ttm/backport/backport.h:12,
                    from <command-line>:0:
   include/linux/sched/mm.h:219:28: note: previous definition of 'memalloc_nofs_save' was here
    static inline unsigned int memalloc_nofs_save(void)
--
   include/kcl/kcl_drm.h:422:9: error: implicit declaration of function 'drm_gem_object_unreference_unlocked'; did you mean 'drm_gem_object_put_unlocked'? [-Werror=implicit-function-declaration]
     return drm_gem_object_unreference_unlocked(obj);
            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
            drm_gem_object_put_unlocked
   include/kcl/kcl_drm.h:422:9: warning: 'return' with a value, in function returning void
     return drm_gem_object_unreference_unlocked(obj);
            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/kcl/kcl_drm.h:419:20: note: declared here
    static inline void kcl_drm_gem_object_put_unlocked(struct drm_gem_object *obj)
                       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/kcl/kcl_drm.h: At top level:
   include/kcl/kcl_drm.h:536:34: error: redefinition of 'drm_debug_printer'
    static inline struct drm_printer drm_debug_printer(const char *prefix)
                                     ^~~~~~~~~~~~~~~~~
   In file included from include/drm/drm_mm.h:49:0,
                    from include/drm/drmP.h:72,
                    from include/kcl/kcl_drm.h:6,
                    from drivers/gpu/drm/ttm/backport/backport.h:6,
                    from <command-line>:0:
   include/drm/drm_print.h:217:34: note: previous definition of 'drm_debug_printer' was here
    static inline struct drm_printer drm_debug_printer(const char *prefix)
                                     ^~~~~~~~~~~~~~~~~
   In file included from drivers/gpu/drm/ttm/backport/backport.h:8:0,
                    from <command-line>:0:
   include/kcl/kcl_kref.h:7:28: error: redefinition of 'kref_read'
    static inline unsigned int kref_read(const struct kref *kref)
                               ^~~~~~~~~
   In file included from include/linux/dma-fence.h:28:0,
                    from include/kcl/kcl_fence.h:9,
                    from drivers/gpu/drm/ttm/backport/backport.h:5,
                    from <command-line>:0:
   include/linux/kref.h:36:28: note: previous definition of 'kref_read' was here
    static inline unsigned int kref_read(const struct kref *kref)
                               ^~~~~~~~~
   In file included from drivers/gpu/drm/ttm/backport/backport.h:8:0,
                    from <command-line>:0:
   include/kcl/kcl_kref.h: In function 'kref_read':
   include/kcl/kcl_kref.h:9:21: error: passing argument 1 of 'atomic_read' from incompatible pointer type [-Werror=incompatible-pointer-types]
     return atomic_read(&kref->refcount);
                        ^
   In file included from arch/x86/include/asm/atomic.h:265:0,
                    from arch/x86/include/asm/msr.h:67,
                    from arch/x86/include/asm/processor.h:21,
                    from arch/x86/include/asm/cpufeature.h:5,
                    from arch/x86/include/asm/thread_info.h:53,
                    from include/linux/thread_info.h:38,
                    from arch/x86/include/asm/preempt.h:7,
                    from include/linux/preempt.h:78,
                    from include/linux/spinlock.h:51,
                    from include/linux/wait.h:9,
                    from include/linux/dma-fence.h:25,
                    from include/kcl/kcl_fence.h:9,
                    from drivers/gpu/drm/ttm/backport/backport.h:5,
                    from <command-line>:0:
   include/asm-generic/atomic-instrumented.h:19:28: note: expected 'const atomic_t * {aka const struct <anonymous> *}' but argument is of type 'const refcount_t * {aka const struct refcount_struct *}'
    static __always_inline int atomic_read(const atomic_t *v)
                               ^~~~~~~~~~~
   In file included from drivers/gpu/drm/ttm/backport/backport.h:11:0,
                    from <command-line>:0:
   include/kcl/kcl_mm_types.h: At top level:
   include/kcl/kcl_mm_types.h:10:3: error: conflicting types for 'pfn_t'
    } pfn_t;
      ^~~~~
   In file included from include/asm-generic/memory_model.h:5:0,
                    from arch/x86/include/asm/page.h:76,
                    from arch/x86/include/asm/thread_info.h:12,
                    from include/linux/thread_info.h:38,
                    from arch/x86/include/asm/preempt.h:7,
                    from include/linux/preempt.h:78,
                    from include/linux/spinlock.h:51,
                    from include/linux/wait.h:9,
                    from include/linux/dma-fence.h:25,
                    from include/kcl/kcl_fence.h:9,
                    from drivers/gpu/drm/ttm/backport/backport.h:5,
                    from <command-line>:0:
   include/linux/pfn.h:15:3: note: previous declaration of 'pfn_t' was here
    } pfn_t;
      ^~~~~
   In file included from drivers/gpu/drm/ttm/backport/backport.h:11:0,
                    from <command-line>:0:
   include/kcl/kcl_mm_types.h:35:26: error: conflicting types for 'vmf_insert_mixed'
    static inline vm_fault_t vmf_insert_mixed(struct vm_area_struct *vma,
                             ^~~~~~~~~~~~~~~~
   In file included from include/linux/scatterlist.h:8:0,
                    from include/linux/dma-mapping.h:11,
                    from include/drm/drmP.h:37,
                    from include/kcl/kcl_drm.h:6,
                    from drivers/gpu/drm/ttm/backport/backport.h:6,
                    from <command-line>:0:
   include/linux/mm.h:2572:12: note: previous declaration of 'vmf_insert_mixed' was here
    vm_fault_t vmf_insert_mixed(struct vm_area_struct *vma, unsigned long addr,
               ^~~~~~~~~~~~~~~~
   In file included from drivers/gpu/drm/ttm/backport/backport.h:11:0,
                    from <command-line>:0:
   include/kcl/kcl_mm_types.h: In function 'vmf_insert_mixed':
   include/kcl/kcl_mm_types.h:41:8: error: implicit declaration of function 'vm_insert_mixed'; did you mean 'vmf_insert_mixed'? [-Werror=implicit-function-declaration]
     err = vm_insert_mixed(vma, addr, pfn_t_to_pfn(pfn));
           ^~~~~~~~~~~~~~~
           vmf_insert_mixed
   include/kcl/kcl_mm_types.h: At top level:
>> include/kcl/kcl_mm_types.h:53:26: error: static declaration of 'vmf_insert_pfn' follows non-static declaration
    static inline vm_fault_t vmf_insert_pfn(struct vm_area_struct *vma,
                             ^~~~~~~~~~~~~~
   In file included from include/linux/scatterlist.h:8:0,
                    from include/linux/dma-mapping.h:11,
                    from include/drm/drmP.h:37,
                    from include/kcl/kcl_drm.h:6,
                    from drivers/gpu/drm/ttm/backport/backport.h:6,
                    from <command-line>:0:
   include/linux/mm.h:2568:12: note: previous declaration of 'vmf_insert_pfn' was here
    vm_fault_t vmf_insert_pfn(struct vm_area_struct *vma, unsigned long addr,
               ^~~~~~~~~~~~~~
   In file included from drivers/gpu/drm/ttm/backport/backport.h:11:0,
                    from <command-line>:0:
   include/kcl/kcl_mm_types.h: In function 'vmf_insert_pfn':
   include/kcl/kcl_mm_types.h:56:13: error: implicit declaration of function 'vm_insert_pfn'; did you mean 'vmf_insert_pfn'? [-Werror=implicit-function-declaration]
      int err = vm_insert_pfn(vma, addr, pfn);
                ^~~~~~~~~~~~~
                vmf_insert_pfn
   In file included from drivers/gpu/drm/ttm/backport/backport.h:12:0,
                    from <command-line>:0:
   include/kcl/kcl_mm.h: In function 'kcl_get_user_pages':
   include/kcl/kcl_mm.h:36:24: warning: passing argument 1 of 'get_user_pages' makes integer from pointer without a cast [-Wint-conversion]
     return get_user_pages(tsk, mm, start, nr_pages,
                           ^~~
   In file included from include/linux/scatterlist.h:8:0,
                    from include/linux/dma-mapping.h:11,
                    from include/drm/drmP.h:37,
                    from include/kcl/kcl_drm.h:6,
                    from drivers/gpu/drm/ttm/backport/backport.h:6,
                    from <command-line>:0:
   include/linux/mm.h:1532:6: note: expected 'long unsigned int' but argument is of type 'struct task_struct *'
    long get_user_pages(unsigned long start, unsigned long nr_pages,
         ^~~~~~~~~~~~~~
   In file included from drivers/gpu/drm/ttm/backport/backport.h:12:0,
                    from <command-line>:0:
   include/kcl/kcl_mm.h:36:29: warning: passing argument 2 of 'get_user_pages' makes integer from pointer without a cast [-Wint-conversion]
     return get_user_pages(tsk, mm, start, nr_pages,
                                ^~
   In file included from include/linux/scatterlist.h:8:0,
                    from include/linux/dma-mapping.h:11,
                    from include/drm/drmP.h:37,
                    from include/kcl/kcl_drm.h:6,
                    from drivers/gpu/drm/ttm/backport/backport.h:6,
                    from <command-line>:0:
   include/linux/mm.h:1532:6: note: expected 'long unsigned int' but argument is of type 'struct mm_struct *'
    long get_user_pages(unsigned long start, unsigned long nr_pages,
         ^~~~~~~~~~~~~~
   In file included from drivers/gpu/drm/ttm/backport/backport.h:12:0,
                    from <command-line>:0:
   include/kcl/kcl_mm.h:36:40: warning: passing argument 4 of 'get_user_pages' makes pointer from integer without a cast [-Wint-conversion]
     return get_user_pages(tsk, mm, start, nr_pages,
                                           ^~~~~~~~
   In file included from include/linux/scatterlist.h:8:0,
                    from include/linux/dma-mapping.h:11,
                    from include/drm/drmP.h:37,
                    from include/kcl/kcl_drm.h:6,
                    from drivers/gpu/drm/ttm/backport/backport.h:6,
                    from <command-line>:0:
   include/linux/mm.h:1532:6: note: expected 'struct page **' but argument is of type 'long unsigned int'
    long get_user_pages(unsigned long start, unsigned long nr_pages,
         ^~~~~~~~~~~~~~
   In file included from drivers/gpu/drm/ttm/backport/backport.h:12:0,
                    from <command-line>:0:
   include/kcl/kcl_mm.h:37:4: warning: passing argument 5 of 'get_user_pages' makes pointer from integer without a cast [-Wint-conversion]
       write, force, pages, vmas);
       ^~~~~
   In file included from include/linux/scatterlist.h:8:0,
                    from include/linux/dma-mapping.h:11,
                    from include/drm/drmP.h:37,
                    from include/kcl/kcl_drm.h:6,
                    from drivers/gpu/drm/ttm/backport/backport.h:6,
                    from <command-line>:0:
   include/linux/mm.h:1532:6: note: expected 'struct vm_area_struct **' but argument is of type 'int'
    long get_user_pages(unsigned long start, unsigned long nr_pages,
         ^~~~~~~~~~~~~~
   In file included from drivers/gpu/drm/ttm/backport/backport.h:12:0,
                    from <command-line>:0:
   include/kcl/kcl_mm.h:36:9: error: too many arguments to function 'get_user_pages'
     return get_user_pages(tsk, mm, start, nr_pages,
            ^~~~~~~~~~~~~~
   In file included from include/linux/scatterlist.h:8:0,
                    from include/linux/dma-mapping.h:11,
                    from include/drm/drmP.h:37,
                    from include/kcl/kcl_drm.h:6,
                    from drivers/gpu/drm/ttm/backport/backport.h:6,
                    from <command-line>:0:
   include/linux/mm.h:1532:6: note: declared here
    long get_user_pages(unsigned long start, unsigned long nr_pages,
         ^~~~~~~~~~~~~~
   In file included from drivers/gpu/drm/ttm/backport/backport.h:12:0,
                    from <command-line>:0:
   include/kcl/kcl_mm.h: At top level:
   include/kcl/kcl_mm.h:43:28: error: redefinition of 'memalloc_nofs_save'
    static inline unsigned int memalloc_nofs_save(void)
                               ^~~~~~~~~~~~~~~~~~
   In file included from include/kcl/kcl_mm.h:6:0,
                    from drivers/gpu/drm/ttm/backport/backport.h:12,
                    from <command-line>:0:
   include/linux/sched/mm.h:219:28: note: previous definition of 'memalloc_nofs_save' was here
    static inline unsigned int memalloc_nofs_save(void)
..

vim +/vmf_insert_pfn +53 include/kcl/kcl_mm_types.h

8ace51a85e415c Prike Liang 2018-06-26  34  
8ace51a85e415c Prike Liang 2018-06-26  35  static inline vm_fault_t vmf_insert_mixed(struct vm_area_struct *vma,
8ace51a85e415c Prike Liang 2018-06-26  36  				unsigned long addr,
8ace51a85e415c Prike Liang 2018-06-26  37  				pfn_t pfn)
d1b6ab4d151ea4 Flora Cui   2019-09-03  38  {
d1b6ab4d151ea4 Flora Cui   2019-09-03  39  	int err;
d1b6ab4d151ea4 Flora Cui   2019-09-03  40  #if !defined(HAVE_PFN_T_VM_INSERT_MIXED)
d1b6ab4d151ea4 Flora Cui   2019-09-03 @41  	err = vm_insert_mixed(vma, addr, pfn_t_to_pfn(pfn));
8ace51a85e415c Prike Liang 2018-06-26  42  #else
d1b6ab4d151ea4 Flora Cui   2019-09-03  43  	err = vm_insert_mixed(vma, addr, pfn);
8ace51a85e415c Prike Liang 2018-06-26  44  #endif
8ace51a85e415c Prike Liang 2018-06-26  45  	if (err == -ENOMEM)
8ace51a85e415c Prike Liang 2018-06-26  46  		return VM_FAULT_OOM;
8ace51a85e415c Prike Liang 2018-06-26  47  	if (err < 0 && err != -EBUSY)
8ace51a85e415c Prike Liang 2018-06-26  48  		return VM_FAULT_SIGBUS;
8ace51a85e415c Prike Liang 2018-06-26  49  
8ace51a85e415c Prike Liang 2018-06-26  50  	return VM_FAULT_NOPAGE;
8ace51a85e415c Prike Liang 2018-06-26  51  }
8ace51a85e415c Prike Liang 2018-06-26  52  
8ace51a85e415c Prike Liang 2018-06-26 @53  static inline vm_fault_t vmf_insert_pfn(struct vm_area_struct *vma,
8ace51a85e415c Prike Liang 2018-06-26  54  				unsigned long addr, unsigned long pfn)
8ace51a85e415c Prike Liang 2018-06-26  55  {
8ace51a85e415c Prike Liang 2018-06-26  56  		int err = vm_insert_pfn(vma, addr, pfn);
8ace51a85e415c Prike Liang 2018-06-26  57  
8ace51a85e415c Prike Liang 2018-06-26  58  		if (err == -ENOMEM)
8ace51a85e415c Prike Liang 2018-06-26  59  			return VM_FAULT_OOM;
8ace51a85e415c Prike Liang 2018-06-26  60  		if (err < 0 && err != -EBUSY)
8ace51a85e415c Prike Liang 2018-06-26  61  			return VM_FAULT_SIGBUS;
8ace51a85e415c Prike Liang 2018-06-26  62  
8ace51a85e415c Prike Liang 2018-06-26  63  		return VM_FAULT_NOPAGE;
8ace51a85e415c Prike Liang 2018-06-26  64  }
d1b6ab4d151ea4 Flora Cui   2019-09-03  65  

:::::: The code at line 53 was first introduced by commit
:::::: 8ace51a85e415c12136a3af6bf51fe5f2373b474 drm/amdkcl: [4.16] add kcl/kcl_mm_types.h file for ttm compatibility

:::::: TO: Prike Liang <Prike.Liang at amd.com>
:::::: CC: tianci yin <tianci.yin at amd.com>

---
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: 65850 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/dri-devel/attachments/20191109/0d6835df/attachment-0001.gz>


More information about the dri-devel mailing list