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/tyr: Use DRM device type alias across driver Date: Tue, 03 Mar 2026 12:52:31 +1000 Message-ID: In-Reply-To: <20260302202331.176140-1-deborah.brouwer@collabora.com> References: <20260302202331.176140-1-deborah.brouwer@collabora.com> <20260302202331.176140-1-deborah.brouwer@collabora.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 **Status: Correct, no issues** The change is minimal and mechanical: 1. **`file.rs` import update** =E2=80=94 Adds `TyrDrmDevice` to the import: ```rust -use crate::driver::TyrDrmDriver; +use crate::driver::{ + TyrDrmDevice, + TyrDrmDriver, // +}; ``` `TyrDrmDriver` is still needed because the `DriverFile` impl uses `type Dri= ver =3D TyrDrmDriver;`. The trailing `//` comment is a `rustfmt` trick to f= orce one-item-per-line formatting =E2=80=94 this is a common Rust style con= vention and matches the existing pattern at the top of the file (e.g., `uap= i, //`). 2. **`file.rs` signature update** =E2=80=94 `dev_query` uses the alias: ```rust - ddev: &drm::Device, + ddev: &TyrDrmDevice, ``` Correct. Note that `fn open(_dev: &drm::Device)` is intention= ally left unchanged since it uses the associated type `Self::Driver` throug= h the trait, which is the idiomatic pattern there. 3. **`gem.rs` import and signature update** =E2=80=94 Same pattern as `file= .rs`: ```rust - fn new(_dev: &kernel::drm::Device, _size: usize) -> impl= PinInit { + fn new(_dev: &TyrDrmDevice, _size: usize) -> impl PinInit= { ``` Correct. The `type Driver =3D TyrDrmDriver;` associated type is kept since = it's required by the trait. **Minor observation:** As mentioned above, the drm-next tree (`file.rs:3`, = `file.rs:27`; `gem.rs:3`, `gem.rs:15`) already has this change applied with= the shorter names `TyrDevice`/`TyrDriver`. This patch will not apply to dr= m-next and appears to target a different base branch. The commit message's = rationale about "reducing diffs when multiple series are touching these fil= es" supports this =E2=80=94 it's likely a preparatory cleanup for a feature= branch. **Reviewed-by assessment:** The patch is trivially correct for its stated b= ase. No functional concerns. --- Generated by Claude Code Patch Reviewer