[radeon-alex:vega10-drop0509 1381/1987] drivers/gpu/drm/radeon/radeon_kfd.c:1426:32: warning: cast to pointer from integer of different size
kbuild test robot
fengguang.wu at intel.com
Thu May 11 18:40:18 UTC 2017
tree: git://people.freedesktop.org/~agd5f/linux.git vega10-drop0509
head: b97044091f42cad26368a402c31af13e1319c7ab
commit: 8e8443a9512d6794e1715bad20dad1fd2e6cd045 [1381/1987] radeon_kfd.c copied
config: i386-allmodconfig (attached as .config)
compiler: gcc-6 (Debian 6.2.0-3) 6.2.0 20160901
reproduce:
git checkout 8e8443a9512d6794e1715bad20dad1fd2e6cd045
# save the attached .config to linux build tree
make ARCH=i386
All warnings (new ones prefixed by >>):
drivers/gpu/drm/radeon/radeon_kfd.c: In function 'get_pdd_from_buffer_object':
drivers/gpu/drm/radeon/radeon_kfd.c:219:22: error: 'struct radeon_bo' has no member named 'pdd'; did you mean 'pid'?
return mem->data2.bo->pdd;
^~
drivers/gpu/drm/radeon/radeon_kfd.c: In function 'open_graphic_handle':
drivers/gpu/drm/radeon/radeon_kfd.c:516:34: error: passing argument 1 of 'drm_gem_object_lookup' from incompatible pointer type [-Werror=incompatible-pointer-types]
gem_obj = drm_gem_object_lookup(rdev->ddev, filp->private_data, handle);
^~~~
In file included from drivers/gpu/drm/radeon/radeon.h:77:0,
from drivers/gpu/drm/radeon/radeon_kfd.c:27:
include/drm/drm_gem.h:241: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);
^~~~~~~~~~~~~~~~~~~~~
drivers/gpu/drm/radeon/radeon_kfd.c:516:46: warning: passing argument 2 of 'drm_gem_object_lookup' makes integer from pointer without a cast [-Wint-conversion]
gem_obj = drm_gem_object_lookup(rdev->ddev, filp->private_data, handle);
^~~~
In file included from drivers/gpu/drm/radeon/radeon.h:77:0,
from drivers/gpu/drm/radeon/radeon_kfd.c:27:
include/drm/drm_gem.h:241:24: note: expected 'u32 {aka unsigned int}' but argument is of type 'void *'
struct drm_gem_object *drm_gem_object_lookup(struct drm_file *filp, u32 handle);
^~~~~~~~~~~~~~~~~~~~~
drivers/gpu/drm/radeon/radeon_kfd.c:516:12: error: too many arguments to function 'drm_gem_object_lookup'
gem_obj = drm_gem_object_lookup(rdev->ddev, filp->private_data, handle);
^~~~~~~~~~~~~~~~~~~~~
In file included from drivers/gpu/drm/radeon/radeon.h:77:0,
from drivers/gpu/drm/radeon/radeon_kfd.c:27:
include/drm/drm_gem.h:241:24: note: declared here
struct drm_gem_object *drm_gem_object_lookup(struct drm_file *filp, u32 handle);
^~~~~~~~~~~~~~~~~~~~~
drivers/gpu/drm/radeon/radeon_kfd.c: In function 'map_bo_to_gpuvm':
drivers/gpu/drm/radeon/radeon_kfd.c:1271:9: error: too many arguments to function 'ttm_bo_wait'
ret = ttm_bo_wait(&bo->tbo, true, false, false);
^~~~~~~~~~~
In file included from drivers/gpu/drm/radeon/radeon.h:71:0,
from drivers/gpu/drm/radeon/radeon_kfd.c:27:
include/drm/ttm/ttm_bo_api.h:292:12: note: declared here
extern int ttm_bo_wait(struct ttm_buffer_object *bo,
^~~~~~~~~~~
drivers/gpu/drm/radeon/radeon_kfd.c: In function 'write_config_static_mem':
drivers/gpu/drm/radeon/radeon_kfd.c:1368:26: error: 'SH_STATIC_MEM_CONFIG__SWIZZLE_ENABLE__SHIFT' undeclared (first use in this function)
reg = swizzle_enable << SH_STATIC_MEM_CONFIG__SWIZZLE_ENABLE__SHIFT |
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/gpu/drm/radeon/radeon_kfd.c:1368:26: note: each undeclared identifier is reported only once for each function it appears in
drivers/gpu/drm/radeon/radeon_kfd.c:1369:19: error: 'SH_STATIC_MEM_CONFIG__ELEMENT_SIZE__SHIFT' undeclared (first use in this function)
element_size << SH_STATIC_MEM_CONFIG__ELEMENT_SIZE__SHIFT |
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/gpu/drm/radeon/radeon_kfd.c:1370:19: error: 'SH_STATIC_MEM_CONFIG__INDEX_STRIDE__SHIFT' undeclared (first use in this function)
index_stride << SH_STATIC_MEM_CONFIG__INDEX_STRIDE__SHIFT |
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/gpu/drm/radeon/radeon_kfd.c:1371:19: error: 'SH_STATIC_MEM_CONFIG__PRIVATE_MTYPE__SHIFT' undeclared (first use in this function)
index_stride << SH_STATIC_MEM_CONFIG__PRIVATE_MTYPE__SHIFT;
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from drivers/gpu/drm/radeon/radeon_kfd.c:27:0:
drivers/gpu/drm/radeon/radeon_kfd.c: In function 'alloc_memory_of_scratch':
drivers/gpu/drm/radeon/radeon_kfd.c:1382:9: error: 'SH_HIDDEN_PRIVATE_BASE_VMID' undeclared (first use in this function)
WREG32(SH_HIDDEN_PRIVATE_BASE_VMID, va);
^
drivers/gpu/drm/radeon/radeon.h:2541:44: note: in definition of macro 'WREG32'
#define WREG32(reg, v) r100_mm_wreg(rdev, (reg), (v), false)
^~~
drivers/gpu/drm/radeon/radeon_kfd.c: In function 'alloc_memory_of_gpu':
drivers/gpu/drm/radeon/radeon_kfd.c:1421:4: error: 'struct radeon_bo' has no member named 'pdd'; did you mean 'pid'?
bo->pdd = pdd;
^~
In file included from include/linux/printk.h:305:0,
from include/linux/kernel.h:13,
from include/linux/list.h:8,
from include/linux/module.h:9,
from drivers/gpu/drm/radeon/radeon_kfd.c:23:
>> drivers/gpu/drm/radeon/radeon_kfd.c:1426:32: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
pr_debug("Set BO to VA %p\n", (void *) va);
^
include/linux/dynamic_debug.h:127:10: note: in definition of macro 'dynamic_pr_debug'
##__VA_ARGS__); \
^~~~~~~~~~~
>> drivers/gpu/drm/radeon/radeon_kfd.c:1426:2: note: in expansion of macro 'pr_debug'
pr_debug("Set BO to VA %p\n", (void *) va);
^~~~~~~~
drivers/gpu/drm/radeon/radeon_kfd.c: In function 'set_num_of_requests':
drivers/gpu/drm/radeon/radeon_kfd.c:1619:29: error: 'ATC_ATS_DEBUG' undeclared (first use in this function)
value = read_register(dev, ATC_ATS_DEBUG);
^~~~~~~~~~~~~
drivers/gpu/drm/radeon/radeon_kfd.c:1620:12: error: 'NUM_REQUESTS_AT_ERR_MASK' undeclared (first use in this function)
value &= ~NUM_REQUESTS_AT_ERR_MASK;
^~~~~~~~~~~~~~~~~~~~~~~~
drivers/gpu/drm/radeon/radeon_kfd.c:1621:11: error: implicit declaration of function 'NUM_REQUESTS_AT_ERR' [-Werror=implicit-function-declaration]
value |= NUM_REQUESTS_AT_ERR(num_of_req);
^~~~~~~~~~~~~~~~~~~
drivers/gpu/drm/radeon/radeon_kfd.c: In function 'get_cu_info':
drivers/gpu/drm/radeon/radeon_kfd.c:1629:24: error: storage size of 'rcu_info' isn't known
struct radeon_cu_info rcu_info;
^~~~~~~~
drivers/gpu/drm/radeon/radeon_kfd.c:1634:16: error: 'struct radeon_asic' has no member named 'get_cu_info'
if (rdev->asic->get_cu_info == NULL)
^~
drivers/gpu/drm/radeon/radeon_kfd.c:1638:12: error: 'struct radeon_asic' has no member named 'get_cu_info'
rdev->asic->get_cu_info(rdev, &rcu_info);
^~
drivers/gpu/drm/radeon/radeon_kfd.c:1629:24: warning: unused variable 'rcu_info' [-Wunused-variable]
struct radeon_cu_info rcu_info;
^~~~~~~~
drivers/gpu/drm/radeon/radeon_kfd.c: In function 'get_pdd_from_buffer_object':
drivers/gpu/drm/radeon/radeon_kfd.c:220:1: warning: control reaches end of non-void function [-Wreturn-type]
}
^
cc1: some warnings being treated as errors
vim +1426 drivers/gpu/drm/radeon/radeon_kfd.c
1415 pr_err("amdkfd: Failed to create BO object on VRAM. ret == %d\n",
1416 ret);
1417 goto err_bo_create;
1418 }
1419
1420 pr_debug("Created BO on VRAM with size %zu bytes\n", size);
> 1421 bo->pdd = pdd;
1422 ret = add_bo_to_vm(rdev, va, vm, bo, &bo_va);
1423 if (ret != 0)
1424 goto err_map;
1425
> 1426 pr_debug("Set BO to VA %p\n", (void *) va);
1427
1428 (*mem)->data2.bo = bo;
1429 (*mem)->data2.bo_va = bo_va;
---
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: 56846 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/dri-devel/attachments/20170512/519b5d71/attachment-0001.gz>
More information about the dri-devel
mailing list