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, 23 Apr 2026 09:21:38 +1000 Message-ID: In-Reply-To: <20260420-rust_serdev-v5-2-57e8ba0519f3@posteo.de> References: <20260420-rust_serdev-v5-0-57e8ba0519f3@posteo.de> <20260420-rust_serdev-v5-2-57e8ba0519f3@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`: ```c + void *rust_private_data; ``` This is the most debatable design choice in the series. It adds a pointer to every `serdev_device` instance, even when no Rust driver is present. The alternative would be using a side data structure (e.g., an IDR/XArray lookup), but that would add complexity and overhead in the receive path. The doc update fixes the missing colons on `@write_comp` and `@write_lock`: ```c - * @write_comp Completion used by serdev_device_write() internally - * @write_lock Lock to serialize access when writing data + * @write_comp: Completion used by serdev_device_write() internally + * @write_lock: Lock to serialize access when writing data ``` That's a nice cleanup, but the re-alignment to very wide column positions (tabs to column ~24) changes the style relative to the other fields. Might attract style comments from the serdev maintainer. The field is not initialized anywhere, but `serdev_device_alloc` uses `kzalloc` for the controller, and the device is allocated via `device_register`, so the field should be zero-initialized. Still, it would be more defensive to document or assert that assumption. This patch is missing a `Signed-off-by` or `Acked-by` from Rob Herring (the serdev maintainer), which is important since it modifies a core C header he maintains. --- Generated by Claude Code Patch Reviewer