lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <20210329113728.GQ1667@kadam>
Date:   Mon, 29 Mar 2021 14:37:28 +0300
From:   Dan Carpenter <dan.carpenter@...cle.com>
To:     kbuild@...ts.01.org, Alex Deucher <alexander.deucher@....com>
Cc:     lkp@...el.com, kbuild-all@...ts.01.org,
        linux-kernel@...r.kernel.org, Evan Quan <evan.quan@....com>
Subject: [kbuild] drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c:1370:4: warning:
 Variable 'num_of_active_display' is modified but its new value is never
 used. [unreadVariable]

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git  master
head:   a5e13c6df0e41702d2b2c77c8ad41677ebb065b3
commit: 75145aab7a0d865b361de687b201e8c4b76425eb drm/amdgpu/swsmu: clean up a bunch of stale interfaces
compiler: alpha-linux-gcc (GCC) 9.3.0

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

cppcheck possible warnings: (new ones prefixed by >>, may not real problems)

   In file included from drivers/gpu/drm/amd/amdgpu/../pm/swsmu/amdgpu_smu.c:
>> drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c:1370:4: warning: Variable 'num_of_active_display' is modified but its new value is never used. [unreadVariable]
      num_of_active_display++;
      ^

vim +/num_of_active_display +1370 drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c

94ed6d0cfdb867 drivers/gpu/drm/amd/powerplay/amdgpu_smu.c Huang Rui 2019-01-11  1351  int smu_display_configuration_change(struct smu_context *smu,
94ed6d0cfdb867 drivers/gpu/drm/amd/powerplay/amdgpu_smu.c Huang Rui 2019-01-11  1352  				     const struct amd_pp_display_configuration *display_config)
94ed6d0cfdb867 drivers/gpu/drm/amd/powerplay/amdgpu_smu.c Huang Rui 2019-01-11  1353  {
94ed6d0cfdb867 drivers/gpu/drm/amd/powerplay/amdgpu_smu.c Huang Rui 2019-01-11  1354  	int index = 0;
94ed6d0cfdb867 drivers/gpu/drm/amd/powerplay/amdgpu_smu.c Huang Rui 2019-01-11  1355  	int num_of_active_display = 0;
94ed6d0cfdb867 drivers/gpu/drm/amd/powerplay/amdgpu_smu.c Huang Rui 2019-01-11  1356  
2b7ad277e96577 drivers/gpu/drm/amd/powerplay/amdgpu_smu.c Evan Quan 2020-05-25  1357  	if (!smu->pm_enabled || !smu->adev->pm.dpm_enabled)
2b7ad277e96577 drivers/gpu/drm/amd/powerplay/amdgpu_smu.c Evan Quan 2020-05-25  1358  		return -EOPNOTSUPP;
94ed6d0cfdb867 drivers/gpu/drm/amd/powerplay/amdgpu_smu.c Huang Rui 2019-01-11  1359  
94ed6d0cfdb867 drivers/gpu/drm/amd/powerplay/amdgpu_smu.c Huang Rui 2019-01-11  1360  	if (!display_config)
94ed6d0cfdb867 drivers/gpu/drm/amd/powerplay/amdgpu_smu.c Huang Rui 2019-01-11  1361  		return -EINVAL;
94ed6d0cfdb867 drivers/gpu/drm/amd/powerplay/amdgpu_smu.c Huang Rui 2019-01-11  1362  
94ed6d0cfdb867 drivers/gpu/drm/amd/powerplay/amdgpu_smu.c Huang Rui 2019-01-11  1363  	mutex_lock(&smu->mutex);
94ed6d0cfdb867 drivers/gpu/drm/amd/powerplay/amdgpu_smu.c Huang Rui 2019-01-11  1364  
ce63d8f8b55d28 drivers/gpu/drm/amd/powerplay/amdgpu_smu.c Evan Quan 2020-06-08  1365  	smu_set_min_dcef_deep_sleep(smu,
94ed6d0cfdb867 drivers/gpu/drm/amd/powerplay/amdgpu_smu.c Huang Rui 2019-01-11  1366  				    display_config->min_dcef_deep_sleep_set_clk / 100);
94ed6d0cfdb867 drivers/gpu/drm/amd/powerplay/amdgpu_smu.c Huang Rui 2019-01-11  1367  
94ed6d0cfdb867 drivers/gpu/drm/amd/powerplay/amdgpu_smu.c Huang Rui 2019-01-11  1368  	for (index = 0; index < display_config->num_path_including_non_display; index++) {
94ed6d0cfdb867 drivers/gpu/drm/amd/powerplay/amdgpu_smu.c Huang Rui 2019-01-11  1369  		if (display_config->displays[index].controller_id != 0)
94ed6d0cfdb867 drivers/gpu/drm/amd/powerplay/amdgpu_smu.c Huang Rui 2019-01-11 @1370  			num_of_active_display++;
                                                                                                        ^^^^^^^^^^^^^^^^^^^^^^^
unused

94ed6d0cfdb867 drivers/gpu/drm/amd/powerplay/amdgpu_smu.c Huang Rui 2019-01-11  1371  	}
94ed6d0cfdb867 drivers/gpu/drm/amd/powerplay/amdgpu_smu.c Huang Rui 2019-01-11  1372  
94ed6d0cfdb867 drivers/gpu/drm/amd/powerplay/amdgpu_smu.c Huang Rui 2019-01-11  1373  	mutex_unlock(&smu->mutex);
94ed6d0cfdb867 drivers/gpu/drm/amd/powerplay/amdgpu_smu.c Huang Rui 2019-01-11  1374  
94ed6d0cfdb867 drivers/gpu/drm/amd/powerplay/amdgpu_smu.c Huang Rui 2019-01-11  1375  	return 0;
94ed6d0cfdb867 drivers/gpu/drm/amd/powerplay/amdgpu_smu.c Huang Rui 2019-01-11  1376  }

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org 
_______________________________________________
kbuild mailing list -- kbuild@...ts.01.org
To unsubscribe send an email to kbuild-leave@...ts.01.org

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ