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: rust: rename `kernel::c_str!` to `str_to_cstr!`
Date: Tue, 03 Mar 2026 13:00:33 +1000	[thread overview]
Message-ID: <review-overall-20260302-cstr-rename-macro-v1-1-a269fe4dc3f0@kernel.org> (raw)
In-Reply-To: <20260302-cstr-rename-macro-v1-1-a269fe4dc3f0@kernel.org>

Overall Series Review

Subject: rust: rename `kernel::c_str!` to `str_to_cstr!`
Author: Tamir Duberstein <tamird@kernel.org>
Patches: 3
Reviewed: 2026-03-03T13:00:33.239684

---

This is a single-patch rename of the `kernel::c_str!` macro to `kernel::str_to_cstr!`. The motivation is that since Rust 1.77, C string literals (`c"..."`) are the preferred way to create `&CStr` values from string literals, and this macro now only exists for non-literal cases (e.g., wrapping `stringify!()`, `concat!()`, `file!()` in macro contexts). The rename makes its narrower intended purpose explicit.

The patch is clean, mechanical, and complete. All 8 call sites within `rust/kernel/` are updated, which matches the full set of files found via grep. The macro is not in the prelude and has no external consumers in-tree (drivers, samples, etc.), so nothing is missed. The updated documentation clearly describes why the macro still exists and when to use it versus C string literals.

Already has Acked-by from Greg Kroah-Hartman and Reviewed-by from Alice Ryhl.

**Verdict:** This looks correct and ready to merge with one very minor nit.

---
Generated by Claude Code Patch Reviewer

      parent reply	other threads:[~2026-03-03  3:00 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-02 17:20 [PATCH] rust: rename `kernel::c_str!` to `str_to_cstr!` Tamir Duberstein
2026-03-02 17:31 ` Gary Guo
2026-03-02 17:45   ` Tamir Duberstein
2026-03-03  3:00 ` Claude review: " Claude Code Review Bot
2026-03-03  3:00 ` Claude Code Review Bot [this message]

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-overall-20260302-cstr-rename-macro-v1-1-a269fe4dc3f0@kernel.org \
    --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