All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Danilo Krummrich" <dakr@kernel.org>
To: "Tamir Duberstein" <tamird@gmail.com>
Cc: "Maarten Lankhorst" <maarten.lankhorst@linux.intel.com>,
	"Maxime Ripard" <mripard@kernel.org>,
	"Thomas Zimmermann" <tzimmermann@suse.de>,
	"David Airlie" <airlied@gmail.com>,
	"Simona Vetter" <simona@ffwll.ch>,
	"Miguel Ojeda" <ojeda@kernel.org>,
	"Alex Gaynor" <alex.gaynor@gmail.com>,
	"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>,
	"Greg Kroah-Hartman" <gregkh@linuxfoundation.org>,
	"Dave Ertman" <david.m.ertman@intel.com>,
	"Ira Weiny" <ira.weiny@intel.com>,
	"Leon Romanovsky" <leon@kernel.org>,
	"Breno Leitao" <leitao@debian.org>,
	"Rafael J. Wysocki" <rafael@kernel.org>,
	"Viresh Kumar" <viresh.kumar@linaro.org>,
	"Luis Chamberlain" <mcgrof@kernel.org>,
	"Russ Weight" <russ.weight@linux.dev>,
	"Brendan Higgins" <brendan.higgins@linux.dev>,
	"David Gow" <davidgow@google.com>, "Rae Moar" <rmoar@google.com>,
	"FUJITA Tomonori" <fujita.tomonori@gmail.com>,
	"Rob Herring" <robh@kernel.org>,
	"Saravana Kannan" <saravanak@google.com>,
	dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org,
	rust-for-linux@vger.kernel.org, linux-pm@vger.kernel.org,
	linux-kselftest@vger.kernel.org, kunit-dev@googlegroups.com,
	netdev@vger.kernel.org, devicetree@vger.kernel.org
Subject: Re: [PATCH 05/10] rust: drm: use `core::ffi::CStr` method names
Date: Mon, 14 Jul 2025 13:09:39 +0200	[thread overview]
Message-ID: <DBBQCHNN1N7F.3O470V9YDXE70@kernel.org> (raw)
In-Reply-To: <20250709-core-cstr-fanout-1-v1-5-fd793b3e58a2@gmail.com>

On Wed Jul 9, 2025 at 9:58 PM CEST, Tamir Duberstein wrote:
> Prepare for `core::ffi::CStr` taking the place of `kernel::str::CStr` by
> avoid methods that only exist on the latter.
>
> Link: https://github.com/Rust-for-Linux/linux/issues/1075
> Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> Reviewed-by: Alice Ryhl <aliceryhl@google.com>
> Signed-off-by: Tamir Duberstein <tamird@gmail.com>
> ---
>  rust/kernel/drm/device.rs | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/rust/kernel/drm/device.rs b/rust/kernel/drm/device.rs
> index b7ee3c464a12..998b942b6dd8 100644
> --- a/rust/kernel/drm/device.rs
> +++ b/rust/kernel/drm/device.rs
> @@ -83,8 +83,8 @@ impl<T: drm::Driver> Device<T> {
>          major: T::INFO.major,
>          minor: T::INFO.minor,
>          patchlevel: T::INFO.patchlevel,
> -        name: T::INFO.name.as_char_ptr().cast_mut(),
> -        desc: T::INFO.desc.as_char_ptr().cast_mut(),
> +        name: crate::str::as_char_ptr_in_const_context(T::INFO.name).cast_mut(),
> +        desc: crate::str::as_char_ptr_in_const_context(T::INFO.desc).cast_mut(),

Maybe looks slightly cleaner to import this function, not a blocker though.

  reply	other threads:[~2025-07-14 11:09 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-07-09 19:58 [PATCH 00/10] rust: use `core::ffi::CStr` method names Tamir Duberstein
2025-07-09 19:58 ` [PATCH 01/10] gpu: nova-core: " Tamir Duberstein
2025-07-14 11:11   ` Danilo Krummrich
2025-07-14 12:34     ` Tamir Duberstein
2025-07-14 15:18       ` Miguel Ojeda
2025-07-14 15:27         ` Tamir Duberstein
2025-07-14 16:17           ` Miguel Ojeda
2025-07-09 19:58 ` [PATCH 02/10] rust: auxiliary: " Tamir Duberstein
2025-07-09 19:58 ` [PATCH 03/10] rust: configfs: " Tamir Duberstein
2025-07-09 19:58 ` [PATCH 04/10] rust: cpufreq: " Tamir Duberstein
2025-07-09 19:58 ` [PATCH 05/10] rust: drm: " Tamir Duberstein
2025-07-14 11:09   ` Danilo Krummrich [this message]
2025-07-14 12:28     ` Tamir Duberstein
2025-07-09 19:58 ` [PATCH 06/10] rust: firmware: " Tamir Duberstein
2025-07-09 19:58 ` [PATCH 07/10] rust: kunit: " Tamir Duberstein
2025-07-09 19:58 ` [PATCH 08/10] rust: miscdevice: " Tamir Duberstein
2025-07-09 19:58 ` [PATCH 09/10] rust: net: " Tamir Duberstein
2025-07-09 19:59 ` [PATCH 10/10] rust: of: " Tamir Duberstein
2025-07-09 20:20 ` [PATCH 00/10] rust: " Benno Lossin
2025-07-14 11:13 ` Danilo Krummrich

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=DBBQCHNN1N7F.3O470V9YDXE70@kernel.org \
    --to=dakr@kernel.org \
    --cc=a.hindborg@kernel.org \
    --cc=airlied@gmail.com \
    --cc=alex.gaynor@gmail.com \
    --cc=aliceryhl@google.com \
    --cc=bjorn3_gh@protonmail.com \
    --cc=boqun.feng@gmail.com \
    --cc=brendan.higgins@linux.dev \
    --cc=david.m.ertman@intel.com \
    --cc=davidgow@google.com \
    --cc=devicetree@vger.kernel.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=fujita.tomonori@gmail.com \
    --cc=gary@garyguo.net \
    --cc=gregkh@linuxfoundation.org \
    --cc=ira.weiny@intel.com \
    --cc=kunit-dev@googlegroups.com \
    --cc=leitao@debian.org \
    --cc=leon@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=lossin@kernel.org \
    --cc=maarten.lankhorst@linux.intel.com \
    --cc=mcgrof@kernel.org \
    --cc=mripard@kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=ojeda@kernel.org \
    --cc=rafael@kernel.org \
    --cc=rmoar@google.com \
    --cc=robh@kernel.org \
    --cc=russ.weight@linux.dev \
    --cc=rust-for-linux@vger.kernel.org \
    --cc=saravanak@google.com \
    --cc=simona@ffwll.ch \
    --cc=tamird@gmail.com \
    --cc=tmgross@umich.edu \
    --cc=tzimmermann@suse.de \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.