[radeon-alex:amd-mainline-dkms-4.13 2016/2065] 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]

 



tree:   git://people.freedesktop.org/~agd5f/linux.git amd-mainline-dkms-4.13
head:   59aa856b7672d465443305a3fd7a6956f9567ea6
commit: 9c2014d08693830897cad6bbd359d905825d8a18 [2016/2065] drm/amd/powerplay: add CI asics support to smumgr
config: i386-allyesconfig (attached as .config)
compiler: gcc-6 (Debian 6.4.0-9) 6.4.0 20171026
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