[radeon-alex:drm-next-4.15 33/73] drivers/gpu//drm/amd/amdgpu/amdgpu_virt.c:335:20: error: dereferencing pointer to incomplete type
kbuild test robot
fengguang.wu at intel.com
Sun Oct 22 01:13:28 UTC 2017
tree: git://people.freedesktop.org/~agd5f/linux.git drm-next-4.15
head: 96687ec0bb478088cb6941a7dca3bb6808a19313
commit: 2dc8f81e4f822cfe8f6475da968ab2dd5881b8d8 [33/73] drm/amdgpu: SR-IOV data exchange between PF&VF
config: x86_64-randconfig-ws0-10220652 (attached as .config)
compiler: gcc-4.8 (Debian 4.8.4-1) 4.8.4
reproduce:
git checkout 2dc8f81e4f822cfe8f6475da968ab2dd5881b8d8
# save the attached .config to linux build tree
make ARCH=x86_64
All errors (new ones prefixed by >>):
In file included from arch/x86/include/asm/atomic.h:4:0,
from include/linux/atomic.h:4,
from drivers/gpu//drm/amd/amdgpu/amdgpu.h:31,
from drivers/gpu//drm/amd/amdgpu/amdgpu_virt.c:24:
drivers/gpu//drm/amd/amdgpu/amdgpu_virt.c: In function 'amdgpu_virt_init_data_exchange':
>> drivers/gpu//drm/amd/amdgpu/amdgpu_virt.c:335:20: error: dereferencing pointer to incomplete type
if (THIS_MODULE->version != NULL)
^
include/linux/compiler.h:156:30: note: in definition of macro '__trace_if'
if (__builtin_constant_p(!!(cond)) ? !!(cond) : \
^
drivers/gpu//drm/amd/amdgpu/amdgpu_virt.c:335:5: note: in expansion of macro 'if'
if (THIS_MODULE->version != NULL)
^
>> drivers/gpu//drm/amd/amdgpu/amdgpu_virt.c:335:20: error: dereferencing pointer to incomplete type
if (THIS_MODULE->version != NULL)
^
include/linux/compiler.h:156:42: note: in definition of macro '__trace_if'
if (__builtin_constant_p(!!(cond)) ? !!(cond) : \
^
drivers/gpu//drm/amd/amdgpu/amdgpu_virt.c:335:5: note: in expansion of macro 'if'
if (THIS_MODULE->version != NULL)
^
>> drivers/gpu//drm/amd/amdgpu/amdgpu_virt.c:335:20: error: dereferencing pointer to incomplete type
if (THIS_MODULE->version != NULL)
^
include/linux/compiler.h:167:16: note: in definition of macro '__trace_if'
______r = !!(cond); \
^
drivers/gpu//drm/amd/amdgpu/amdgpu_virt.c:335:5: note: in expansion of macro 'if'
if (THIS_MODULE->version != NULL)
^
drivers/gpu//drm/amd/amdgpu/amdgpu_virt.c:336:29: error: dereferencing pointer to incomplete type
strcpy(str, THIS_MODULE->version);
^
vim +335 drivers/gpu//drm/amd/amdgpu/amdgpu_virt.c
298
299 void amdgpu_virt_init_data_exchange(struct amdgpu_device *adev)
300 {
301 uint32_t pf2vf_ver = 0;
302 uint32_t pf2vf_size = 0;
303 uint32_t checksum = 0;
304 uint32_t checkval;
305 char *str;
306
307 adev->virt.fw_reserve.p_pf2vf = NULL;
308 adev->virt.fw_reserve.p_vf2pf = NULL;
309
310 if (adev->fw_vram_usage.va != NULL) {
311 adev->virt.fw_reserve.p_pf2vf =
312 (struct amdgim_pf2vf_info_header *)(
313 adev->fw_vram_usage.va + AMDGIM_DATAEXCHANGE_OFFSET);
314 pf2vf_ver = adev->virt.fw_reserve.p_pf2vf->version;
315 AMDGPU_FW_VRAM_PF2VF_READ(adev, header.size, &pf2vf_size);
316 AMDGPU_FW_VRAM_PF2VF_READ(adev, checksum, &checksum);
317
318 /* pf2vf message must be in 4K */
319 if (pf2vf_size > 0 && pf2vf_size < 4096) {
320 checkval = amdgpu_virt_fw_reserve_get_checksum(
321 adev->virt.fw_reserve.p_pf2vf, pf2vf_size,
322 adev->virt.fw_reserve.checksum_key, checksum);
323 if (checkval == checksum) {
324 adev->virt.fw_reserve.p_vf2pf =
325 ((void *)adev->virt.fw_reserve.p_pf2vf +
326 pf2vf_size);
327 memset((void *)adev->virt.fw_reserve.p_vf2pf, 0,
328 sizeof(amdgim_vf2pf_info));
329 AMDGPU_FW_VRAM_VF2PF_WRITE(adev, header.version,
330 AMDGPU_FW_VRAM_VF2PF_VER);
331 AMDGPU_FW_VRAM_VF2PF_WRITE(adev, header.size,
332 sizeof(amdgim_vf2pf_info));
333 AMDGPU_FW_VRAM_VF2PF_READ(adev, driver_version,
334 &str);
> 335 if (THIS_MODULE->version != NULL)
336 strcpy(str, THIS_MODULE->version);
337 else
338 strcpy(str, "N/A");
339 AMDGPU_FW_VRAM_VF2PF_WRITE(adev, driver_cert,
340 0);
341 AMDGPU_FW_VRAM_VF2PF_WRITE(adev, checksum,
342 amdgpu_virt_fw_reserve_get_checksum(
343 adev->virt.fw_reserve.p_vf2pf,
344 pf2vf_size,
345 adev->virt.fw_reserve.checksum_key, 0));
346 }
347 }
348 }
349 }
350
---
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: 27714 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/dri-devel/attachments/20171022/725df6a1/attachment-0001.gz>
More information about the dri-devel
mailing list