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: device: implement Sync for Device Date: Mon, 18 May 2026 16:24:33 +1000 Message-ID: In-Reply-To: <20260517000149.3226762-10-dakr@kernel.org> References: <20260517000149.3226762-1-dakr@kernel.org> <20260517000149.3226762-10-dakr@kernel.org> X-Mailer: Claude Code Patch Reviewer Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit MIME-Version: 1.0 Patch Review ```rust -pub unsafe trait ForeignOwnable: Sized + 'static { +pub unsafe trait ForeignOwnable: Sized { ``` Removes the `'static` bound from `ForeignOwnable`, enabling non-`'static` types to be stored as driver data via `set_drvdata`. This is safe because `ForeignOwnable` implementations are responsible for their own lifetime management through the `into_foreign`/`from_foreign` contract. Clean, necessary change. ### PATCHES 10-14: Bus driver trait updates (PCI, Platform, Auxiliary, I2C, USB) These patches update each bus driver trait's `probe` callback to pass the new lifetime-parameterized data: ```rust - fn probe(dev: &mut pci::Device, id_info: &Self::IdInfo) -> Result>>; + fn probe<'bound>( + dev: &'bound mut pci::Device, + id_info: &Self::IdInfo, + ) -> Result>>>; ``` The pattern is consistent across all buses. The `'bound` lifetime flows from the device reference into the returned data, establishing the compile-time guarantee that driver data cannot outlive the device binding. Each patch also updates the internal `Adapter` trait implementation to handle the lifetime threading. Minor note: patches 13 (I2C) and 14 (USB) also add the `IdInfo` associated type to those traits where it was missing. --- Generated by Claude Code Patch Reviewer