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: Sun, 12 Apr 2026 08:55:16 +1000 Message-ID: In-Reply-To: <20260411-rust_serdev-v4-2-845e960c6627@posteo.de> References: <20260411-rust_serdev-v4-0-845e960c6627@posteo.de> <20260411-rust_serdev-v4-2-845e960c6627@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 This patch adds a `void *rust_private_data` field to `struct serdev_device` for use by the Rust abstraction's probe synchronization mechanism. **Design concern**: Adding a Rust-specific field to a core C struct is an intrusive approach. Every `struct serdev_device` instance (including those used purely by C drivers) will carry this extra pointer. While the memory cost is negligible (8 bytes on 64-bit), this sets a precedent. An alternative would be to use a side table (e.g., an IDR or XArray keyed by device pointer), but that adds complexity. This design choice should be explicitly blessed by the serdev maintainer (Rob Herring). **Documentation fix**: The patch also fixes the existing kerneldoc by adding missing colons to `@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 ``` This kerneldoc fix should ideally be a separate patch to keep concerns separated, but it's minor. --- Generated by Claude Code Patch Reviewer