[radeon-alex:drm-next-4.15-wip 32/47] drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c:335:20: error: dereferencing pointer to incomplete type

kbuild test robot fengguang.wu at intel.com
Fri Oct 13 02:27:35 UTC 2017


tree:   git://people.freedesktop.org/~agd5f/linux.git drm-next-4.15-wip
head:   1dffdb582aecb97a50f6a7feeb58f23488cd7ed6
commit: 6b3dbb0ca422ae70e44444c6d8fd273d5007026b [32/47] drm/amdgpu: SR-IOV data exchange between PF&VF
config: i386-randconfig-i0-201741 (attached as .config)
compiler: gcc-4.8 (Debian 4.8.4-1) 4.8.4
reproduce:
        git checkout 6b3dbb0ca422ae70e44444c6d8fd273d5007026b
        # save the attached .config to linux build tree
        make ARCH=i386 

All errors (new ones prefixed by >>):

   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)
                       ^
   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: 25315 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/dri-devel/attachments/20171013/ebd0f4c3/attachment-0001.gz>


More information about the dri-devel mailing list