tree:   git://people.freedesktop.org/~agd5f/linux.git drm-next
head:   2e3a5bc5feeab1ed21f0105f1440a2ff0aef62f9
commit: a90e6fbe47ff6707a57e55aa578e623b10f79b10 [505/551] drm/amd/pm: correct 
the settings for ro range minimum and maximum
config: x86_64-randconfig-a004-20201026 (attached as .config)
compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project 
f2c25c70791de95d2466e09b5b58fc37f6ccd7a4)
reproduce (this is a W=1 build):
        wget 
https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O 
~/bin/make.cross
        chmod +x ~/bin/make.cross
        # install x86_64 cross compiling tool for clang build
        # apt-get install binutils-x86-64-linux-gnu
        git remote add radeon-alex git://people.freedesktop.org/~agd5f/linux.git
        git fetch --no-tags radeon-alex drm-next
        git checkout a90e6fbe47ff6707a57e55aa578e623b10f79b10
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=x86_64 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <l...@intel.com>

All warnings (new ones prefixed by >>):

>> drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/smu7_hwmgr.c:1743:13: 
>> warning: variable 'min' is used uninitialized whenever 'if' condition is 
>> false [-Wsometimes-uninitialized]
           } else if ((hwmgr->chip_id == CHIP_POLARIS11) ||
                      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/smu7_hwmgr.c:1749:27: note: 
uninitialized use occurs here
           data->ro_range_minimum = min;
                                    ^~~
   drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/smu7_hwmgr.c:1743:9: note: 
remove the 'if' if its condition is always true
           } else if ((hwmgr->chip_id == CHIP_POLARIS11) ||
                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/smu7_hwmgr.c:1738:15: 
warning: variable 'min' is used uninitialized whenever 'if' condition is false 
[-Wsometimes-uninitialized]
                           } else if (evv_revision == 2) {
                                      ^~~~~~~~~~~~~~~~~
   drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/smu7_hwmgr.c:1749:27: note: 
uninitialized use occurs here
           data->ro_range_minimum = min;
                                    ^~~
   drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/smu7_hwmgr.c:1738:11: note: 
remove the 'if' if its condition is always true
                           } else if (evv_revision == 2) {
                                  ^~~~~~~~~~~~~~~~~~~~~~~
   drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/smu7_hwmgr.c:1706:43: note: 
initialize the variable 'min' to silence this warning
           uint32_t asicrev1, evv_revision, max, min;
                                                    ^
                                                     = 0
>> drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/smu7_hwmgr.c:1743:13: 
>> warning: variable 'max' is used uninitialized whenever 'if' condition is 
>> false [-Wsometimes-uninitialized]
           } else if ((hwmgr->chip_id == CHIP_POLARIS11) ||
                      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/smu7_hwmgr.c:1750:27: note: 
uninitialized use occurs here
           data->ro_range_maximum = max;
                                    ^~~
   drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/smu7_hwmgr.c:1743:9: note: 
remove the 'if' if its condition is always true
           } else if ((hwmgr->chip_id == CHIP_POLARIS11) ||
                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/smu7_hwmgr.c:1738:15: 
warning: variable 'max' is used uninitialized whenever 'if' condition is false 
[-Wsometimes-uninitialized]
                           } else if (evv_revision == 2) {
                                      ^~~~~~~~~~~~~~~~~
   drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/smu7_hwmgr.c:1750:27: note: 
uninitialized use occurs here
           data->ro_range_maximum = max;
                                    ^~~
   drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/smu7_hwmgr.c:1738:11: note: 
remove the 'if' if its condition is always true
                           } else if (evv_revision == 2) {
                                  ^~~~~~~~~~~~~~~~~~~~~~~
   drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/smu7_hwmgr.c:1706:38: note: 
initialize the variable 'max' to silence this warning
           uint32_t asicrev1, evv_revision, max, min;
                                               ^
                                                = 0
   drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/smu7_hwmgr.c:5286:5: 
warning: no previous prototype for function 'smu7_init_function_pointers' 
[-Wmissing-prototypes]
   int smu7_init_function_pointers(struct pp_hwmgr *hwmgr)
       ^
   drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/smu7_hwmgr.c:5286:1: note: 
declare 'static' if the function is not intended to be used outside of this 
translation unit
   int smu7_init_function_pointers(struct pp_hwmgr *hwmgr)
   ^
   static 
   5 warnings generated.

vim +1743 drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/smu7_hwmgr.c

  1701  
  1702  static int smu7_calculate_ro_range(struct pp_hwmgr *hwmgr)
  1703  {
  1704          struct smu7_hwmgr *data = (struct smu7_hwmgr *)(hwmgr->backend);
  1705          struct amdgpu_device *adev = hwmgr->adev;
  1706          uint32_t asicrev1, evv_revision, max, min;
  1707  
  1708          atomctrl_read_efuse(hwmgr, STRAP_EVV_REVISION_LSB, 
STRAP_EVV_REVISION_MSB,
  1709                          &evv_revision);
  1710  
  1711          atomctrl_read_efuse(hwmgr, 568, 579, &asicrev1);
  1712  
  1713          if (ASICID_IS_P20(adev->pdev->device, adev->pdev->revision) ||
  1714              ASICID_IS_P30(adev->pdev->device, adev->pdev->revision)) {
  1715                  min = 1200;
  1716                  max = 2500;
  1717          } else if (ASICID_IS_P21(adev->pdev->device, 
adev->pdev->revision) ||
  1718                     ASICID_IS_P31(adev->pdev->device, 
adev->pdev->revision)) {
  1719                  min = 900;
  1720                  max= 2100;
  1721          } else if (hwmgr->chip_id == CHIP_POLARIS10) {
  1722                  if (adev->pdev->subsystem_vendor == 0x106B) {
  1723                          min = 1000;
  1724                          max = 2300;
  1725                  } else {
  1726                          if (evv_revision == 0) {
  1727                                  min = 1000;
  1728                                  max = 2300;
  1729                          } else if (evv_revision == 1) {
  1730                                  if (asicrev1 == 326) {
  1731                                          min = 1200;
  1732                                          max = 2500;
  1733                                          /* TODO: PATCH RO in VBIOS */
  1734                                  } else {
  1735                                          min = 1200;
  1736                                          max = 2000;
  1737                                  }
  1738                          } else if (evv_revision == 2) {
  1739                                  min = 1200;
  1740                                  max = 2500;
  1741                          }
  1742                  }
> 1743          } else if ((hwmgr->chip_id == CHIP_POLARIS11) ||
  1744                     (hwmgr->chip_id == CHIP_POLARIS12)) {
  1745                  min = 1100;
  1746                  max = 2100;
  1747          }
  1748  
  1749          data->ro_range_minimum = min;
  1750          data->ro_range_maximum = max;
  1751  
  1752          /* TODO: PATCH RO in VBIOS here */
  1753  
  1754          return 0;
  1755  }
  1756  

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-...@lists.01.org

Attachment: .config.gz
Description: application/gzip

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

Reply via email to