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: Thu, 23 Apr 2026 09:21:38 +1000	[thread overview]
Message-ID: <review-patch2-20260420-rust_serdev-v5-2-57e8ba0519f3@posteo.de> (raw)
In-Reply-To: <20260420-rust_serdev-v5-2-57e8ba0519f3@posteo.de>

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

  reply	other threads:[~2026-04-22 23:21 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-04-20 20:07 [PATCH v5 0/4] rust: add basic serial device bus abstractions Markus Probst
2026-04-20 20:07 ` [PATCH v5 1/4] rust: devres: return reference in `devres::register` Markus Probst
2026-04-22 23:21   ` Claude review: " Claude Code Review Bot
2026-04-20 20:07 ` [PATCH v5 2/4] serdev: add rust private data to serdev_device Markus Probst
2026-04-22 23:21   ` Claude Code Review Bot [this message]
2026-04-20 20:07 ` [PATCH v5 3/4] rust: add basic serial device bus abstractions Markus Probst
2026-04-22 23:21   ` Claude review: " Claude Code Review Bot
2026-04-20 20:07 ` [PATCH v5 4/4] samples: rust: add Rust serial device bus sample device driver Markus Probst
2026-04-22 23:21   ` Claude review: " Claude Code Review Bot
2026-04-22 23:21 ` Claude review: rust: add basic serial device bus abstractions Claude Code Review Bot
  -- strict thread matches above, loose matches on Subject: below --
2026-04-29 18:21 [PATCH v7 0/4] " Markus Probst via B4 Relay
2026-04-29 18:21 ` [PATCH v7 2/4] serdev: add rust private data to serdev_device Markus Probst via B4 Relay
2026-05-05  1:18   ` Claude review: " Claude Code Review Bot
2026-04-27 18:05 [PATCH v6 0/4] rust: add basic serial device bus abstractions Markus Probst via B4 Relay
2026-04-27 18:05 ` [PATCH v6 2/4] serdev: add rust private data to serdev_device Markus Probst via B4 Relay
2026-04-28  4:14   ` Claude review: " Claude Code Review Bot
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 2/4] serdev: add rust private data to serdev_device Markus Probst via B4 Relay
2026-04-11 22:55   ` Claude review: " 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-20260420-rust_serdev-v5-2-57e8ba0519f3@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