[agd5f:amd-staging-drm-next 3205/3402] drivers/gpu/drm/amd/amdgpu/amdgpu_ip.c:537 amdgpu_device_ip_soft_reset() error: we previously assumed 'ip_block' could be null (see line 536)

Dan Carpenter <[email protected]>
Newsgroups dev.linux.lists.oe-kbuild
Message-ID <20260709104327.w4SXlZl2JOWU_bInE5ZxSNcAFwIFNvb07J7ErMP8PC0@z>
tree:   https://gitlab.freedesktop.org/agd5f/linux.git amd-staging-drm-next
head:   e3cc8c108f9a91728f9ff6e24cbf3b41c58b8f8b
commit: a6319ac34a1322cc70c8aa7a3b06a558dc4f68a5 [3205/3402] drm/amdgpu: Add IP block soft reset as a GPU recovery method
config: i386-randconfig-r073-20260702 (https://download.01.org/0day-ci/archive/20260703/[email protected]/config)
compiler: gcc-14 (Debian 14.2.0-19) 14.2.0
smatch: v0.5.0-9185-gbcc58b9c

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 <[email protected]>
| Reported-by: Dan Carpenter <[email protected]>
| Closes: https://lore.kernel.org/r/[email protected]/

smatch warnings:
drivers/gpu/drm/amd/amdgpu/amdgpu_ip.c:537 amdgpu_device_ip_soft_reset() error: we previously assumed 'ip_block' could be null (see line 536)

vim +/ip_block +537 drivers/gpu/drm/amd/amdgpu/amdgpu_ip.c

a6319ac34a1322 Timur Kristóf 2026-06-17  523  int amdgpu_device_ip_soft_reset(struct amdgpu_ring *guilty_ring,
a6319ac34a1322 Timur Kristóf 2026-06-17  524  				struct amdgpu_fence *guilty_fence)
a6319ac34a1322 Timur Kristóf 2026-06-17  525  {
a6319ac34a1322 Timur Kristóf 2026-06-17  526  	struct amdgpu_device *adev = guilty_ring->adev;
a6319ac34a1322 Timur Kristóf 2026-06-17  527  	struct amdgpu_ring *rings[AMDGPU_MAX_RINGS];
a6319ac34a1322 Timur Kristóf 2026-06-17  528  	struct amdgpu_ip_block *ip_block;
a6319ac34a1322 Timur Kristóf 2026-06-17  529  	enum amd_ip_block_type ip_type;
a6319ac34a1322 Timur Kristóf 2026-06-17  530  	u32 num_rings, ring_type_mask;
a6319ac34a1322 Timur Kristóf 2026-06-17  531  	int r;
a6319ac34a1322 Timur Kristóf 2026-06-17  532  
a6319ac34a1322 Timur Kristóf 2026-06-17  533  	ip_type = amdgpu_ip_from_ring(guilty_ring->funcs->type);
a6319ac34a1322 Timur Kristóf 2026-06-17  534  	ip_block = amdgpu_device_ip_get_ip_block(adev, ip_type);
a6319ac34a1322 Timur Kristóf 2026-06-17  535  
a6319ac34a1322 Timur Kristóf 2026-06-17 @536  	if (!ip_block || !ip_block->version->funcs->soft_reset) {
                                                    ^^^^^^^^^
a6319ac34a1322 Timur Kristóf 2026-06-17 @537  		dev_warn(adev->dev, "IP block soft reset not supported on %s\n",

The zero day bot chopped off the dereference of ip_block but presumably
the warning is correct.


--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.