CC: [email protected]
BCC: [email protected]
CC: [email protected]
TO: Hawking Zhang <[email protected]>
CC: Alex Deucher <[email protected]>
CC: Wenhui Sheng <[email protected]>

tree:   https://gitlab.freedesktop.org/agd5f/linux.git drm-next
head:   3170f5f234272247989fafee4cba4cbbc822631c
commit: 3d879e81f0f9ed5d33b5eda0fe5226c884bb8073 [429/599] drm/amdgpu: add init 
support for GFX11 (v2)
:::::: branch date: 2 days ago
:::::: commit date: 4 days ago
config: csky-randconfig-m031-20220508 
(https://download.01.org/0day-ci/archive/20220508/[email protected]/config)
compiler: csky-linux-gcc (GCC) 11.3.0

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <[email protected]>
Reported-by: Dan Carpenter <[email protected]>

smatch warnings:
drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c:1278 
gfx_v11_0_rlc_backdoor_autoload_copy_ucode() warn: should '1 << id' be a 64 bit 
type?

vim +1278 drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c

3d879e81f0f9ed Hawking Zhang 2022-04-13  1249  
3d879e81f0f9ed Hawking Zhang 2022-04-13  1250  static void 
gfx_v11_0_rlc_backdoor_autoload_copy_ucode(struct amdgpu_device *adev,
3d879e81f0f9ed Hawking Zhang 2022-04-13  1251                                   
      SOC21_FIRMWARE_ID id,
3d879e81f0f9ed Hawking Zhang 2022-04-13  1252                                   
      const void *fw_data,
3d879e81f0f9ed Hawking Zhang 2022-04-13  1253                                   
      uint32_t fw_size,
3d879e81f0f9ed Hawking Zhang 2022-04-13  1254                                   
      uint32_t *fw_autoload_mask)
3d879e81f0f9ed Hawking Zhang 2022-04-13  1255  {
3d879e81f0f9ed Hawking Zhang 2022-04-13  1256   uint32_t toc_offset;
3d879e81f0f9ed Hawking Zhang 2022-04-13  1257   uint32_t toc_fw_size;
3d879e81f0f9ed Hawking Zhang 2022-04-13  1258   char *ptr = 
adev->gfx.rlc.rlc_autoload_ptr;
3d879e81f0f9ed Hawking Zhang 2022-04-13  1259  
3d879e81f0f9ed Hawking Zhang 2022-04-13  1260   if (id <= 
SOC21_FIRMWARE_ID_INVALID || id >= SOC21_FIRMWARE_ID_MAX)
3d879e81f0f9ed Hawking Zhang 2022-04-13  1261           return;
3d879e81f0f9ed Hawking Zhang 2022-04-13  1262  
3d879e81f0f9ed Hawking Zhang 2022-04-13  1263   toc_offset = 
rlc_autoload_info[id].offset;
3d879e81f0f9ed Hawking Zhang 2022-04-13  1264   toc_fw_size = 
rlc_autoload_info[id].size;
3d879e81f0f9ed Hawking Zhang 2022-04-13  1265  
3d879e81f0f9ed Hawking Zhang 2022-04-13  1266   if (fw_size == 0)
3d879e81f0f9ed Hawking Zhang 2022-04-13  1267           fw_size = toc_fw_size;
3d879e81f0f9ed Hawking Zhang 2022-04-13  1268  
3d879e81f0f9ed Hawking Zhang 2022-04-13  1269   if (fw_size > toc_fw_size)
3d879e81f0f9ed Hawking Zhang 2022-04-13  1270           fw_size = toc_fw_size;
3d879e81f0f9ed Hawking Zhang 2022-04-13  1271  
3d879e81f0f9ed Hawking Zhang 2022-04-13  1272   memcpy(ptr + toc_offset, 
fw_data, fw_size);
3d879e81f0f9ed Hawking Zhang 2022-04-13  1273  
3d879e81f0f9ed Hawking Zhang 2022-04-13  1274   if (fw_size < toc_fw_size)
3d879e81f0f9ed Hawking Zhang 2022-04-13  1275           memset(ptr + toc_offset 
+ fw_size, 0, toc_fw_size - fw_size);
3d879e81f0f9ed Hawking Zhang 2022-04-13  1276  
3d879e81f0f9ed Hawking Zhang 2022-04-13  1277   if ((id != 
SOC21_FIRMWARE_ID_RS64_PFP) && (id != SOC21_FIRMWARE_ID_RS64_ME))
3d879e81f0f9ed Hawking Zhang 2022-04-13 @1278           *(uint64_t 
*)fw_autoload_mask |= 1 << id;
3d879e81f0f9ed Hawking Zhang 2022-04-13  1279  }
3d879e81f0f9ed Hawking Zhang 2022-04-13  1280  

-- 
0-DAY CI Kernel Test Service
https://01.org/lkp
_______________________________________________
kbuild mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to