[radeon-alex:amd-staging-drm-next 451/607] drivers/gpu/drm/amd/amdgpu/../powerplay/smu_v11_0.c:60:31: sparse: warning: cast to restricted __le32
kbuild test robot
lkp at intel.com
Thu Feb 28 05:49:47 UTC 2019
tree: git://people.freedesktop.org/~agd5f/linux.git amd-staging-drm-next
head: 9bf083e6426b8df943f0da4a7ef8d8f407a26e9f
commit: 58560ce0c438137ef4dca63fabf58a16dbf35c19 [451/607] drm/amd/powerplay: init microcode for smu11
reproduce:
# apt-get install sparse
git checkout 58560ce0c438137ef4dca63fabf58a16dbf35c19
make ARCH=x86_64 allmodconfig
make C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__'
All warnings (new ones prefixed by >>):
>> drivers/gpu/drm/amd/amdgpu/../powerplay/smu_v11_0.c:60:31: sparse: warning: cast to restricted __le32
drivers/gpu/drm/amd/amdgpu/../powerplay/smu_v11_0.c:68:25: sparse: warning: cast to restricted __le32
drivers/gpu/drm/amd/amdgpu/../powerplay/smu_v11_0.c:68:25: sparse: warning: cast to restricted __le32
drivers/gpu/drm/amd/amdgpu/../powerplay/smu_v11_0.c:68:25: sparse: warning: cast to restricted __le32
vim +60 drivers/gpu/drm/amd/amdgpu/../powerplay/smu_v11_0.c
30
31 static int smu_v11_0_init_microcode(struct smu_context *smu)
32 {
33 struct amdgpu_device *adev = smu->adev;
34 const char *chip_name;
35 char fw_name[30];
36 int err = 0;
37 const struct smc_firmware_header_v1_0 *hdr;
38 const struct common_firmware_header *header;
39 struct amdgpu_firmware_info *ucode = NULL;
40
41 switch (adev->asic_type) {
42 case CHIP_VEGA20:
43 chip_name = "vega20";
44 break;
45 default:
46 BUG();
47 }
48
49 snprintf(fw_name, sizeof(fw_name), "amdgpu/%s_smc.bin", chip_name);
50
51 err = request_firmware(&adev->pm.fw, fw_name, adev->dev);
52 if (err)
53 goto out;
54 err = amdgpu_ucode_validate(adev->pm.fw);
55 if (err)
56 goto out;
57
58 hdr = (const struct smc_firmware_header_v1_0 *) adev->pm.fw->data;
59 amdgpu_ucode_print_smc_hdr(&hdr->header);
> 60 adev->pm.fw_version = le32_to_cpu(hdr->header.ucode_version);
61
62 if (adev->firmware.load_type == AMDGPU_FW_LOAD_PSP) {
63 ucode = &adev->firmware.ucode[AMDGPU_UCODE_ID_SMC];
64 ucode->ucode_id = AMDGPU_UCODE_ID_SMC;
65 ucode->fw = adev->pm.fw;
66 header = (const struct common_firmware_header *)ucode->fw->data;
67 adev->firmware.fw_size +=
68 ALIGN(le32_to_cpu(header->ucode_size_bytes), PAGE_SIZE);
69 }
70
71 out:
72 if (err) {
73 DRM_ERROR("smu_v11_0: Failed to load firmware \"%s\"\n",
74 fw_name);
75 release_firmware(adev->pm.fw);
76 adev->pm.fw = NULL;
77 }
78 return err;
79 }
80
---
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: 67208 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/dri-devel/attachments/20190228/9e928ce6/attachment-0001.gz>
More information about the dri-devel
mailing list