[radeon-alex:amd-mainline-dkms-5.0 3808/4200] include/kcl/kcl_drm.h:635:20: error: static declaration of 'drm_mode_is_420_only' follows non-static declaration

kbuild test robot lkp at intel.com
Tue Oct 29 16:03:48 UTC 2019


Hi Flora,

FYI, the error/warning still remains.

tree:   git://people.freedesktop.org/~agd5f/linux.git amd-mainline-dkms-5.0
head:   52f70af32a6cef1ec5735145486d9154ab1248ac
commit: 13a2da823a67d53982d85b4d28a9a2532fede843 [3808/4200] drm/amd/autoconf: check drm_mode_is_420_xxx() is available
config: x86_64-allyesconfig (attached as .config)
compiler: gcc-7 (Debian 7.4.0-14) 7.4.0
reproduce:
        git checkout 13a2da823a67d53982d85b4d28a9a2532fede843
        # save the attached .config to linux build tree
        make ARCH=x86_64 

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 <command-line>:0:
   include/kcl/kcl_drm.h: In function 'kcl_drm_universal_plane_init':
   include/kcl/kcl_drm.h:343:29: error: incompatible type for argument 7 of 'drm_universal_plane_init'
         formats, format_count, type);
                                ^~~~
   In file included from include/drm/drm_crtc.h:45:0,
                    from include/drm/drmP.h:69,
                    from include/kcl/kcl_drm.h:6,
                    from drivers/gpu/drm/scheduler/backport/backport.h:6,
                    from <command-line>:0:
   include/drm/drm_plane.h:713:5: note: expected 'const uint64_t * {aka const long long unsigned int *}' but argument is of type 'enum drm_plane_type'
    int drm_universal_plane_init(struct drm_device *dev,
        ^~~~~~~~~~~~~~~~~~~~~~~~
   In file included from drivers/gpu/drm/scheduler/backport/backport.h:6:0,
                    from <command-line>:0:
   include/kcl/kcl_drm.h:342:10: error: too few arguments to function 'drm_universal_plane_init'
      return drm_universal_plane_init(dev, plane, possible_crtcs, funcs,
             ^~~~~~~~~~~~~~~~~~~~~~~~
   In file included from include/drm/drm_crtc.h:45:0,
                    from include/drm/drmP.h:69,
                    from include/kcl/kcl_drm.h:6,
                    from drivers/gpu/drm/scheduler/backport/backport.h:6,
                    from <command-line>:0:
   include/drm/drm_plane.h:713:5: note: declared here
    int drm_universal_plane_init(struct drm_device *dev,
        ^~~~~~~~~~~~~~~~~~~~~~~~
   In file included from drivers/gpu/drm/scheduler/backport/backport.h:6:0,
                    from <command-line>:0:
   include/kcl/kcl_drm.h: In function 'kcl_drm_gem_object_lookup':
   include/kcl/kcl_drm.h:354:32: error: passing argument 1 of 'drm_gem_object_lookup' from incompatible pointer type [-Werror=incompatible-pointer-types]
      return drm_gem_object_lookup(dev, filp, handle);
                                   ^~~
   In file included from include/kcl/kcl_drm.h:10:0,
                    from drivers/gpu/drm/scheduler/backport/backport.h:6,
                    from <command-line>:0:
   include/drm/drm_gem.h:365:24: note: expected 'struct drm_file *' but argument is of type 'struct drm_device *'
    struct drm_gem_object *drm_gem_object_lookup(struct drm_file *filp, u32 handle);
                           ^~~~~~~~~~~~~~~~~~~~~
   In file included from drivers/gpu/drm/scheduler/backport/backport.h:6:0,
                    from <command-line>:0:
   include/kcl/kcl_drm.h:354:37: warning: passing argument 2 of 'drm_gem_object_lookup' makes integer from pointer without a cast [-Wint-conversion]
      return drm_gem_object_lookup(dev, filp, handle);
                                        ^~~~
   In file included from include/kcl/kcl_drm.h:10:0,
                    from drivers/gpu/drm/scheduler/backport/backport.h:6,
                    from <command-line>:0:
   include/drm/drm_gem.h:365:24: note: expected 'u32 {aka unsigned int}' but argument is of type 'struct drm_file *'
    struct drm_gem_object *drm_gem_object_lookup(struct drm_file *filp, u32 handle);
                           ^~~~~~~~~~~~~~~~~~~~~
   In file included from drivers/gpu/drm/scheduler/backport/backport.h:6:0,
                    from <command-line>:0:
   include/kcl/kcl_drm.h:354:10: error: too many arguments to function 'drm_gem_object_lookup'
      return drm_gem_object_lookup(dev, filp, handle);
             ^~~~~~~~~~~~~~~~~~~~~
   In file included from include/kcl/kcl_drm.h:10:0,
                    from drivers/gpu/drm/scheduler/backport/backport.h:6,
                    from <command-line>:0:
   include/drm/drm_gem.h:365:24: note: declared here
    struct drm_gem_object *drm_gem_object_lookup(struct drm_file *filp, u32 handle);
                           ^~~~~~~~~~~~~~~~~~~~~
   In file included from drivers/gpu/drm/scheduler/backport/backport.h:6:0,
                    from <command-line>:0:
   include/kcl/kcl_drm.h: At top level:
   include/kcl/kcl_drm.h:390:8: error: redefinition of 'struct drm_format_name_buf'
    struct drm_format_name_buf {
           ^~~~~~~~~~~~~~~~~~~
   In file included from include/drm/drmP.h:70:0,
                    from include/kcl/kcl_drm.h:6,
                    from drivers/gpu/drm/scheduler/backport/backport.h:6,
                    from <command-line>:0:
   include/drm/drm_fourcc.h:142:8: note: originally defined here
    struct drm_format_name_buf {
           ^~~~~~~~~~~~~~~~~~~
   In file included from drivers/gpu/drm/scheduler/backport/backport.h:6:0,
                    from <command-line>:0:
   include/kcl/kcl_drm.h: In function 'kcl_drm_gem_object_put_unlocked':
   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/scheduler/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/scheduler/backport/backport.h:6:0,
                    from <command-line>:0:
>> include/kcl/kcl_drm.h:635:20: error: static declaration of 'drm_mode_is_420_only' follows non-static declaration
    static inline bool drm_mode_is_420_only(const struct drm_display_info *display,
                       ^~~~~~~~~~~~~~~~~~~~
   In file included from include/drm/drm_crtc.h:40:0,
                    from include/drm/drmP.h:69,
                    from include/kcl/kcl_drm.h:6,
                    from drivers/gpu/drm/scheduler/backport/backport.h:6,
                    from <command-line>:0:
   include/drm/drm_modes.h:471:6: note: previous declaration of 'drm_mode_is_420_only' was here
    bool drm_mode_is_420_only(const struct drm_display_info *display,
         ^~~~~~~~~~~~~~~~~~~~
   In file included from drivers/gpu/drm/scheduler/backport/backport.h:6:0,
                    from <command-line>:0:
>> include/kcl/kcl_drm.h:642:20: error: static declaration of 'drm_mode_is_420_also' follows non-static declaration
    static inline bool drm_mode_is_420_also(const struct drm_display_info *display,
                       ^~~~~~~~~~~~~~~~~~~~
   In file included from include/drm/drm_crtc.h:40:0,
                    from include/drm/drmP.h:69,
                    from include/kcl/kcl_drm.h:6,
                    from drivers/gpu/drm/scheduler/backport/backport.h:6,
                    from <command-line>:0:
   include/drm/drm_modes.h:473:6: note: previous declaration of 'drm_mode_is_420_also' was here
    bool drm_mode_is_420_also(const struct drm_display_info *display,
         ^~~~~~~~~~~~~~~~~~~~
   cc1: some warnings being treated as errors
--
                    from <command-line>:0:
   include/kcl/kcl_drm.h: In function 'kcl_drm_universal_plane_init':
   include/kcl/kcl_drm.h:343:29: error: incompatible type for argument 7 of 'drm_universal_plane_init'
         formats, format_count, type);
                                ^~~~
   In file included from include/drm/drm_crtc.h:45:0,
                    from include/drm/drmP.h:69,
                    from include/kcl/kcl_drm.h:6,
                    from drivers/gpu/drm/ttm/backport/backport.h:6,
                    from <command-line>:0:
   include/drm/drm_plane.h:713:5: note: expected 'const uint64_t * {aka const long long unsigned int *}' but argument is of type 'enum drm_plane_type'
    int drm_universal_plane_init(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:342:10: error: too few arguments to function 'drm_universal_plane_init'
      return drm_universal_plane_init(dev, plane, possible_crtcs, funcs,
             ^~~~~~~~~~~~~~~~~~~~~~~~
   In file included from include/drm/drm_crtc.h:45:0,
                    from include/drm/drmP.h:69,
                    from include/kcl/kcl_drm.h:6,
                    from drivers/gpu/drm/ttm/backport/backport.h:6,
                    from <command-line>:0:
   include/drm/drm_plane.h:713:5: note: declared here
    int drm_universal_plane_init(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 'kcl_drm_gem_object_lookup':
   include/kcl/kcl_drm.h:354:32: error: passing argument 1 of 'drm_gem_object_lookup' from incompatible pointer type [-Werror=incompatible-pointer-types]
      return drm_gem_object_lookup(dev, filp, handle);
                                   ^~~
   In file included from include/kcl/kcl_drm.h:10:0,
                    from drivers/gpu/drm/ttm/backport/backport.h:6,
                    from <command-line>:0:
   include/drm/drm_gem.h:365:24: note: expected 'struct drm_file *' but argument is of type 'struct drm_device *'
    struct drm_gem_object *drm_gem_object_lookup(struct drm_file *filp, u32 handle);
                           ^~~~~~~~~~~~~~~~~~~~~
   In file included from drivers/gpu/drm/ttm/backport/backport.h:6:0,
                    from <command-line>:0:
   include/kcl/kcl_drm.h:354:37: warning: passing argument 2 of 'drm_gem_object_lookup' makes integer from pointer without a cast [-Wint-conversion]
      return drm_gem_object_lookup(dev, filp, handle);
                                        ^~~~
   In file included from include/kcl/kcl_drm.h:10:0,
                    from drivers/gpu/drm/ttm/backport/backport.h:6,
                    from <command-line>:0:
   include/drm/drm_gem.h:365:24: note: expected 'u32 {aka unsigned int}' but argument is of type 'struct drm_file *'
    struct drm_gem_object *drm_gem_object_lookup(struct drm_file *filp, u32 handle);
                           ^~~~~~~~~~~~~~~~~~~~~
   In file included from drivers/gpu/drm/ttm/backport/backport.h:6:0,
                    from <command-line>:0:
   include/kcl/kcl_drm.h:354:10: error: too many arguments to function 'drm_gem_object_lookup'
      return drm_gem_object_lookup(dev, filp, handle);
             ^~~~~~~~~~~~~~~~~~~~~
   In file included from include/kcl/kcl_drm.h:10:0,
                    from drivers/gpu/drm/ttm/backport/backport.h:6,
                    from <command-line>:0:
   include/drm/drm_gem.h:365:24: note: declared here
    struct drm_gem_object *drm_gem_object_lookup(struct drm_file *filp, u32 handle);
                           ^~~~~~~~~~~~~~~~~~~~~
   In file included from drivers/gpu/drm/ttm/backport/backport.h:6:0,
                    from <command-line>:0:
   include/kcl/kcl_drm.h: At top level:
   include/kcl/kcl_drm.h:390:8: error: redefinition of 'struct drm_format_name_buf'
    struct drm_format_name_buf {
           ^~~~~~~~~~~~~~~~~~~
   In file included from include/drm/drmP.h:70:0,
                    from include/kcl/kcl_drm.h:6,
                    from drivers/gpu/drm/ttm/backport/backport.h:6,
                    from <command-line>:0:
   include/drm/drm_fourcc.h:142:8: note: originally defined here
    struct drm_format_name_buf {
           ^~~~~~~~~~~~~~~~~~~
   In file included from drivers/gpu/drm/ttm/backport/backport.h:6:0,
                    from <command-line>:0:
   include/kcl/kcl_drm.h: In function 'kcl_drm_gem_object_put_unlocked':
   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:6:0,
                    from <command-line>:0:
>> include/kcl/kcl_drm.h:635:20: error: static declaration of 'drm_mode_is_420_only' follows non-static declaration
    static inline bool drm_mode_is_420_only(const struct drm_display_info *display,
                       ^~~~~~~~~~~~~~~~~~~~
   In file included from include/drm/drm_crtc.h:40:0,
                    from include/drm/drmP.h:69,
                    from include/kcl/kcl_drm.h:6,
                    from drivers/gpu/drm/ttm/backport/backport.h:6,
                    from <command-line>:0:
   include/drm/drm_modes.h:471:6: note: previous declaration of 'drm_mode_is_420_only' was here
    bool drm_mode_is_420_only(const struct drm_display_info *display,
         ^~~~~~~~~~~~~~~~~~~~
   In file included from drivers/gpu/drm/ttm/backport/backport.h:6:0,
                    from <command-line>:0:
>> include/kcl/kcl_drm.h:642:20: error: static declaration of 'drm_mode_is_420_also' follows non-static declaration
    static inline bool drm_mode_is_420_also(const struct drm_display_info *display,
                       ^~~~~~~~~~~~~~~~~~~~
   In file included from include/drm/drm_crtc.h:40:0,
                    from include/drm/drmP.h:69,
                    from include/kcl/kcl_drm.h:6,
                    from drivers/gpu/drm/ttm/backport/backport.h:6,
                    from <command-line>:0:
   include/drm/drm_modes.h:473:6: note: previous declaration of 'drm_mode_is_420_also' was here
    bool drm_mode_is_420_also(const struct drm_display_info *display,
         ^~~~~~~~~~~~~~~~~~~~
   In file included from drivers/gpu/drm/ttm/backport/backport.h:9: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:10,
                    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:9: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 include/linux/atomic.h:7,
                    from include/linux/rcupdate.h:38,
                    from include/kcl/kcl_rcupdate.h:4,
                    from include/kcl/kcl_fence.h:5,
                    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/rcupdate.h:40,
                    from include/kcl/kcl_rcupdate.h:4,
                    from include/kcl/kcl_fence.h:5,
                    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,
..

vim +/drm_mode_is_420_only +635 include/kcl/kcl_drm.h

   633	
   634	#ifndef HAVE_DRM_MODE_IS_420_XXX
 > 635	static inline bool drm_mode_is_420_only(const struct drm_display_info *display,
   636				  const struct drm_display_mode *mode)
   637	{
   638		/* DRM < 4.4 ,un-support this pixel format */
   639		printk_once(KERN_WARNING "This kernel version not support API: drm_mode_is_420_only!\n");
   640		return false;
   641	}
 > 642	static inline bool drm_mode_is_420_also(const struct drm_display_info *display,

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


More information about the dri-devel mailing list