From: kbuild test robot <lkp@intel.com>
To: changzhu <Changfeng.Zhu@amd.com>
Cc: Yifan Zhang <yifan1.zhang@amd.com>,
kbuild-all@lists.01.org, Jack Gui <Jack.Gui@amd.com>,
Feifei Xu <Feifei.Xu@amd.com>, tianci yin <tianci.yin@amd.com>,
Adam Yang <Adam1.Yang@amd.com>,
dri-devel@lists.freedesktop.org, Flora Cui <flora.cui@amd.com>,
Rui Teng <rui.teng@amd.com>
Subject: [radeon-alex:amd-19.50 2031/2680] include/kcl/kcl_mm.h:60:21: error: redefinition of 'kvmalloc'
Date: Thu, 9 Jan 2020 05:14:08 +0800 [thread overview]
Message-ID: <202001090503.YAEnwl2S%lkp@intel.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 28559 bytes --]
Hi changzhu,
FYI, the error/warning still remains.
tree: git://people.freedesktop.org/~agd5f/linux.git amd-19.50
head: f981f76437edab0861f3721c27f1c3cec5903dcc
commit: f12f9b802b6dd80fdee0b7c601b8b9d59a967556 [2031/2680] drm/amdkcl: Test if linux/overflow.h and struct_size exists
config: i386-allyesconfig (attached as .config)
compiler: gcc-7 (Debian 7.5.0-3) 7.5.0
reproduce:
git checkout f12f9b802b6dd80fdee0b7c601b8b9d59a967556
# 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@intel.com>
All errors (new ones prefixed by >>):
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:252: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:252: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:252: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:295: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:327: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:327:9: warning: 'return' with a value, in function returning void
return drm_gem_object_unreference_unlocked(obj);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/kcl/kcl_drm.h:324:20: note: declared here
static inline void kcl_drm_gem_object_put_unlocked(struct drm_gem_object *obj)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/kcl/kcl_drm.h: In function 'kcl_drm_atomic_get_old_crtc_state_before_commit':
include/kcl/kcl_drm.h:351:43: error: invalid type argument of '->' (have 'struct __drm_crtcs_state')
return state->crtcs[drm_crtc_index(crtc)]->state;
^~
include/kcl/kcl_drm.h: In function 'kcl_drm_atomic_get_new_crtc_state_after_commit':
include/kcl/kcl_drm.h:386:43: error: invalid type argument of '->' (have 'struct __drm_crtcs_state')
return state->crtcs[drm_crtc_index(crtc)]->state;
^~
include/kcl/kcl_drm.h: At top level:
include/kcl/kcl_drm.h:491:8: error: redefinition of 'struct drm_printer'
struct drm_printer {
^~~~~~~~~~~
In file included from include/drm/drm_mm.h:49:0,
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/drm/drm_print.h:70:8: note: originally defined here
struct drm_printer {
^~~~~~~~~~~
In file included from drivers/gpu/drm/ttm/backport/backport.h:6:0,
from <command-line>:0:
include/kcl/kcl_drm.h:497:6: error: conflicting types for 'drm_printf'
void drm_printf(struct drm_printer *p, const char *f, ...);
^~~~~~~~~~
In file included from include/drm/drm_mm.h:49:0,
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/drm/drm_print.h:86:6: note: previous declaration of 'drm_printf' was here
void drm_printf(struct drm_printer *p, const char *f, ...);
^~~~~~~~~~
In file included from drivers/gpu/drm/ttm/backport/backport.h:8:0,
from <command-line>:0:
>> include/kcl/kcl_mm.h:60: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:70: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:80: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:100: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:113: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: In function 'kcl_fence_get_rcu_safe':
include/kcl/kcl_fence.h:124:32: error: passing argument 1 of 'dma_fence_get_rcu_safe' from incompatible pointer type [-Werror=incompatible-pointer-types]
return dma_fence_get_rcu_safe(fencep);
^~~~~~
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:315:1: note: expected 'struct dma_fence **' but argument is of type 'struct fence **'
dma_fence_get_rcu_safe(struct dma_fence __rcu **fencep)
^~~~~~~~~~~~~~~~~~~~~~
In file included from drivers/gpu/drm/ttm/backport/backport.h:9:0,
from <command-line>:0:
include/kcl/kcl_fence.h:124:9: error: return from incompatible pointer type [-Werror=incompatible-pointer-types]
return dma_fence_get_rcu_safe(fencep);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/kcl/kcl_fence.h: At top level:
include/kcl/kcl_fence.h:129: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:135:7: error: 'struct dma_fence' has no member named 'status'
fence->status = error;
^~
cc1: some warnings being treated as errors
--
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:252: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:252: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:252: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:295: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:327: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:327:9: warning: 'return' with a value, in function returning void
return drm_gem_object_unreference_unlocked(obj);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/kcl/kcl_drm.h:324:20: note: declared here
static inline void kcl_drm_gem_object_put_unlocked(struct drm_gem_object *obj)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/kcl/kcl_drm.h: In function 'kcl_drm_atomic_get_old_crtc_state_before_commit':
include/kcl/kcl_drm.h:351:43: error: invalid type argument of '->' (have 'struct __drm_crtcs_state')
return state->crtcs[drm_crtc_index(crtc)]->state;
^~
include/kcl/kcl_drm.h: In function 'kcl_drm_atomic_get_new_crtc_state_after_commit':
include/kcl/kcl_drm.h:386:43: error: invalid type argument of '->' (have 'struct __drm_crtcs_state')
return state->crtcs[drm_crtc_index(crtc)]->state;
^~
include/kcl/kcl_drm.h: At top level:
include/kcl/kcl_drm.h:491:8: error: redefinition of 'struct drm_printer'
struct drm_printer {
^~~~~~~~~~~
In file included from include/drm/drm_mm.h:49:0,
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/drm/drm_print.h:70:8: note: originally defined here
struct drm_printer {
^~~~~~~~~~~
In file included from drivers/gpu/drm/ttm/backport/backport.h:6:0,
from <command-line>:0:
include/kcl/kcl_drm.h:497:6: error: conflicting types for 'drm_printf'
void drm_printf(struct drm_printer *p, const char *f, ...);
^~~~~~~~~~
In file included from include/drm/drm_mm.h:49:0,
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/drm/drm_print.h:86:6: note: previous declaration of 'drm_printf' was here
void drm_printf(struct drm_printer *p, const char *f, ...);
^~~~~~~~~~
In file included from drivers/gpu/drm/ttm/backport/backport.h:8:0,
from <command-line>:0:
>> include/kcl/kcl_mm.h:60: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:70: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:80: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:100: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:113: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: In function 'kcl_fence_get_rcu_safe':
include/kcl/kcl_fence.h:124:32: error: passing argument 1 of 'dma_fence_get_rcu_safe' from incompatible pointer type [-Werror=incompatible-pointer-types]
return dma_fence_get_rcu_safe(fencep);
^~~~~~
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:315:1: note: expected 'struct dma_fence **' but argument is of type 'struct fence **'
dma_fence_get_rcu_safe(struct dma_fence __rcu **fencep)
^~~~~~~~~~~~~~~~~~~~~~
In file included from drivers/gpu/drm/ttm/backport/backport.h:9:0,
from <command-line>:0:
include/kcl/kcl_fence.h:124:9: error: return from incompatible pointer type [-Werror=incompatible-pointer-types]
return dma_fence_get_rcu_safe(fencep);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/kcl/kcl_fence.h: At top level:
include/kcl/kcl_fence.h:129: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:135:7: error: 'struct dma_fence' has no member named 'status'
fence->status = error;
^~
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 +/kvmalloc +60 include/kcl/kcl_mm.h
b4f7d254be169a Junwei Zhang 2016-12-23 58
b8a1520bda5b72 Flora Cui 2019-08-19 59 #ifndef HAVE_KVZALLOC_KVMALLOC
b8a1520bda5b72 Flora Cui 2019-08-19 @60 static inline void *kvmalloc(size_t size, gfp_t flags)
b8a1520bda5b72 Flora Cui 2019-08-19 61 {
b8a1520bda5b72 Flora Cui 2019-08-19 62 void *out;
b4f7d254be169a Junwei Zhang 2016-12-23 63
b8a1520bda5b72 Flora Cui 2019-08-19 64 if (size > PAGE_SIZE)
b8a1520bda5b72 Flora Cui 2019-08-19 65 out = __vmalloc(size, flags, PAGE_KERNEL);
b8a1520bda5b72 Flora Cui 2019-08-19 66 else
b8a1520bda5b72 Flora Cui 2019-08-19 67 out = kmalloc(size, flags);
b8a1520bda5b72 Flora Cui 2019-08-19 68 return out;
b8a1520bda5b72 Flora Cui 2019-08-19 69 }
b8a1520bda5b72 Flora Cui 2019-08-19 @70 static inline void *kvzalloc(size_t size, gfp_t flags)
b8a1520bda5b72 Flora Cui 2019-08-19 71 {
b8a1520bda5b72 Flora Cui 2019-08-19 72 return kvmalloc(size, flags | __GFP_ZERO);
b8a1520bda5b72 Flora Cui 2019-08-19 73 }
b8a1520bda5b72 Flora Cui 2019-08-19 74 #endif /* HAVE_KVZALLOC_KVMALLOC */
b4f7d254be169a Junwei Zhang 2016-12-23 75
b8a1520bda5b72 Flora Cui 2019-08-19 76 #ifndef HAVE_KVFREE
b8a1520bda5b72 Flora Cui 2019-08-19 77 #ifdef HAVE_DRM_FREE_LARGE
b8a1520bda5b72 Flora Cui 2019-08-19 78 #define kvfree drm_free_large
b8a1520bda5b72 Flora Cui 2019-08-19 79 #else
b8a1520bda5b72 Flora Cui 2019-08-19 @80 static inline void kvfree(const void *addr)
b8a1520bda5b72 Flora Cui 2019-08-19 81 {
b8a1520bda5b72 Flora Cui 2019-08-19 82 if (is_vmalloc_addr(addr))
b8a1520bda5b72 Flora Cui 2019-08-19 83 vfree(addr);
b8a1520bda5b72 Flora Cui 2019-08-19 84 else
b8a1520bda5b72 Flora Cui 2019-08-19 85 kfree(addr);
b8a1520bda5b72 Flora Cui 2019-08-19 86 }
b8a1520bda5b72 Flora Cui 2019-08-19 87 #endif /* HAVE_DRM_FREE_LARGE */
b8a1520bda5b72 Flora Cui 2019-08-19 88 #endif /* HAVE_KVFREE */
b8a1520bda5b72 Flora Cui 2019-08-19 89
b8a1520bda5b72 Flora Cui 2019-08-19 90 #ifndef HAVE_KVMALLOC_ARRAY
b8a1520bda5b72 Flora Cui 2019-08-19 91 #if defined(HAVE_DRM_MALLOC_AB) && defined(HAVE_DRM_CALLOC_LARGE)
b8a1520bda5b72 Flora Cui 2019-08-19 92 static inline void *kvmalloc_array(size_t n, size_t size, gfp_t flags)
b8a1520bda5b72 Flora Cui 2019-08-19 93 {
b8a1520bda5b72 Flora Cui 2019-08-19 94 if (flags & __GFP_ZERO)
b8a1520bda5b72 Flora Cui 2019-08-19 95 return drm_calloc_large(n, size);
b8a1520bda5b72 Flora Cui 2019-08-19 96 else
b8a1520bda5b72 Flora Cui 2019-08-19 97 return drm_malloc_ab(n, size);
b8a1520bda5b72 Flora Cui 2019-08-19 98 }
b8a1520bda5b72 Flora Cui 2019-08-19 99 #else
b8a1520bda5b72 Flora Cui 2019-08-19 @100 static inline void *kvmalloc_array(size_t n, size_t size, gfp_t flags)
b8a1520bda5b72 Flora Cui 2019-08-19 101 {
b8a1520bda5b72 Flora Cui 2019-08-19 102 size_t bytes;
b8a1520bda5b72 Flora Cui 2019-08-19 103
b8a1520bda5b72 Flora Cui 2019-08-19 104 if (unlikely(check_mul_overflow(n, size, &bytes)))
b8a1520bda5b72 Flora Cui 2019-08-19 105 return NULL;
b8a1520bda5b72 Flora Cui 2019-08-19 106
b8a1520bda5b72 Flora Cui 2019-08-19 107 return kvmalloc(bytes, flags);
b8a1520bda5b72 Flora Cui 2019-08-19 108 }
b8a1520bda5b72 Flora Cui 2019-08-19 109 #endif /* HAVE_DRM_MALLOC_AB && HAVE_DRM_CALLOC_LARGE */
b8a1520bda5b72 Flora Cui 2019-08-19 110 #endif /* HAVE_KVMALLOC_ARRAY */
b4f7d254be169a Junwei Zhang 2016-12-23 111
b8a1520bda5b72 Flora Cui 2019-08-19 112 #ifndef HAVE_KVCALLOC
b8a1520bda5b72 Flora Cui 2019-08-19 @113 static inline void *kvcalloc(size_t n, size_t size, gfp_t flags)
b8a1520bda5b72 Flora Cui 2019-08-19 114 {
b8a1520bda5b72 Flora Cui 2019-08-19 115 return kvmalloc_array(n, size, flags | __GFP_ZERO);
b8a1520bda5b72 Flora Cui 2019-08-19 116 }
b8a1520bda5b72 Flora Cui 2019-08-19 117 #endif /* HAVE_KVCALLOC */
b4f7d254be169a Junwei Zhang 2016-12-23 118
:::::: The code at line 60 was first introduced by commit
:::::: b8a1520bda5b7226ae5b5a132e61d3a96231de0b drm/amdkcl: test whether memory alloc and free functions are available
:::::: TO: Flora Cui <flora.cui@amd.com>
:::::: CC: Flora Cui <flora.cui@amd.com>
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org Intel Corporation
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 68191 bytes --]
[-- Attachment #3: Type: text/plain, Size: 160 bytes --]
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
WARNING: multiple messages have this Message-ID (diff)
From: kbuild test robot <lkp@intel.com>
To: kbuild-all@lists.01.org
Subject: [radeon-alex:amd-19.50 2031/2680] include/kcl/kcl_mm.h:60:21: error: redefinition of 'kvmalloc'
Date: Thu, 09 Jan 2020 05:14:08 +0800 [thread overview]
Message-ID: <202001090503.YAEnwl2S%lkp@intel.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 29048 bytes --]
Hi changzhu,
FYI, the error/warning still remains.
tree: git://people.freedesktop.org/~agd5f/linux.git amd-19.50
head: f981f76437edab0861f3721c27f1c3cec5903dcc
commit: f12f9b802b6dd80fdee0b7c601b8b9d59a967556 [2031/2680] drm/amdkcl: Test if linux/overflow.h and struct_size exists
config: i386-allyesconfig (attached as .config)
compiler: gcc-7 (Debian 7.5.0-3) 7.5.0
reproduce:
git checkout f12f9b802b6dd80fdee0b7c601b8b9d59a967556
# 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@intel.com>
All errors (new ones prefixed by >>):
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:252: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:252: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:252: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:295: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:327: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:327:9: warning: 'return' with a value, in function returning void
return drm_gem_object_unreference_unlocked(obj);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/kcl/kcl_drm.h:324:20: note: declared here
static inline void kcl_drm_gem_object_put_unlocked(struct drm_gem_object *obj)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/kcl/kcl_drm.h: In function 'kcl_drm_atomic_get_old_crtc_state_before_commit':
include/kcl/kcl_drm.h:351:43: error: invalid type argument of '->' (have 'struct __drm_crtcs_state')
return state->crtcs[drm_crtc_index(crtc)]->state;
^~
include/kcl/kcl_drm.h: In function 'kcl_drm_atomic_get_new_crtc_state_after_commit':
include/kcl/kcl_drm.h:386:43: error: invalid type argument of '->' (have 'struct __drm_crtcs_state')
return state->crtcs[drm_crtc_index(crtc)]->state;
^~
include/kcl/kcl_drm.h: At top level:
include/kcl/kcl_drm.h:491:8: error: redefinition of 'struct drm_printer'
struct drm_printer {
^~~~~~~~~~~
In file included from include/drm/drm_mm.h:49:0,
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/drm/drm_print.h:70:8: note: originally defined here
struct drm_printer {
^~~~~~~~~~~
In file included from drivers/gpu/drm/ttm/backport/backport.h:6:0,
from <command-line>:0:
include/kcl/kcl_drm.h:497:6: error: conflicting types for 'drm_printf'
void drm_printf(struct drm_printer *p, const char *f, ...);
^~~~~~~~~~
In file included from include/drm/drm_mm.h:49:0,
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/drm/drm_print.h:86:6: note: previous declaration of 'drm_printf' was here
void drm_printf(struct drm_printer *p, const char *f, ...);
^~~~~~~~~~
In file included from drivers/gpu/drm/ttm/backport/backport.h:8:0,
from <command-line>:0:
>> include/kcl/kcl_mm.h:60: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:70: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:80: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:100: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:113: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: In function 'kcl_fence_get_rcu_safe':
include/kcl/kcl_fence.h:124:32: error: passing argument 1 of 'dma_fence_get_rcu_safe' from incompatible pointer type [-Werror=incompatible-pointer-types]
return dma_fence_get_rcu_safe(fencep);
^~~~~~
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:315:1: note: expected 'struct dma_fence **' but argument is of type 'struct fence **'
dma_fence_get_rcu_safe(struct dma_fence __rcu **fencep)
^~~~~~~~~~~~~~~~~~~~~~
In file included from drivers/gpu/drm/ttm/backport/backport.h:9:0,
from <command-line>:0:
include/kcl/kcl_fence.h:124:9: error: return from incompatible pointer type [-Werror=incompatible-pointer-types]
return dma_fence_get_rcu_safe(fencep);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/kcl/kcl_fence.h: At top level:
include/kcl/kcl_fence.h:129: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:135:7: error: 'struct dma_fence' has no member named 'status'
fence->status = error;
^~
cc1: some warnings being treated as errors
--
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:252: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:252: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:252: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:295: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:327: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:327:9: warning: 'return' with a value, in function returning void
return drm_gem_object_unreference_unlocked(obj);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/kcl/kcl_drm.h:324:20: note: declared here
static inline void kcl_drm_gem_object_put_unlocked(struct drm_gem_object *obj)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/kcl/kcl_drm.h: In function 'kcl_drm_atomic_get_old_crtc_state_before_commit':
include/kcl/kcl_drm.h:351:43: error: invalid type argument of '->' (have 'struct __drm_crtcs_state')
return state->crtcs[drm_crtc_index(crtc)]->state;
^~
include/kcl/kcl_drm.h: In function 'kcl_drm_atomic_get_new_crtc_state_after_commit':
include/kcl/kcl_drm.h:386:43: error: invalid type argument of '->' (have 'struct __drm_crtcs_state')
return state->crtcs[drm_crtc_index(crtc)]->state;
^~
include/kcl/kcl_drm.h: At top level:
include/kcl/kcl_drm.h:491:8: error: redefinition of 'struct drm_printer'
struct drm_printer {
^~~~~~~~~~~
In file included from include/drm/drm_mm.h:49:0,
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/drm/drm_print.h:70:8: note: originally defined here
struct drm_printer {
^~~~~~~~~~~
In file included from drivers/gpu/drm/ttm/backport/backport.h:6:0,
from <command-line>:0:
include/kcl/kcl_drm.h:497:6: error: conflicting types for 'drm_printf'
void drm_printf(struct drm_printer *p, const char *f, ...);
^~~~~~~~~~
In file included from include/drm/drm_mm.h:49:0,
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/drm/drm_print.h:86:6: note: previous declaration of 'drm_printf' was here
void drm_printf(struct drm_printer *p, const char *f, ...);
^~~~~~~~~~
In file included from drivers/gpu/drm/ttm/backport/backport.h:8:0,
from <command-line>:0:
>> include/kcl/kcl_mm.h:60: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:70: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:80: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:100: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:113: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: In function 'kcl_fence_get_rcu_safe':
include/kcl/kcl_fence.h:124:32: error: passing argument 1 of 'dma_fence_get_rcu_safe' from incompatible pointer type [-Werror=incompatible-pointer-types]
return dma_fence_get_rcu_safe(fencep);
^~~~~~
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:315:1: note: expected 'struct dma_fence **' but argument is of type 'struct fence **'
dma_fence_get_rcu_safe(struct dma_fence __rcu **fencep)
^~~~~~~~~~~~~~~~~~~~~~
In file included from drivers/gpu/drm/ttm/backport/backport.h:9:0,
from <command-line>:0:
include/kcl/kcl_fence.h:124:9: error: return from incompatible pointer type [-Werror=incompatible-pointer-types]
return dma_fence_get_rcu_safe(fencep);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/kcl/kcl_fence.h: At top level:
include/kcl/kcl_fence.h:129: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:135:7: error: 'struct dma_fence' has no member named 'status'
fence->status = error;
^~
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 +/kvmalloc +60 include/kcl/kcl_mm.h
b4f7d254be169a Junwei Zhang 2016-12-23 58
b8a1520bda5b72 Flora Cui 2019-08-19 59 #ifndef HAVE_KVZALLOC_KVMALLOC
b8a1520bda5b72 Flora Cui 2019-08-19 @60 static inline void *kvmalloc(size_t size, gfp_t flags)
b8a1520bda5b72 Flora Cui 2019-08-19 61 {
b8a1520bda5b72 Flora Cui 2019-08-19 62 void *out;
b4f7d254be169a Junwei Zhang 2016-12-23 63
b8a1520bda5b72 Flora Cui 2019-08-19 64 if (size > PAGE_SIZE)
b8a1520bda5b72 Flora Cui 2019-08-19 65 out = __vmalloc(size, flags, PAGE_KERNEL);
b8a1520bda5b72 Flora Cui 2019-08-19 66 else
b8a1520bda5b72 Flora Cui 2019-08-19 67 out = kmalloc(size, flags);
b8a1520bda5b72 Flora Cui 2019-08-19 68 return out;
b8a1520bda5b72 Flora Cui 2019-08-19 69 }
b8a1520bda5b72 Flora Cui 2019-08-19 @70 static inline void *kvzalloc(size_t size, gfp_t flags)
b8a1520bda5b72 Flora Cui 2019-08-19 71 {
b8a1520bda5b72 Flora Cui 2019-08-19 72 return kvmalloc(size, flags | __GFP_ZERO);
b8a1520bda5b72 Flora Cui 2019-08-19 73 }
b8a1520bda5b72 Flora Cui 2019-08-19 74 #endif /* HAVE_KVZALLOC_KVMALLOC */
b4f7d254be169a Junwei Zhang 2016-12-23 75
b8a1520bda5b72 Flora Cui 2019-08-19 76 #ifndef HAVE_KVFREE
b8a1520bda5b72 Flora Cui 2019-08-19 77 #ifdef HAVE_DRM_FREE_LARGE
b8a1520bda5b72 Flora Cui 2019-08-19 78 #define kvfree drm_free_large
b8a1520bda5b72 Flora Cui 2019-08-19 79 #else
b8a1520bda5b72 Flora Cui 2019-08-19 @80 static inline void kvfree(const void *addr)
b8a1520bda5b72 Flora Cui 2019-08-19 81 {
b8a1520bda5b72 Flora Cui 2019-08-19 82 if (is_vmalloc_addr(addr))
b8a1520bda5b72 Flora Cui 2019-08-19 83 vfree(addr);
b8a1520bda5b72 Flora Cui 2019-08-19 84 else
b8a1520bda5b72 Flora Cui 2019-08-19 85 kfree(addr);
b8a1520bda5b72 Flora Cui 2019-08-19 86 }
b8a1520bda5b72 Flora Cui 2019-08-19 87 #endif /* HAVE_DRM_FREE_LARGE */
b8a1520bda5b72 Flora Cui 2019-08-19 88 #endif /* HAVE_KVFREE */
b8a1520bda5b72 Flora Cui 2019-08-19 89
b8a1520bda5b72 Flora Cui 2019-08-19 90 #ifndef HAVE_KVMALLOC_ARRAY
b8a1520bda5b72 Flora Cui 2019-08-19 91 #if defined(HAVE_DRM_MALLOC_AB) && defined(HAVE_DRM_CALLOC_LARGE)
b8a1520bda5b72 Flora Cui 2019-08-19 92 static inline void *kvmalloc_array(size_t n, size_t size, gfp_t flags)
b8a1520bda5b72 Flora Cui 2019-08-19 93 {
b8a1520bda5b72 Flora Cui 2019-08-19 94 if (flags & __GFP_ZERO)
b8a1520bda5b72 Flora Cui 2019-08-19 95 return drm_calloc_large(n, size);
b8a1520bda5b72 Flora Cui 2019-08-19 96 else
b8a1520bda5b72 Flora Cui 2019-08-19 97 return drm_malloc_ab(n, size);
b8a1520bda5b72 Flora Cui 2019-08-19 98 }
b8a1520bda5b72 Flora Cui 2019-08-19 99 #else
b8a1520bda5b72 Flora Cui 2019-08-19 @100 static inline void *kvmalloc_array(size_t n, size_t size, gfp_t flags)
b8a1520bda5b72 Flora Cui 2019-08-19 101 {
b8a1520bda5b72 Flora Cui 2019-08-19 102 size_t bytes;
b8a1520bda5b72 Flora Cui 2019-08-19 103
b8a1520bda5b72 Flora Cui 2019-08-19 104 if (unlikely(check_mul_overflow(n, size, &bytes)))
b8a1520bda5b72 Flora Cui 2019-08-19 105 return NULL;
b8a1520bda5b72 Flora Cui 2019-08-19 106
b8a1520bda5b72 Flora Cui 2019-08-19 107 return kvmalloc(bytes, flags);
b8a1520bda5b72 Flora Cui 2019-08-19 108 }
b8a1520bda5b72 Flora Cui 2019-08-19 109 #endif /* HAVE_DRM_MALLOC_AB && HAVE_DRM_CALLOC_LARGE */
b8a1520bda5b72 Flora Cui 2019-08-19 110 #endif /* HAVE_KVMALLOC_ARRAY */
b4f7d254be169a Junwei Zhang 2016-12-23 111
b8a1520bda5b72 Flora Cui 2019-08-19 112 #ifndef HAVE_KVCALLOC
b8a1520bda5b72 Flora Cui 2019-08-19 @113 static inline void *kvcalloc(size_t n, size_t size, gfp_t flags)
b8a1520bda5b72 Flora Cui 2019-08-19 114 {
b8a1520bda5b72 Flora Cui 2019-08-19 115 return kvmalloc_array(n, size, flags | __GFP_ZERO);
b8a1520bda5b72 Flora Cui 2019-08-19 116 }
b8a1520bda5b72 Flora Cui 2019-08-19 117 #endif /* HAVE_KVCALLOC */
b4f7d254be169a Junwei Zhang 2016-12-23 118
:::::: The code at line 60 was first introduced by commit
:::::: b8a1520bda5b7226ae5b5a132e61d3a96231de0b drm/amdkcl: test whether memory alloc and free functions are available
:::::: TO: Flora Cui <flora.cui@amd.com>
:::::: CC: Flora Cui <flora.cui@amd.com>
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org Intel Corporation
[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 68191 bytes --]
next reply other threads:[~2020-01-08 21:14 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-01-08 21:14 kbuild test robot [this message]
2020-01-08 21:14 ` [radeon-alex:amd-19.50 2031/2680] include/kcl/kcl_mm.h:60:21: error: redefinition of 'kvmalloc' kbuild test robot
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=202001090503.YAEnwl2S%lkp@intel.com \
--to=lkp@intel.com \
--cc=Adam1.Yang@amd.com \
--cc=Changfeng.Zhu@amd.com \
--cc=Feifei.Xu@amd.com \
--cc=Jack.Gui@amd.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=flora.cui@amd.com \
--cc=kbuild-all@lists.01.org \
--cc=rui.teng@amd.com \
--cc=tianci.yin@amd.com \
--cc=yifan1.zhang@amd.com \
/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.