From mboxrd@z Thu Jan 1 00:00:00 1970 From: Claude Code Review Bot To: dri-devel-reviews@example.com Subject: Claude review: serdev: add rust private data to serdev_device Date: Thu, 04 Jun 2026 15:57:27 +1000 Message-ID: In-Reply-To: <20260530-rust_serdev-v8-2-2a95f1da22a7@posteo.de> References: <20260530-rust_serdev-v8-0-2a95f1da22a7@posteo.de> <20260530-rust_serdev-v8-2-2a95f1da22a7@posteo.de> X-Mailer: Claude Code Patch Reviewer Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit MIME-Version: 1.0 Patch Review Adds `void *rust_private_data` to `struct serdev_device` for use by the Rust abstraction: ```c + void *rust_private_data; ``` This is needed because the Rust abstraction stores a `PrivateData` struct (containing a `Completion` and error flag) to synchronize probe and receive callbacks. Using `drvdata` isn't an option because it's already used for driver-specific data. **Nit:** The documentation reformatting (re-aligning `@` field descriptions with tabs) is a separate cosmetic change mixed in with the functional change. Not a blocker but worth noting. **Question for serdev maintainer:** This adds a pointer to every `serdev_device` even when no Rust driver is loaded. Given that serdev devices are relatively few, this is negligible overhead, but some maintainers prefer compile-time gating (e.g., `#ifdef CONFIG_RUST`). Worth considering. --- --- Generated by Claude Code Patch Reviewer