[radeon-alex:amd-staging-drm-next 170/201] drivers/gpu/drm/amd/amdgpu/../powerplay/hwmgr/smu_helper.c:663 smu_set_watermarks_for_clocks_ranges() error: we previously assumed 'wm_with_clock_ranges' could be null (see line 660)

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

 



tree:   git://people.freedesktop.org/~agd5f/linux.git amd-staging-drm-next
head:   d64547a1cfa860e241b27723c88f86fa3d88d3d7
commit: d6c9a7dc86cd39146afb0f47c06b6f95d7dd4997 [170/201] drm/amd/pp: Move common code to smu_helper.c

smatch warnings:
drivers/gpu/drm/amd/amdgpu/../powerplay/hwmgr/smu_helper.c:663 smu_set_watermarks_for_clocks_ranges() error: we previously assumed 'wm_with_clock_ranges' could be null (see line 660)

git remote add radeon-alex git://people.freedesktop.org/~agd5f/linux.git
git remote update radeon-alex
git checkout d6c9a7dc86cd39146afb0f47c06b6f95d7dd4997
vim +/wm_with_clock_ranges +663 drivers/gpu/drm/amd/amdgpu/../powerplay/hwmgr/smu_helper.c

d6c9a7dc Rex Zhu 2018-04-08  653  
d6c9a7dc Rex Zhu 2018-04-08  654  int smu_set_watermarks_for_clocks_ranges(void *wt_table,
d6c9a7dc Rex Zhu 2018-04-08  655  		struct pp_wm_sets_with_clock_ranges_soc15 *wm_with_clock_ranges)
d6c9a7dc Rex Zhu 2018-04-08  656  {
d6c9a7dc Rex Zhu 2018-04-08  657  	uint32_t i;
d6c9a7dc Rex Zhu 2018-04-08  658  	struct watermarks *table = wt_table;
d6c9a7dc Rex Zhu 2018-04-08  659  
d6c9a7dc Rex Zhu 2018-04-08 @660  	if (!table || wm_with_clock_ranges)
                                                      ^^^^^^^^^^^^^^^^^^^^
This test is inverted.  We should be checking if it's NULL not non-NULL.

d6c9a7dc Rex Zhu 2018-04-08  661  		return -EINVAL;
d6c9a7dc Rex Zhu 2018-04-08  662  
d6c9a7dc Rex Zhu 2018-04-08 @663  	if (wm_with_clock_ranges->num_wm_sets_dmif > 4 || wm_with_clock_ranges->num_wm_sets_mcif > 4)

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation
_______________________________________________
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