From mboxrd@z Thu Jan 1 00:00:00 1970 From: Claude Code Review Bot To: dri-devel-reviews@example.com Subject: Claude review: gpu: drm: tyr: use IoMem directly instead of Devres Date: Wed, 27 May 2026 15:26:03 +1000 Message-ID: In-Reply-To: <20260525230152.277820-3-dakr@kernel.org> References: <20260525230152.277820-1-dakr@kernel.org> <20260525230152.277820-3-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 This patch makes `IoMem` lifetime-parameterized and removes the `Devres`/`A= rc` wrapping: ```rust -pub(crate) type IoMem =3D kernel::io::mem::IoMem<'static, SZ_2M>; +pub(crate) type IoMem<'a> =3D kernel::io::mem::IoMem<'a, SZ_2M>; ``` The probe path is simplified from: ```rust let iomem =3D Arc::new(request.iomap_sized::()?.into_devres()?, GFP_= KERNEL)?; ``` to: ```rust let iomem =3D request.iomap_sized::()?; ``` And all consumers are simplified by removing the `(*iomem).access(dev)?` pa= ttern =E2=80=94 functions now take `&IoMem<'_>` directly and call methods o= n it. **Minor issue =E2=80=94 unused import of `Bound` in gpu.rs:** In `gpu.rs`, patch 2 removes both uses of `Bound` (in `GpuInfo::new` and `l= 2_power_on`), but the import is left behind: ```rust device::{ Bound, // <-- no longer used after this patch Device, // }, ``` After this patch, `Bound` has no remaining uses in `gpu.rs`. `Device` is st= ill needed (for `l2_power_on`'s `dev` parameter used in error logging), but= `Bound` should be removed from the import list to avoid an unused-import w= arning/error. Kernel Rust builds typically have strict lint settings that w= ould catch this. Otherwise the patch is correct and the simplification is welcome =E2=80=94 = removing the `Devres` access pattern from the polling closures in `issue_so= ft_reset` and `l2_power_on` is particularly nice, as the previous code had = to re-acquire the `Devres` access on every poll iteration. --- Generated by Claude Code Patch Reviewer