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/gpuvm: rust: add RUST_DRM_GPUVM option to Kconfig Date: Tue, 28 Apr 2026 14:35:26 +1000 Message-ID: In-Reply-To: <20260427-gpuvm-config-v1-1-8ece03771f8a@google.com> References: <20260427-gpuvm-config-v1-1-8ece03771f8a@google.com> <20260427-gpuvm-config-v1-1-8ece03771f8a@google.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 **Kconfig addition** (`drivers/gpu/drm/Kconfig`): ``` +config RUST_DRM_GPUVM + bool + depends on DRM + select DRM_GPUVM + help + Choose this if you need GPUVM functions in Rust ``` This correctly mirrors the existing `RUST_DRM_GEM_SHMEM_HELPER` pattern at = line 278. Key points: - `bool` (not `tristate`) =E2=80=94 forces built-in, which is the whole poi= nt. - `select DRM_GPUVM` =E2=80=94 ensures the C implementation is pulled in wh= en selected. - No user-visible prompt (no string after `bool`) =E2=80=94 intended to be = selected by drivers, not manually enabled. This is correct. One minor observation: `DRM_GPUVM` is `tristate`, and `RUST_DRM_GPUVM` is `= bool` that selects it. When a `bool` symbol selects a `tristate`, Kconfig f= orces the tristate to `y` (built-in). This is exactly the desired behavior = and matches the commit message explanation. **C helper guard change** (`rust/helpers/drm_gpuvm.c`): ```c -#ifdef CONFIG_DRM_GPUVM +#ifdef CONFIG_RUST_DRM_GPUVM ``` Correct. The helper functions are only needed for Rust consumers, so guardi= ng them behind `RUST_DRM_GPUVM` rather than `DRM_GPUVM` avoids compiling th= em when only C code uses GPUVM (where the inline/macro versions are used di= rectly). The closing comment is also updated consistently. **Rust cfg change** (`rust/kernel/drm/gpuvm/mod.rs`): ```rust -#![cfg(CONFIG_DRM_GPUVM =3D "y")] +#![cfg(CONFIG_RUST_DRM_GPUVM)] ``` Two things happen here: 1. The config symbol is updated to match the new Kconfig option. 2. The `=3D "y"` check is dropped. Since `RUST_DRM_GPUVM` is `bool` (never = `m`), a bare `cfg(CONFIG_RUST_DRM_GPUVM)` is sufficient =E2=80=94 it will b= e either defined or not. This is consistent with how other `bool` configs a= re checked elsewhere in `rust/kernel/` (e.g., `#![cfg(CONFIG_MMU)]`). **Overall**: Clean, minimal patch. Follows established conventions. No issu= es found. Reviewed-by: Claude --- Generated by Claude Code Patch Reviewer