[radeon-alex:amd-19.50 1967/2687] include/kcl/kcl_drm.h:313:9: error: implicit declaration of function 'drm_gem_object_unreference_unlocked'; did you mean 'drm_gem_object_put_unlocked'?

kbuild test robot lkp at intel.com
Fri Jan 10 19:05:28 UTC 2020


Hi Anatoli,

FYI, the error/warning still remains.

tree:   git://people.freedesktop.org/~agd5f/linux.git amd-19.50
head:   02692309efa6ad48d47894e40fcb3832ace49c4c
commit: c3612b68d1358e8325c377ba5e1f690b39a6cea8 [1967/2687] drm/amdkcl: Test whether drm_gem_object_put_unlocked() is available
config: i386-allyesconfig (attached as .config)
compiler: gcc-7 (Debian 7.5.0-3) 7.5.0
reproduce:
        git checkout c3612b68d1358e8325c377ba5e1f690b39a6cea8
        # 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 error/warnings (new ones prefixed by >>):

     return drm_encoder_init(dev, encoder, funcs,
            ^~~~~~~~~~~~~~~~
   In file included from include/drm/drm_modeset_helper_vtables.h:33:0,
                    from include/drm/drm_atomic_helper.h:32,
                    from include/kcl/kcl_drm.h:10,
                    from drivers/gpu/drm/ttm/backport/backport.h:6,
                    from <command-line>:0:
   include/drm/drm_encoder.h:183:5: note: declared here
    int drm_encoder_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_crtc_init_with_planes':
   include/kcl/kcl_drm.h:206:10: error: too few arguments to function 'drm_crtc_init_with_planes'
      return drm_crtc_init_with_planes(dev, crtc, primary,
             ^~~~~~~~~~~~~~~~~~~~~~~~~
   In file included from include/drm/drmP.h:68:0,
                    from include/kcl/kcl_drm.h:6,
                    from drivers/gpu/drm/ttm/backport/backport.h:6,
                    from <command-line>:0:
   include/drm/drm_crtc.h:1120:5: note: declared here
    int drm_crtc_init_with_planes(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_universal_plane_init':
   include/kcl/kcl_drm.h:227: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:68,
                    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:226: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:68,
                    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:238: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:9:0,
                    from drivers/gpu/drm/ttm/backport/backport.h:6,
                    from <command-line>:0:
   include/drm/drm_gem.h:386: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:238: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:9:0,
                    from drivers/gpu/drm/ttm/backport/backport.h:6,
                    from <command-line>:0:
   include/drm/drm_gem.h:386: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:238: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:9:0,
                    from drivers/gpu/drm/ttm/backport/backport.h:6,
                    from <command-line>:0:
   include/drm/drm_gem.h:386: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:281:8: error: redefinition of 'struct drm_format_name_buf'
    struct drm_format_name_buf {
           ^~~~~~~~~~~~~~~~~~~
   In file included from include/drm/drmP.h:69: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:313: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:313:9: warning: 'return' with a value, in function returning void
     return drm_gem_object_unreference_unlocked(obj);
            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/kcl/kcl_drm.h:310:20: note: declared here
    static inline void kcl_drm_gem_object_put_unlocked(struct drm_gem_object *obj)
                       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   cc1: some warnings being treated as errors

vim +313 include/kcl/kcl_drm.h

cc3188c9ec1202 Evan Quan           2017-05-11  309  
7e18f7a415538c Evan Quan           2019-02-18  310  static inline void kcl_drm_gem_object_put_unlocked(struct drm_gem_object *obj)
7e18f7a415538c Evan Quan           2019-02-18  311  {
c3612b68d1358e Anatoli Antonovitch 2018-09-24  312  #if !defined(HAVE_DRM_GEM_OBJECT_PUT_UNLOCKED)
7e18f7a415538c Evan Quan           2019-02-18 @313  	return drm_gem_object_unreference_unlocked(obj);
7e18f7a415538c Evan Quan           2019-02-18  314  #else
7e18f7a415538c Evan Quan           2019-02-18  315  	return drm_gem_object_put_unlocked(obj);
7e18f7a415538c Evan Quan           2019-02-18  316  #endif
7e18f7a415538c Evan Quan           2019-02-18  317  }
7e18f7a415538c Evan Quan           2019-02-18  318  

:::::: The code at line 313 was first introduced by commit
:::::: 7e18f7a415538c1bc14c60d30f7be8e5e2a50e1a drm/amdkcl: [4.10] kcl update for kcl_drm files conflicts

:::::: TO: Evan Quan <evan.quan at amd.com>
:::::: CC: Chengming Gui <Jack.Gui 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: 68191 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/dri-devel/attachments/20200111/6bb483ca/attachment-0001.gz>


More information about the dri-devel mailing list