mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "tip-bot2 for Tamir Duberstein" <tip-bot2@linutronix.de>
To: linux-tip-commits@vger.kernel.org
Cc: Tamir Duberstein <tamird@kernel.org>,
	Boqun Feng <boqun.feng@gmail.com>,
	"Peter Zijlstra (Intel)" <peterz@infradead.org>,
	Gary Guo <gary@garyguo.net>,
	x86@kernel.org, linux-kernel@vger.kernel.org
Subject: [tip: locking/core] rust: sync: Replace `kernel::c_str!` with C-Strings
Date: Wed, 28 Jan 2026 08:33:23 -0000	[thread overview]
Message-ID: <176958920344.510.9567843514888583363.tip-bot2@tip-bot2> (raw)
In-Reply-To: <20260123054624.8226-2-boqun.feng@gmail.com>

The following commit has been merged into the locking/core branch of tip:

Commit-ID:     e6de07249ef381b674f0d65adf9defcdab76b768
Gitweb:        https://git.kernel.org/tip/e6de07249ef381b674f0d65adf9defcdab76b768
Author:        Tamir Duberstein <tamird@kernel.org>
AuthorDate:    Thu, 22 Jan 2026 21:46:24 -08:00
Committer:     Peter Zijlstra <peterz@infradead.org>
CommitterDate: Wed, 28 Jan 2026 09:25:44 +01:00

rust: sync: Replace `kernel::c_str!` with C-Strings

C-String literals were added in Rust 1.77. Replace instances of
`kernel::c_str!` with C-String literals where possible.

Signed-off-by: Tamir Duberstein <tamird@kernel.org>
Signed-off-by: Boqun Feng <boqun.feng@gmail.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Reviewed-by: Gary Guo <gary@garyguo.net>
Link: https://patch.msgid.link/20260120-cstr-sync-again-v1-1-2a775a2a36fd@kernel.org
Link: https://patch.msgid.link/20260123054624.8226-2-boqun.feng@gmail.com
---
 rust/kernel/sync.rs | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/rust/kernel/sync.rs b/rust/kernel/sync.rs
index b10e576..993dbf2 100644
--- a/rust/kernel/sync.rs
+++ b/rust/kernel/sync.rs
@@ -126,13 +126,12 @@ impl PinnedDrop for LockClassKey {
 /// # Examples
 ///
 /// ```
-/// use kernel::c_str;
 /// use kernel::sync::{static_lock_class, Arc, SpinLock};
 ///
 /// fn new_locked_int() -> Result<Arc<SpinLock<u32>>> {
 ///     Arc::pin_init(SpinLock::new(
 ///         42,
-///         c_str!("new_locked_int"),
+///         c"new_locked_int",
 ///         static_lock_class!(),
 ///     ), GFP_KERNEL)
 /// }

  reply	other threads:[~2026-01-28  8:33 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-01-20 21:13 [PATCH] rust: sync: replace " Tamir Duberstein
2026-01-20 21:16 ` Gary Guo
2026-01-21  1:09 ` Boqun Feng
2026-01-23  5:46   ` [GIT PULL][PATCH 0/1] Fixes for Rust synchronization PR of v7.0 Boqun Feng
2026-01-23  5:46     ` [PATCH 1/1] rust: sync: Replace `kernel::c_str!` with C-Strings Boqun Feng
2026-01-28  8:33       ` tip-bot2 for Tamir Duberstein [this message]
2026-01-27  6:12     ` [GIT PULL][PATCH 0/1] Fixes for Rust synchronization PR of v7.0 Boqun Feng
2026-01-27  8:30     ` Peter Zijlstra
2026-01-27 14:06       ` Boqun Feng

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=176958920344.510.9567843514888583363.tip-bot2@tip-bot2 \
    --to=tip-bot2@linutronix.de \
    --cc=boqun.feng@gmail.com \
    --cc=gary@garyguo.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tip-commits@vger.kernel.org \
    --cc=peterz@infradead.org \
    --cc=tamird@kernel.org \
    --cc=x86@kernel.org \
    /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

all inboxes | Powered by JetHome®