From: Daniel Almeida <daniel.almeida@collabora.com>
To: Tamir Duberstein <tamird@kernel.org>
Cc: "Michael Turquette" <mturquette@baylibre.com>,
"Stephen Boyd" <sboyd@kernel.org>,
"Miguel Ojeda" <ojeda@kernel.org>,
"Boqun Feng" <boqun.feng@gmail.com>,
"Gary Guo" <gary@garyguo.net>,
"Björn Roy Baron" <bjorn3_gh@protonmail.com>,
"Benno Lossin" <lossin@kernel.org>,
"Andreas Hindborg" <a.hindborg@kernel.org>,
"Alice Ryhl" <aliceryhl@google.com>,
"Trevor Gross" <tmgross@umich.edu>,
"Danilo Krummrich" <dakr@kernel.org>,
linux-clk@vger.kernel.org, rust-for-linux@vger.kernel.org,
linux-kernel@vger.kernel.org,
"Tamir Duberstein" <tamird@gmail.com>,
"Greg Kroah-Hartman" <gregkh@linuxfoundation.org>,
"Viresh Kumar" <viresh.kumar@linaro.org>
Subject: Re: [PATCH] rust: clk: replace `kernel::c_str!` with C-Strings
Date: Mon, 22 Dec 2025 11:33:43 -0300 [thread overview]
Message-ID: <E7DE7379-7F5A-437A-A518-FCF90824CDB0@collabora.com> (raw)
In-Reply-To: <20251222-cstr-clk-v1-1-ef0687717aa1@gmail.com>
> On 22 Dec 2025, at 09:16, Tamir Duberstein <tamird@kernel.org> wrote:
>
> From: Tamir Duberstein <tamird@gmail.com>
>
> C-String literals were added in Rust 1.77. Replace instances of
> `kernel::c_str!` with C-String literals where possible.
>
> Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> Reviewed-by: Alice Ryhl <aliceryhl@google.com>
> Reviewed-by: Benno Lossin <lossin@kernel.org>
> Acked-by: Stephen Boyd <sboyd@kernel.org>
> Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
> Signed-off-by: Tamir Duberstein <tamird@gmail.com>
> ---
> rust/kernel/clk.rs | 6 ++----
> 1 file changed, 2 insertions(+), 4 deletions(-)
>
> diff --git a/rust/kernel/clk.rs b/rust/kernel/clk.rs
> index c1cfaeaa36a2..68a0c2f4e318 100644
> --- a/rust/kernel/clk.rs
> +++ b/rust/kernel/clk.rs
> @@ -104,13 +104,12 @@ mod common_clk {
> /// The following example demonstrates how to obtain and configure a clock for a device.
> ///
> /// ```
> - /// use kernel::c_str;
> /// use kernel::clk::{Clk, Hertz};
> /// use kernel::device::Device;
> /// use kernel::error::Result;
> ///
> /// fn configure_clk(dev: &Device) -> Result {
> - /// let clk = Clk::get(dev, Some(c_str!("apb_clk")))?;
> + /// let clk = Clk::get(dev, Some(c"apb_clk"))?;
> ///
> /// clk.prepare_enable()?;
> ///
> @@ -272,13 +271,12 @@ fn drop(&mut self) {
> /// device. The code functions correctly whether or not the clock is available.
> ///
> /// ```
> - /// use kernel::c_str;
> /// use kernel::clk::{OptionalClk, Hertz};
> /// use kernel::device::Device;
> /// use kernel::error::Result;
> ///
> /// fn configure_clk(dev: &Device) -> Result {
> - /// let clk = OptionalClk::get(dev, Some(c_str!("apb_clk")))?;
> + /// let clk = OptionalClk::get(dev, Some(c"apb_clk"))?;
> ///
> /// clk.prepare_enable()?;
> ///
>
> ---
> base-commit: 8f0b4cce4481fb22653697cced8d0d04027cb1e8
> change-id: 20251222-cstr-clk-122a1428b919
>
> Best regards,
> --
> Tamir Duberstein <tamird@gmail.com>
>
>
Reviewed-by: Daniel Almeida <daniel.almeida@collabora.com>
next prev parent reply other threads:[~2025-12-22 14:34 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-12-22 12:16 Tamir Duberstein
2025-12-22 14:33 ` Daniel Almeida [this message]
2026-01-04 2:29 ` Tamir Duberstein
2026-01-19 12:51 ` Tamir Duberstein
2026-01-19 17:59 ` Miguel Ojeda
2026-01-27 14:14 ` Tamir Duberstein
2026-01-27 14:27 ` Miguel Ojeda
2026-01-27 16:15 ` Tamir Duberstein
2026-01-30 4:42 ` Miguel Ojeda
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=E7DE7379-7F5A-437A-A518-FCF90824CDB0@collabora.com \
--to=daniel.almeida@collabora.com \
--cc=a.hindborg@kernel.org \
--cc=aliceryhl@google.com \
--cc=bjorn3_gh@protonmail.com \
--cc=boqun.feng@gmail.com \
--cc=dakr@kernel.org \
--cc=gary@garyguo.net \
--cc=gregkh@linuxfoundation.org \
--cc=linux-clk@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lossin@kernel.org \
--cc=mturquette@baylibre.com \
--cc=ojeda@kernel.org \
--cc=rust-for-linux@vger.kernel.org \
--cc=sboyd@kernel.org \
--cc=tamird@gmail.com \
--cc=tamird@kernel.org \
--cc=tmgross@umich.edu \
--cc=viresh.kumar@linaro.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®