[radeon-alex:amd-staging-drm-next 1152/1167] drivers/gpu/drm/amd/amdgpu/../powerplay/amd_powerplay.c:175:30: warning: 'hwmgr' may be used uninitialized in this function
kbuild test robot
fengguang.wu at intel.com
Fri Sep 29 18:56:16 UTC 2017
tree: git://people.freedesktop.org/~agd5f/linux.git amd-staging-drm-next
head: 99f6288635ceb793ea79c787d83ee64a95b46cd4
commit: 6a1f70848ca224e9fa74dfc72c05a0f9c8711b98 [1152/1167] drm/amd/powerplay: refine code in amd_powerplay.c
config: ia64-allmodconfig (attached as .config)
compiler: ia64-linux-gcc (GCC) 6.2.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
git checkout 6a1f70848ca224e9fa74dfc72c05a0f9c8711b98
# save the attached .config to linux build tree
make.cross ARCH=ia64
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/amd_powerplay.c: In function 'pp_hw_init':
>> drivers/gpu/drm/amd/amdgpu/../powerplay/amd_powerplay.c:175:30: warning: 'hwmgr' may be used uninitialized in this function [-Wmaybe-uninitialized]
cgs_notify_dpm_enabled(hwmgr->device, false);
^~
vim +/hwmgr +175 drivers/gpu/drm/amd/amdgpu/../powerplay/amd_powerplay.c
145
146 static int pp_hw_init(void *handle)
147 {
148 int ret = 0;
149 struct pp_instance *pp_handle = (struct pp_instance *)handle;
150 struct pp_hwmgr *hwmgr;
151
152 ret = pp_check(pp_handle);
153
154 if (ret >= 0) {
155 hwmgr = pp_handle->hwmgr;
156
157 if (hwmgr->smumgr_funcs->start_smu == NULL)
158 return -EINVAL;
159
160 if(hwmgr->smumgr_funcs->start_smu(pp_handle->hwmgr)) {
161 pr_err("smc start failed\n");
162 hwmgr->smumgr_funcs->smu_fini(pp_handle->hwmgr);
163 return -EINVAL;;
164 }
165 if (ret == PP_DPM_DISABLED)
166 goto exit;
167 }
168
169 ret = hwmgr_hw_init(pp_handle);
170 if (ret)
171 goto exit;
172 return 0;
173 exit:
174 pp_handle->pm_en = 0;
> 175 cgs_notify_dpm_enabled(hwmgr->device, false);
176 return 0;
177
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
-------------- next part --------------
A non-text attachment was scrubbed...
Name: .config.gz
Type: application/gzip
Size: 48473 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/dri-devel/attachments/20170930/719f0876/attachment-0001.gz>
More information about the dri-devel
mailing list