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: auxiliary: generalize Registration over ForLt Date: Mon, 18 May 2026 16:24:34 +1000 Message-ID: In-Reply-To: <20260517000149.3226762-18-dakr@kernel.org> References: <20260517000149.3226762-1-dakr@kernel.org> <20260517000149.3226762-18-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 Updates auxiliary device registration to use `ForLt` for lifetime-generic driver data: ```rust + pub fn new( + drv: &'a mut auxiliary::Driver, + name: &'static CStr, + ) -> impl PinInit + use<'a, D, F> ``` The `registration_data()` method uses `ForLt::cast_ref` to shorten the lifetime of driver data when accessing it: ```rust + pub fn registration_data<'a, F: ForLt>( + &'a self, + ) -> Option>> { + ... + Some(unsafe { Pin::new_unchecked(F::cast_ref(data)) }) + } ``` This is the bridge between `ForLt` and the bus registration system. The unsafe is justified by the `ForLt` covariance guarantee. --- Generated by Claude Code Patch Reviewer