public inbox for drm-ai-reviews@public-inbox.freedesktop.org
 help / color / mirror / Atom feed
From: Claude Code Review Bot <claude-review@example.com>
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	[thread overview]
Message-ID: <review-patch2-20260411-rust_serdev-v4-2-845e960c6627@posteo.de> (raw)
In-Reply-To: <20260411-rust_serdev-v4-2-845e960c6627@posteo.de>

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

  reply	other threads:[~2026-04-11 22:55 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-04-11 15:10 [PATCH v4 0/4] rust: add basic serial device bus abstractions Markus Probst via B4 Relay
2026-04-11 15:10 ` [PATCH v4 1/4] rust: devres: return reference in `devres::register` Markus Probst via B4 Relay
2026-04-11 22:55   ` Claude review: " Claude Code Review Bot
2026-04-11 15:10 ` [PATCH v4 2/4] serdev: add rust private data to serdev_device Markus Probst via B4 Relay
2026-04-11 22:55   ` Claude Code Review Bot [this message]
2026-04-11 15:10 ` [PATCH v4 3/4] rust: add basic serial device bus abstractions Markus Probst via B4 Relay
2026-04-11 22:55   ` Claude review: " Claude Code Review Bot
2026-04-11 15:10 ` [PATCH v4 4/4] samples: rust: add Rust serial device bus sample device driver Markus Probst via B4 Relay
2026-04-11 22:55   ` Claude review: " Claude Code Review Bot
2026-04-11 22:55 ` Claude review: rust: add basic serial device bus abstractions Claude Code Review Bot

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=review-patch2-20260411-rust_serdev-v4-2-845e960c6627@posteo.de \
    --to=claude-review@example.com \
    --cc=dri-devel-reviews@example.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox