From: kernel test robot <lkp@intel.com>
To: oe-kbuild@lists.linux.dev
Cc: lkp@intel.com, Dan Carpenter <error27@gmail.com>
Subject: [linux-next:master 18557/19841] drivers/gpu/drm/amd/amdgpu/amdgpu_ids.c:610 amdgpu_vmid_alloc_spm() warn: missing error code 'r'
Date: Sat, 24 Oct 2026 04:12:44 +0200 [thread overview]
Message-ID: <202610240413.XPJSrvZR-lkp@intel.com> (raw)
Unfiltered warning: this smatch report is sent as-is and has not been
reviewed for false positives, so please treat it with due skepticism.
BCC: lkp@intel.com
CC: oe-kbuild-all@lists.linux.dev
TO: Sunil Khatri <sunil.khatri@amd.com>
CC: Alex Deucher <alexander.deucher@amd.com>
CC: "Christian König" <christian.koenig@amd.com>
Hi Sunil,
FYI, the error/warning was bisected to this commit, please ignore it if it's irrelevant.
tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head: 20a33c6b6cbe7e4805dfb6cd68816937443aa148
commit: 3ea615c8dc434b1a16777c671d18933b4925011a [18557/19841] drm/amdgpu: rename amdgpu_vmid_alloc/free_reserved to _spm
:::::: branch date: 11 hours ago
:::::: commit date: 4 days ago
config: x86_64-randconfig-2200-20261022 (https://download.01.org/0day-ci/archive/20261024/202610240413.XPJSrvZR-lkp@intel.com/config)
compiler: gcc-14 (Debian 14.2.0-19) 14.2.0
smatch: v0.5.0-9187-g5189e3fb
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/202610240413.XPJSrvZR-lkp@intel.com/
smatch warnings:
drivers/gpu/drm/amd/amdgpu/amdgpu_ids.c:610 amdgpu_vmid_alloc_spm() warn: missing error code 'r'
vim +/r +610 drivers/gpu/drm/amd/amdgpu/amdgpu_ids.c
320debca1ba3a8 Christian König 2024-01-19 590
90e09ea4cfd4aa Christian König 2025-09-19 591 /*
3ea615c8dc434b Sunil Khatri 2026-10-13 592 * amdgpu_vmid_alloc_spm - reserve a specific VMID for this vm
90e09ea4cfd4aa Christian König 2025-09-19 593 * @adev: amdgpu device structure
90e09ea4cfd4aa Christian König 2025-09-19 594 * @vm: the VM to reserve an ID for
90e09ea4cfd4aa Christian König 2025-09-19 595 * @vmhub: the VMHUB which should be used
90e09ea4cfd4aa Christian König 2025-09-19 596 *
90e09ea4cfd4aa Christian König 2025-09-19 597 * Mostly used to have a reserved VMID for debugging and SPM.
90e09ea4cfd4aa Christian König 2025-09-19 598 *
90e09ea4cfd4aa Christian König 2025-09-19 599 * Returns: 0 for success, -ENOENT if an ID is already reserved.
90e09ea4cfd4aa Christian König 2025-09-19 600 */
3ea615c8dc434b Sunil Khatri 2026-10-13 601 int amdgpu_vmid_alloc_spm(struct amdgpu_device *adev, struct amdgpu_vm *vm,
620f774f4687d8 Christian König 2017-12-18 602 unsigned vmhub)
620f774f4687d8 Christian König 2017-12-18 603 {
3c1d77d7b81878 Sunil Khatri 2026-09-30 604 struct amdgpu_kq_vmid_mgr *id_mgr = &adev->vm_manager.id_mgr[vmhub];
e44a0fe630c58b Christian König 2022-11-25 605 struct amdgpu_vmid *id;
90e09ea4cfd4aa Christian König 2025-09-19 606 int r = 0;
e44a0fe630c58b Christian König 2022-11-25 607
90e09ea4cfd4aa Christian König 2025-09-19 608 mutex_lock(&id_mgr->lock);
90e09ea4cfd4aa Christian König 2025-09-19 609 if (vm->reserved_vmid[vmhub])
90e09ea4cfd4aa Christian König 2025-09-19 @610 goto unlock;
90e09ea4cfd4aa Christian König 2025-09-19 611 if (id_mgr->reserved_vmid) {
90e09ea4cfd4aa Christian König 2025-09-19 612 r = -ENOENT;
90e09ea4cfd4aa Christian König 2025-09-19 613 goto unlock;
90e09ea4cfd4aa Christian König 2025-09-19 614 }
81f169bbdc3a79 Sunil Khatri 2026-10-12 615 if (!adev->vm_manager.spm_vmid) {
81f169bbdc3a79 Sunil Khatri 2026-10-12 616 r = -ENOENT;
81f169bbdc3a79 Sunil Khatri 2026-10-12 617 goto unlock;
81f169bbdc3a79 Sunil Khatri 2026-10-12 618 }
81f169bbdc3a79 Sunil Khatri 2026-10-12 619
81f169bbdc3a79 Sunil Khatri 2026-10-12 620 id = &id_mgr->ids[adev->vm_manager.spm_vmid];
90e09ea4cfd4aa Christian König 2025-09-19 621 vm->reserved_vmid[vmhub] = id;
90e09ea4cfd4aa Christian König 2025-09-19 622 id_mgr->reserved_vmid = true;
620f774f4687d8 Christian König 2017-12-18 623 mutex_unlock(&id_mgr->lock);
90e09ea4cfd4aa Christian König 2025-09-19 624
e44a0fe630c58b Christian König 2022-11-25 625 return 0;
90e09ea4cfd4aa Christian König 2025-09-19 626 unlock:
90e09ea4cfd4aa Christian König 2025-09-19 627 mutex_unlock(&id_mgr->lock);
90e09ea4cfd4aa Christian König 2025-09-19 628 return r;
620f774f4687d8 Christian König 2017-12-18 629 }
620f774f4687d8 Christian König 2017-12-18 630
:::::: The code at line 610 was first introduced by commit
:::::: 90e09ea4cfd4aaaf07ababa6d8c880035587e7e9 drm/amdgpu: revert "rework reserved VMID handling" v2
:::::: TO: Christian König <christian.koenig@amd.com>
:::::: CC: Alex Deucher <alexander.deucher@amd.com>
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
reply other threads:[~2026-10-24 2:13 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=202610240413.XPJSrvZR-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.