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]
Date:   Wed, 23 Feb 2022 12:39:09 +0800
From:   kernel test robot <lkp@...el.com>
To:     Alex Deucher <alexander.deucher@....com>
Cc:     llvm@...ts.linux.dev, kbuild-all@...ts.01.org,
        linux-kernel@...r.kernel.org,
        Christian König <christian.koenig@....com>
Subject: [agd5f:drm-next 120/147]
 drivers/gpu/drm/amd/amdgpu/amdgpu_benchmark.c:202:7: warning: variable 'r'
 is uninitialized when used here

tree:   https://gitlab.freedesktop.org/agd5f/linux.git drm-next
head:   8bc1e581192e7ee9e808d1616b6d34b5da8f1206
commit: 9645c9c9fb153c149c7dffe8c7dc2bc8a6a7ce1a [120/147] drm/amdgpu: plumb error handling though amdgpu_benchmark()
config: arm-randconfig-r035-20220221 (https://download.01.org/0day-ci/archive/20220223/202202231216.WfOj4nJp-lkp@intel.com/config)
compiler: clang version 15.0.0 (https://github.com/llvm/llvm-project d271fc04d5b97b12e6b797c6067d3c96a8d7470e)
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # install arm cross compiling tool for clang build
        # apt-get install binutils-arm-linux-gnueabi
        git remote add agd5f https://gitlab.freedesktop.org/agd5f/linux.git
        git fetch --no-tags agd5f drm-next
        git checkout 9645c9c9fb153c149c7dffe8c7dc2bc8a6a7ce1a
        # save the config file to linux build tree
        mkdir build_dir
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=arm SHELL=/bin/bash drivers/gpu/drm/amd/amdgpu/

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

All warnings (new ones prefixed by >>):

>> drivers/gpu/drm/amd/amdgpu/amdgpu_benchmark.c:202:7: warning: variable 'r' is uninitialized when used here [-Wuninitialized]
                   if (r)
                       ^
   drivers/gpu/drm/amd/amdgpu/amdgpu_benchmark.c:165:10: note: initialize the variable 'r' to silence this warning
           int i, r;
                   ^
                    = 0
   1 warning generated.


vim +/r +202 drivers/gpu/drm/amd/amdgpu/amdgpu_benchmark.c

   162	
   163	int amdgpu_benchmark(struct amdgpu_device *adev, int test_number)
   164	{
   165		int i, r;
   166		static const int common_modes[AMDGPU_BENCHMARK_COMMON_MODES_N] = {
   167			640 * 480 * 4,
   168			720 * 480 * 4,
   169			800 * 600 * 4,
   170			848 * 480 * 4,
   171			1024 * 768 * 4,
   172			1152 * 768 * 4,
   173			1280 * 720 * 4,
   174			1280 * 800 * 4,
   175			1280 * 854 * 4,
   176			1280 * 960 * 4,
   177			1280 * 1024 * 4,
   178			1440 * 900 * 4,
   179			1400 * 1050 * 4,
   180			1680 * 1050 * 4,
   181			1600 * 1200 * 4,
   182			1920 * 1080 * 4,
   183			1920 * 1200 * 4
   184		};
   185	
   186		switch (test_number) {
   187		case 1:
   188			/* simple test, VRAM to GTT and GTT to VRAM */
   189			r = amdgpu_benchmark_move(adev, 1024*1024, AMDGPU_GEM_DOMAIN_GTT,
   190						  AMDGPU_GEM_DOMAIN_VRAM);
   191			if (r)
   192				return r;
   193			r = amdgpu_benchmark_move(adev, 1024*1024, AMDGPU_GEM_DOMAIN_VRAM,
   194						  AMDGPU_GEM_DOMAIN_GTT);
   195			if (r)
   196				return r;
   197			break;
   198		case 2:
   199			/* simple test, VRAM to VRAM */
   200			amdgpu_benchmark_move(adev, 1024*1024, AMDGPU_GEM_DOMAIN_VRAM,
   201					      AMDGPU_GEM_DOMAIN_VRAM);
 > 202			if (r)

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ