All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: oe-kbuild@lists.linux.dev
Cc: lkp@intel.com, Dan Carpenter <error27@gmail.com>
Subject: drivers/gpu/drm/amd/amdgpu/amdgpu_ids.c:495 amdgpu_vmid_alloc_reserved() warn: missing error code 'r'
Date: Thu, 26 Mar 2026 02:34:55 +0800	[thread overview]
Message-ID: <202603260220.CyHvMRdo-lkp@intel.com> (raw)

BCC: lkp@intel.com
CC: oe-kbuild-all@lists.linux.dev
CC: linux-kernel@vger.kernel.org
TO: "Christian König" <christian.koenig@amd.com>
CC: Alex Deucher <alexander.deucher@amd.com>

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   bbeb83d3182abe0d245318e274e8531e5dd7a948
commit: 90e09ea4cfd4aaaf07ababa6d8c880035587e7e9 drm/amdgpu: revert "rework reserved VMID handling" v2
date:   6 months ago
:::::: branch date: 19 hours ago
:::::: commit date: 6 months ago
config: x86_64-randconfig-r073-20260323 (https://download.01.org/0day-ci/archive/20260326/202603260220.CyHvMRdo-lkp@intel.com/config)
compiler: clang version 20.1.8 (https://github.com/llvm/llvm-project 87f0227cb60147a26a1eeb4fb06e3b505e9c7261)
smatch: v0.5.0-9004-gb810ac53

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@intel.com>
| Reported-by: Dan Carpenter <error27@gmail.com>
| Closes: https://lore.kernel.org/r/202603260220.CyHvMRdo-lkp@intel.com/

smatch warnings:
drivers/gpu/drm/amd/amdgpu/amdgpu_ids.c:495 amdgpu_vmid_alloc_reserved() warn: missing error code 'r'

vim +/r +495 drivers/gpu/drm/amd/amdgpu/amdgpu_ids.c

320debca1ba3a8 Christian König 2024-01-19  475  
90e09ea4cfd4aa Christian König 2025-09-19  476  /*
90e09ea4cfd4aa Christian König 2025-09-19  477   * amdgpu_vmid_alloc_reserved - reserve a specific VMID for this vm
90e09ea4cfd4aa Christian König 2025-09-19  478   * @adev: amdgpu device structure
90e09ea4cfd4aa Christian König 2025-09-19  479   * @vm: the VM to reserve an ID for
90e09ea4cfd4aa Christian König 2025-09-19  480   * @vmhub: the VMHUB which should be used
90e09ea4cfd4aa Christian König 2025-09-19  481   *
90e09ea4cfd4aa Christian König 2025-09-19  482   * Mostly used to have a reserved VMID for debugging and SPM.
90e09ea4cfd4aa Christian König 2025-09-19  483   *
90e09ea4cfd4aa Christian König 2025-09-19  484   * Returns: 0 for success, -ENOENT if an ID is already reserved.
90e09ea4cfd4aa Christian König 2025-09-19  485   */
90e09ea4cfd4aa Christian König 2025-09-19  486  int amdgpu_vmid_alloc_reserved(struct amdgpu_device *adev, struct amdgpu_vm *vm,
620f774f4687d8 Christian König 2017-12-18  487  			       unsigned vmhub)
620f774f4687d8 Christian König 2017-12-18  488  {
e44a0fe630c58b Christian König 2022-11-25  489  	struct amdgpu_vmid_mgr *id_mgr = &adev->vm_manager.id_mgr[vmhub];
e44a0fe630c58b Christian König 2022-11-25  490  	struct amdgpu_vmid *id;
90e09ea4cfd4aa Christian König 2025-09-19  491  	int r = 0;
e44a0fe630c58b Christian König 2022-11-25  492  
90e09ea4cfd4aa Christian König 2025-09-19  493  	mutex_lock(&id_mgr->lock);
90e09ea4cfd4aa Christian König 2025-09-19  494  	if (vm->reserved_vmid[vmhub])
90e09ea4cfd4aa Christian König 2025-09-19 @495  		goto unlock;
90e09ea4cfd4aa Christian König 2025-09-19  496  	if (id_mgr->reserved_vmid) {
90e09ea4cfd4aa Christian König 2025-09-19  497  		r = -ENOENT;
90e09ea4cfd4aa Christian König 2025-09-19  498  		goto unlock;
90e09ea4cfd4aa Christian König 2025-09-19  499  	}
e44a0fe630c58b Christian König 2022-11-25  500  	/* Remove from normal round robin handling */
90e09ea4cfd4aa Christian König 2025-09-19  501  	id = list_first_entry(&id_mgr->ids_lru, struct amdgpu_vmid, list);
e44a0fe630c58b Christian König 2022-11-25  502  	list_del_init(&id->list);
90e09ea4cfd4aa Christian König 2025-09-19  503  	vm->reserved_vmid[vmhub] = id;
90e09ea4cfd4aa Christian König 2025-09-19  504  	id_mgr->reserved_vmid = true;
620f774f4687d8 Christian König 2017-12-18  505  	mutex_unlock(&id_mgr->lock);
90e09ea4cfd4aa Christian König 2025-09-19  506  
e44a0fe630c58b Christian König 2022-11-25  507  	return 0;
90e09ea4cfd4aa Christian König 2025-09-19  508  unlock:
90e09ea4cfd4aa Christian König 2025-09-19  509  	mutex_unlock(&id_mgr->lock);
90e09ea4cfd4aa Christian König 2025-09-19  510  	return r;
620f774f4687d8 Christian König 2017-12-18  511  }
620f774f4687d8 Christian König 2017-12-18  512  

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

             reply	other threads:[~2026-03-25 18:35 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-25 18:34 kernel test robot [this message]
  -- strict thread matches above, loose matches on Subject: below --
2025-12-12 23:27 drivers/gpu/drm/amd/amdgpu/amdgpu_ids.c:495 amdgpu_vmid_alloc_reserved() warn: missing error code 'r' kernel test robot

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=202603260220.CyHvMRdo-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=error27@gmail.com \
    --cc=oe-kbuild@lists.linux.dev \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.