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: drm: Add Driver::ParentDevice associated type Date: Thu, 07 May 2026 12:45:08 +1000 Message-ID: In-Reply-To: <20260506221027.858481-2-dakr@kernel.org> References: <20260506221027.858481-1-dakr@kernel.org> <20260506221027.858481-2-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 Clean mechanical patch. Adds `ParentDevice: device::AsB= usDevice` to the `Driver` trait, constraining each DRM driver to decla= re its parent bus device type. The change to `UnregisteredDevice::new()`: ```rust pub fn new( dev: &T::ParentDevice, data: impl PinInit, ) -> Result { ``` is correct =E2=80=94 it now takes the concrete bus device type instead of a= generic `&device::Device`, providing compile-time assurance that the paren= t matches what the driver declared. The `dev.as_ref().as_raw()` call on lin= e 280 correctly chains through `AsBusDevice -> AsRef -> as_raw()`. The driver-side changes in nova and tyr are straightforward: they drop the = `.as_ref()` from the `new()` call since the function now accepts the bus-ty= ped device directly. No issues. --- Generated by Claude Code Patch Reviewer