CC: [email protected]
CC: [email protected]
TO: Jonathan Kim <[email protected]>
CC: Alex Deucher <[email protected]>
CC: Felix Kuehling <[email protected]>

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 
master
head:   5472f14a37421d1bca3dddf33cabd3bd6dbefbbc
commit: 3f46c4e9ce25bbcb9d619dbce57c8737c856b272 drm/amdkfd: report xgmi 
bandwidth between direct peers to the kfd
date:   5 months ago
:::::: branch date: 25 hours ago
:::::: commit date: 5 months ago
compiler: alpha-linux-gcc (GCC) 11.2.0

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


cppcheck possible warnings: (new ones prefixed by >>, may not real problems)

   In file included from drivers/gpu/drm/amd/amdgpu/../pm/amdgpu_pm.c:
>> drivers/gpu/drm/amd/pm/amdgpu_pm.c:1109:15: warning: Shifting signed 32-bit 
>> value by 31 bits is undefined behaviour. See condition at line 1107. 
>> [shiftTooManyBitsSigned]
      *mask |= 1 << level;
                 ^
   drivers/gpu/drm/amd/pm/amdgpu_pm.c:1107:21: note: Assuming that condition 
'level>31' is not redundant
      if (ret || level > 31)
                       ^
   drivers/gpu/drm/amd/pm/amdgpu_pm.c:1109:15: note: Shift
      *mask |= 1 << level;
                 ^
>> drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c:568:59: warning: Uninitialized 
>> variable: peer_adev [uninitvar]
    num_links = is_min ? 1 : amdgpu_xgmi_get_num_links(adev, peer_adev);
                                                             ^

vim +568 drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c

db8b62c04b2344 Shaoyun Liu  2018-07-06  555  
3f46c4e9ce25bb Jonathan Kim 2021-05-12  556  int 
amdgpu_amdkfd_get_xgmi_bandwidth_mbytes(struct kgd_dev *dst, struct kgd_dev 
*src, bool is_min)
3f46c4e9ce25bb Jonathan Kim 2021-05-12  557  {
3f46c4e9ce25bb Jonathan Kim 2021-05-12  558     struct amdgpu_device *adev = 
(struct amdgpu_device *)dst, *peer_adev;
3f46c4e9ce25bb Jonathan Kim 2021-05-12  559     int num_links;
3f46c4e9ce25bb Jonathan Kim 2021-05-12  560  
3f46c4e9ce25bb Jonathan Kim 2021-05-12  561     if (adev->asic_type != 
CHIP_ALDEBARAN)
3f46c4e9ce25bb Jonathan Kim 2021-05-12  562             return 0;
3f46c4e9ce25bb Jonathan Kim 2021-05-12  563  
3f46c4e9ce25bb Jonathan Kim 2021-05-12  564     if (src)
3f46c4e9ce25bb Jonathan Kim 2021-05-12  565             peer_adev = (struct 
amdgpu_device *)src;
3f46c4e9ce25bb Jonathan Kim 2021-05-12  566  
3f46c4e9ce25bb Jonathan Kim 2021-05-12  567     /* num links returns 0 for 
indirect peers since indirect route is unknown. */
3f46c4e9ce25bb Jonathan Kim 2021-05-12 @568     num_links = is_min ? 1 : 
amdgpu_xgmi_get_num_links(adev, peer_adev);
3f46c4e9ce25bb Jonathan Kim 2021-05-12  569     if (num_links < 0) {
3f46c4e9ce25bb Jonathan Kim 2021-05-12  570             DRM_ERROR("amdgpu: 
failed to get xgmi num links between node %d and %d. ret = %d\n",
3f46c4e9ce25bb Jonathan Kim 2021-05-12  571                     
adev->gmc.xgmi.physical_node_id,
3f46c4e9ce25bb Jonathan Kim 2021-05-12  572                     
peer_adev->gmc.xgmi.physical_node_id, num_links);
3f46c4e9ce25bb Jonathan Kim 2021-05-12  573             num_links = 0;
3f46c4e9ce25bb Jonathan Kim 2021-05-12  574     }
3f46c4e9ce25bb Jonathan Kim 2021-05-12  575  
3f46c4e9ce25bb Jonathan Kim 2021-05-12  576     /* Aldebaran xGMI DPM is 
defeatured so assume x16 x 25Gbps for bandwidth. */
3f46c4e9ce25bb Jonathan Kim 2021-05-12  577     return (num_links * 16 * 
25000)/BITS_PER_BYTE;
3f46c4e9ce25bb Jonathan Kim 2021-05-12  578  }
3f46c4e9ce25bb Jonathan Kim 2021-05-12  579  

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

Reply via email to