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: <202507211301.7SjLWatr-lkp@intel.com>
Date: Mon, 21 Jul 2025 13:01:18 +0200
From: kernel test robot <lkp@...el.com>
To: Likun Gao <Likun.Gao@....com>
Cc: llvm@...ts.linux.dev, oe-kbuild-all@...ts.linux.dev,
	linux-kernel@...r.kernel.org,
	Alex Deucher <alexander.deucher@....com>,
	Hawking Zhang <Hawking.Zhang@....com>
Subject: drivers/gpu/drm/amd/amdgpu/imu_v12_0.c:333:30: warning: variable
 'data' is uninitialized when used here

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   89be9a83ccf1f88522317ce02f854f30d6115c41
commit: 56159fffaab5c42a8897eac0824c58af3b369914 drm/amdgpu: use new method to program rlc ram
date:   1 year, 3 months ago
config: powerpc64-randconfig-2006-20250721 (https://download.01.org/0day-ci/archive/20250721/202507211301.7SjLWatr-lkp@intel.com/config)
compiler: clang version 22.0.0git (https://github.com/llvm/llvm-project 6193dd55535460c347f8c0b794df7d7d52fa78c9)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250721/202507211301.7SjLWatr-lkp@intel.com/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@...el.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202507211301.7SjLWatr-lkp@intel.com/

All warnings (new ones prefixed by >>):

   In file included from drivers/gpu/drm/amd/amdgpu/imu_v12_0.c:25:
   In file included from drivers/gpu/drm/amd/amdgpu/amdgpu.h:52:
   In file included from include/linux/pci.h:38:
   In file included from include/linux/interrupt.h:11:
   In file included from include/linux/hardirq.h:11:
   In file included from arch/powerpc/include/asm/hardirq.h:6:
   In file included from include/linux/irq.h:20:
   In file included from include/linux/io.h:13:
   In file included from arch/powerpc/include/asm/io.h:24:
   In file included from include/linux/mm.h:2208:
   include/linux/vmstat.h:522:36: warning: arithmetic between different enumeration types ('enum node_stat_item' and 'enum lru_list') [-Wenum-enum-conversion]
     522 |         return node_stat_name(NR_LRU_BASE + lru) + 3; // skip "nr_"
         |                               ~~~~~~~~~~~ ^ ~~~
>> drivers/gpu/drm/amd/amdgpu/imu_v12_0.c:333:30: warning: variable 'data' is uninitialized when used here [-Wuninitialized]
     333 |                         program_imu_rlc_ram(adev, data, (const u32)size);
         |                                                   ^~~~
   drivers/gpu/drm/amd/amdgpu/imu_v12_0.c:325:17: note: initialize the variable 'data' to silence this warning
     325 |         const u32 *data;
         |                        ^
         |                         = NULL
   2 warnings generated.


vim +/data +333 drivers/gpu/drm/amd/amdgpu/imu_v12_0.c

   321	
   322	static void imu_v12_0_program_rlc_ram(struct amdgpu_device *adev)
   323	{
   324		u32 reg_data, size = 0;
   325		const u32 *data;
   326		int r = -EINVAL;
   327	
   328		WREG32_SOC15(GC, 0, regGFX_IMU_RLC_RAM_INDEX, 0x2);
   329	
   330		switch (amdgpu_ip_version(adev, GC_HWIP, 0)) {
   331		case IP_VERSION(12, 0, 1):
   332			if (!r)
 > 333				program_imu_rlc_ram(adev, data, (const u32)size);
   334			else
   335				program_imu_rlc_ram_old(adev, imu_rlc_ram_golden_12_0_1,
   336					(const u32)ARRAY_SIZE(imu_rlc_ram_golden_12_0_1));
   337			break;
   338		default:
   339			BUG();
   340			break;
   341		}
   342	
   343		//Indicate the latest entry
   344		WREG32_SOC15(GC, 0, regGFX_IMU_RLC_RAM_ADDR_HIGH, 0);
   345		WREG32_SOC15(GC, 0, regGFX_IMU_RLC_RAM_ADDR_LOW, 0);
   346		WREG32_SOC15(GC, 0, regGFX_IMU_RLC_RAM_DATA, 0);
   347	
   348		reg_data = RREG32_SOC15(GC, 0, regGFX_IMU_RLC_RAM_INDEX);
   349		reg_data |= GFX_IMU_RLC_RAM_INDEX__RAM_VALID_MASK;
   350		WREG32_SOC15(GC, 0, regGFX_IMU_RLC_RAM_INDEX, reg_data);
   351	}
   352	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ