From mboxrd@z Thu Jan 1 00:00:00 1970 From: Claude Code Review Bot To: dri-devel-reviews@example.com Subject: Claude review: rust: io: make IoMem and ExclusiveIoMem lifetime-parameterized Date: Mon, 18 May 2026 16:24:35 +1000 Message-ID: In-Reply-To: <20260517000149.3226762-21-dakr@kernel.org> References: <20260517000149.3226762-1-dakr@kernel.org> <20260517000149.3226762-21-dakr@kernel.org> X-Mailer: Claude Code Patch Reviewer Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Patch Review Same pattern as patch 19, applied to `IoMem` and `ExclusiveIoMem`: ```rust -pub struct IoMem { - pdev: ARef, +pub struct IoMem<'bound, const SIZE: usize =3D 0> { + pdev: &'bound Device, ``` Both types get `into_devres()` with the same transmute pattern. Also update= s the Tyr DRM driver to use the new lifetime-parameterized types, which sim= plifies the `Register` abstraction: ```rust - pub fn read(&self, offset: usize) -> Result { + pub fn read(&self, offset: usize) -> u32 { ``` Notable that register reads become infallible =E2=80=94 the lifetime system= guarantees the I/O memory is valid, so the revocation check is unnecessary= . This is a concrete usability improvement. --- Generated by Claude Code Patch Reviewer