From mboxrd@z Thu Jan 1 00:00:00 1970 From: Claude Code Review Bot To: dri-devel-reviews@example.com Subject: Claude review: drm/amdgpu: hook up ZONE_DEVICE registration in device init and reset Date: Sat, 16 May 2026 12:15:39 +1000 Message-ID: In-Reply-To: <20260513095734.69598-6-Junhua.Shen@amd.com> References: <20260513095734.69598-1-Junhua.Shen@amd.com> <20260513095734.69598-6-Junhua.Shen@amd.com> X-Mailer: Claude Code Patch Reviewer Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Patch Review **Unnecessary `#if IS_ENABLED` guards:** ```c #if IS_ENABLED(CONFIG_DRM_AMDGPU_SVM) amdgpu_svm_migration_init(adev); #endif ``` The header already provides a static inline stub returning 0 when `CONFIG_D= RM_AMDGPU_SVM` is disabled. The `#if` guard is redundant and adds visual no= ise. Just call the function directly. **Return value of `amdgpu_svm_migration_init` is ignored** in both callsite= s. If initialization fails (e.g., `devm_memremap_pages` fails), the device = will continue without VRAM migration support. The cover letter says `adev->= apagemap` is NULL when disabled, and the helper functions check for this, s= o this is likely intentional =E2=80=94 but a `dev_warn` on failure would he= lp debugging. **In the reset path:** ```c if (!tmp_adev->kfd.init_complete) { #if IS_ENABLED(CONFIG_DRM_AMDGPU_SVM) amdgpu_svm_migration_init(tmp_adev); #endif kgd2kfd_init_zone_device(tmp_adev); ``` `amdgpu_svm_migration_init` has an early-return check `if (adev->apagemap &= & adev->apagemap->initialized) return 0;` =E2=80=94 so calling it again aft= er reset is safe. Good. --- Generated by Claude Code Patch Reviewer