[radeon-alex:amd-17.50 2016/2100] drivers/gpu/drm/amd/amdgpu/../powerplay/smumgr/ci_smc.c:579:62: warning: 'tmp' may be used uninitialized in this function

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Rex,

FYI, the error/warning still remains.

tree:   git://people.freedesktop.org/~agd5f/linux.git amd-17.50
head:   4b295aab3256d700354748dcd64017d76065d684
commit: 9c2014d08693830897cad6bbd359d905825d8a18 [2016/2100] drm/amd/powerplay: add CI asics support to smumgr
config: i386-allyesconfig (attached as .config)
compiler: gcc-7 (Debian 7.2.0-12) 7.2.1 20171025
reproduce:
        git checkout 9c2014d08693830897cad6bbd359d905825d8a18
        # save the attached .config to linux build tree
        make ARCH=i386 

Note: it may well be a FALSE warning. FWIW you are at least aware of it now.
http://gcc.gnu.org/wiki/Better_Uninitialized_Warnings

All warnings (new ones prefixed by >>):

   drivers/gpu/drm/amd/amdgpu/../powerplay/smumgr/ci_smc.c: In function 'ci_init_smc_table':
>> drivers/gpu/drm/amd/amdgpu/../powerplay/smumgr/ci_smc.c:579:62: warning: 'tmp' may be used uninitialized in this function [-Wmaybe-uninitialized]
     smu_data->power_tune_table.FuzzyFan_PwmSetDelta = CONVERT_FROM_HOST_TO_SMC_US(tmp);
                                                                ~^~~~~~~~~~~~~~~~~~~~~~~                           
   drivers/gpu/drm/amd/amdgpu/../powerplay/smumgr/ci_smc.c:571:11: note: 'tmp' was declared here
     uint16_t tmp;
              ^~~

vim +/tmp +579 drivers/gpu/drm/amd/amdgpu/../powerplay/smumgr/ci_smc.c

   568	
   569	static int ci_populate_fuzzy_fan(struct pp_hwmgr *hwmgr, uint32_t fuse_table_offset)
   570	{
   571		uint16_t tmp;
   572		struct ci_smumgr *smu_data = (struct ci_smumgr *)(hwmgr->smumgr->backend);
   573	
   574		if ((hwmgr->thermal_controller.advanceFanControlParameters.usFanOutputSensitivity & (1 << 15))
   575			|| 0 == hwmgr->thermal_controller.advanceFanControlParameters.usFanOutputSensitivity)
   576			tmp = hwmgr->thermal_controller.advanceFanControlParameters.usFanOutputSensitivity
   577			    = hwmgr->thermal_controller.advanceFanControlParameters.usDefaultFanOutputSensitivity;
   578	
 > 579		smu_data->power_tune_table.FuzzyFan_PwmSetDelta = CONVERT_FROM_HOST_TO_SMC_US(tmp);
   580	
   581		return 0;
   582	}
   583	

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

Attachment: .config.gz
Description: application/gzip

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

[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux