[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <DA66HHUA8ANF.BI2FH7POFSRJ@kernel.org>
Date: Mon, 26 May 2025 16:56:31 +0200
From: "Benno Lossin" <lossin@...nel.org>
To: "Tamir Duberstein" <tamird@...il.com>, "Michal Rostecki"
<vadorovsky@...tonmail.com>, "Miguel Ojeda" <ojeda@...nel.org>, "Alex
Gaynor" <alex.gaynor@...il.com>, "Boqun Feng" <boqun.feng@...il.com>, "Gary
Guo" <gary@...yguo.net>, Björn Roy Baron
<bjorn3_gh@...tonmail.com>, "Andreas Hindborg" <a.hindborg@...nel.org>,
"Alice Ryhl" <aliceryhl@...gle.com>, "Trevor Gross" <tmgross@...ch.edu>,
"Brendan Higgins" <brendan.higgins@...ux.dev>, "David Gow"
<davidgow@...gle.com>, "Rae Moar" <rmoar@...gle.com>, "Danilo Krummrich"
<dakr@...nel.org>, "Maarten Lankhorst" <maarten.lankhorst@...ux.intel.com>,
"Maxime Ripard" <mripard@...nel.org>, "Thomas Zimmermann"
<tzimmermann@...e.de>, "David Airlie" <airlied@...il.com>, "Simona Vetter"
<simona@...ll.ch>, "Greg Kroah-Hartman" <gregkh@...uxfoundation.org>,
"Rafael J. Wysocki" <rafael@...nel.org>, "Luis Chamberlain"
<mcgrof@...nel.org>, "Russ Weight" <russ.weight@...ux.dev>, "FUJITA
Tomonori" <fujita.tomonori@...il.com>, "Rob Herring" <robh@...nel.org>,
"Saravana Kannan" <saravanak@...gle.com>, "Peter Zijlstra"
<peterz@...radead.org>, "Ingo Molnar" <mingo@...hat.com>, "Will Deacon"
<will@...nel.org>, "Waiman Long" <longman@...hat.com>, "Nathan Chancellor"
<nathan@...nel.org>, "Nick Desaulniers" <nick.desaulniers+lkml@...il.com>,
"Bill Wendling" <morbo@...gle.com>, "Justin Stitt"
<justinstitt@...gle.com>, "Andrew Lunn" <andrew@...n.ch>, "Heiner Kallweit"
<hkallweit1@...il.com>, "Russell King" <linux@...linux.org.uk>, "David S.
Miller" <davem@...emloft.net>, "Eric Dumazet" <edumazet@...gle.com>, "Jakub
Kicinski" <kuba@...nel.org>, "Paolo Abeni" <pabeni@...hat.com>, "Bjorn
Helgaas" <bhelgaas@...gle.com>, "Arnd Bergmann" <arnd@...db.de>, "Jens
Axboe" <axboe@...nel.dk>, Krzysztof Wilczyński
<kwilczynski@...nel.org>
Cc: <rust-for-linux@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
<linux-kselftest@...r.kernel.org>, <kunit-dev@...glegroups.com>,
<dri-devel@...ts.freedesktop.org>, <netdev@...r.kernel.org>,
<devicetree@...r.kernel.org>, <llvm@...ts.linux.dev>,
<linux-pci@...r.kernel.org>, <nouveau@...ts.freedesktop.org>,
<linux-block@...r.kernel.org>
Subject: Re: [PATCH v10 3/5] rust: replace `CStr` with `core::ffi::CStr`
On Sat May 24, 2025 at 10:33 PM CEST, Tamir Duberstein wrote:
> `std::ffi::CStr` was moved to `core::ffi::CStr` in Rust 1.64. Replace
> `kernel::str::CStr` with `core::ffi::CStr` now that we can.
What's this supposed to mean?
> C-String literals were added in Rust 1.77. Opportunistically replace
> instances of `kernel::c_str!` with C-String literals where other code
> changes were already necessary; the rest will be done in a later commit.
Similarly this, the message should explain the motivation for the
change, the change itself and can include additional information.
>
> Signed-off-by: Tamir Duberstein <tamird@...il.com>
> ---
> drivers/gpu/drm/drm_panic_qr.rs | 2 +-
> rust/kernel/device.rs | 4 +-
> rust/kernel/error.rs | 4 +-
> rust/kernel/firmware.rs | 11 +-
> rust/kernel/kunit.rs | 6 +-
> rust/kernel/miscdevice.rs | 2 +-
> rust/kernel/net/phy.rs | 2 +-
> rust/kernel/of.rs | 2 +-
> rust/kernel/prelude.rs | 5 +-
> rust/kernel/seq_file.rs | 4 +-
> rust/kernel/str.rs | 358 +++++++++-------------------------------
> rust/kernel/sync/condvar.rs | 2 +-
> rust/kernel/sync/lock.rs | 2 +-
> rust/kernel/sync/lock/global.rs | 2 +-
> 14 files changed, 112 insertions(+), 294 deletions(-)
I'm a bit confused by some of the diffs here, they seem pretty messy,
any chance that they can be improved?
---
Cheers,
Benno
Powered by blists - more mailing lists