linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Tamir Duberstein <tamird@kernel.org>
To: "Greg Kroah-Hartman" <gregkh@linuxfoundation.org>,
	"Rafael J. Wysocki" <rafael@kernel.org>,
	"Danilo Krummrich" <dakr@kernel.org>,
	"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>,
	"Arve Hjønnevåg" <arve@android.com>,
	"Todd Kjos" <tkjos@android.com>,
	"Martijn Coenen" <maco@android.com>,
	"Joel Fernandes" <joelagnelf@nvidia.com>,
	"Christian Brauner" <brauner@kernel.org>,
	"Carlos Llamas" <cmllamas@google.com>,
	"Suren Baghdasaryan" <surenb@google.com>,
	"Jens Axboe" <axboe@kernel.dk>,
	"Lorenzo Stoakes" <lorenzo.stoakes@oracle.com>,
	"Vlastimil Babka" <vbabka@suse.cz>,
	"Liam R. Howlett" <Liam.Howlett@oracle.com>,
	"Uladzislau Rezki" <urezki@gmail.com>,
	"Bjorn Helgaas" <bhelgaas@google.com>,
	"Krzysztof Wilczyński" <kwilczynski@kernel.org>,
	"Viresh Kumar" <vireshk@kernel.org>, "Nishanth Menon" <nm@ti.com>,
	"Stephen Boyd" <sboyd@kernel.org>,
	"Breno Leitao" <leitao@debian.org>,
	"Liam Girdwood" <lgirdwood@gmail.com>,
	"Mark Brown" <broonie@kernel.org>,
	"Michael Turquette" <mturquette@baylibre.com>,
	"David Airlie" <airlied@gmail.com>,
	"Simona Vetter" <simona@ffwll.ch>,
	"Luis Chamberlain" <mcgrof@kernel.org>,
	"Russ Weight" <russ.weight@linux.dev>,
	"Alexander Viro" <viro@zeniv.linux.org.uk>,
	"Jan Kara" <jack@suse.cz>,
	"Peter Zijlstra" <peterz@infradead.org>,
	"Ingo Molnar" <mingo@redhat.com>, "Will Deacon" <will@kernel.org>,
	"Waiman Long" <longman@redhat.com>,
	"Nathan Chancellor" <nathan@kernel.org>,
	"Nick Desaulniers" <nick.desaulniers+lkml@gmail.com>,
	"Bill Wendling" <morbo@google.com>,
	"Justin Stitt" <justinstitt@google.com>
Cc: rust-for-linux@vger.kernel.org, linux-kernel@vger.kernel.org,
	 linux-block@vger.kernel.org, linux-pci@vger.kernel.org,
	 linux-pm@vger.kernel.org, linux-clk@vger.kernel.org,
	 dri-devel@lists.freedesktop.org, linux-fsdevel@vger.kernel.org,
	 llvm@lists.linux.dev, Tamir Duberstein <tamird@gmail.com>
Subject: [RESEND PATCH v18 03/16] rust_binder: use `kernel::fmt`
Date: Sat, 18 Oct 2025 15:16:24 -0400	[thread overview]
Message-ID: <20251018-cstr-core-v18-3-9378a54385f8@gmail.com> (raw)
In-Reply-To: <20251018-cstr-core-v18-0-9378a54385f8@gmail.com>

From: Tamir Duberstein <tamird@gmail.com>

Reduce coupling to implementation details of the formatting machinery by
avoiding direct use for `core`'s formatting traits and macros.

This backslid in commit eafedbc7c050 ("rust_binder: add Rust Binder
driver").

Reviewed-by: Alice Ryhl <aliceryhl@google.com>
Signed-off-by: Tamir Duberstein <tamird@gmail.com>
---
 drivers/android/binder/error.rs | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/android/binder/error.rs b/drivers/android/binder/error.rs
index 9921827267d0..b24497cfa292 100644
--- a/drivers/android/binder/error.rs
+++ b/drivers/android/binder/error.rs
@@ -2,6 +2,7 @@
 
 // Copyright (C) 2025 Google LLC.
 
+use kernel::fmt;
 use kernel::prelude::*;
 
 use crate::defs::*;
@@ -76,8 +77,8 @@ fn from(_: kernel::alloc::AllocError) -> Self {
     }
 }
 
-impl core::fmt::Debug for BinderError {
-    fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
+impl fmt::Debug for BinderError {
+    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
         match self.reply {
             BR_FAILED_REPLY => match self.source.as_ref() {
                 Some(source) => f

-- 
2.51.1


  parent reply	other threads:[~2025-10-18 19:16 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-10-18 19:16 [RESEND PATCH v18 00/16] rust: replace kernel::str::CStr w/ core::ffi::CStr Tamir Duberstein
2025-10-18 19:16 ` [RESEND PATCH v18 01/16] samples: rust: platform: remove trailing commas Tamir Duberstein
2025-10-18 19:16 ` [RESEND PATCH v18 02/16] rust_binder: remove trailing comma Tamir Duberstein
2025-10-18 19:16 ` Tamir Duberstein [this message]
2025-10-18 19:16 ` [RESEND PATCH v18 04/16] rust_binder: use `core::ffi::CStr` method names Tamir Duberstein
2025-10-18 19:16 ` [RESEND PATCH v18 05/16] rnull: use `kernel::fmt` Tamir Duberstein
2025-10-18 19:16 ` [RESEND PATCH v18 06/16] rust: alloc: " Tamir Duberstein
2025-10-18 19:16 ` [RESEND PATCH v18 07/16] rust: debugfs: " Tamir Duberstein
2025-10-19 21:30   ` [PATCH] samples: rust: debugfs: use `core::ffi::CStr` method names Miguel Ojeda
2025-10-18 19:16 ` [RESEND PATCH v18 08/16] rust: pci: use `kernel::fmt` Tamir Duberstein
2025-10-18 19:16 ` [RESEND PATCH v18 09/16] rust: remove spurious `use core::fmt::Debug` Tamir Duberstein
2025-10-18 19:16 ` [RESEND PATCH v18 10/16] rust: opp: use `CStr::as_char_ptr` Tamir Duberstein
2025-10-19 21:27   ` Miguel Ojeda
2025-10-18 19:16 ` [RESEND PATCH v18 11/16] rust: opp: fix broken rustdoc link Tamir Duberstein
2025-10-19 21:25   ` Miguel Ojeda
2025-10-22  3:57     ` Viresh Kumar
2025-10-18 19:16 ` [RESEND PATCH v18 12/16] rust: configfs: use `CStr::as_char_ptr` Tamir Duberstein
2025-10-19 21:25   ` Miguel Ojeda
2025-10-20 12:40   ` Andreas Hindborg
2025-10-18 19:16 ` [RESEND PATCH v18 13/16] rust: regulator: " Tamir Duberstein
2025-10-19 21:25   ` Miguel Ojeda
2025-10-20 12:28     ` Mark Brown
2025-10-20 15:39   ` Daniel Almeida
2025-10-18 19:16 ` [RESEND PATCH v18 14/16] rust: clk: " Tamir Duberstein
2025-10-19 21:25   ` Miguel Ojeda
2025-10-18 19:16 ` [RESEND PATCH v18 15/16] rust: support formatting of foreign types Tamir Duberstein
2025-10-18 19:16 ` [RESEND PATCH v18 16/16] rust: replace `CStr` with `core::ffi::CStr` Tamir Duberstein
2025-10-18 19:24 ` [RESEND PATCH v18 00/16] rust: replace kernel::str::CStr w/ core::ffi::CStr Miguel Ojeda
2025-10-19 23:04 ` 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=20251018-cstr-core-v18-3-9378a54385f8@gmail.com \
    --to=tamird@kernel.org \
    --cc=Liam.Howlett@oracle.com \
    --cc=a.hindborg@kernel.org \
    --cc=airlied@gmail.com \
    --cc=alex.gaynor@gmail.com \
    --cc=aliceryhl@google.com \
    --cc=arve@android.com \
    --cc=axboe@kernel.dk \
    --cc=bhelgaas@google.com \
    --cc=bjorn3_gh@protonmail.com \
    --cc=boqun.feng@gmail.com \
    --cc=brauner@kernel.org \
    --cc=broonie@kernel.org \
    --cc=cmllamas@google.com \
    --cc=dakr@kernel.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=gary@garyguo.net \
    --cc=gregkh@linuxfoundation.org \
    --cc=jack@suse.cz \
    --cc=joelagnelf@nvidia.com \
    --cc=justinstitt@google.com \
    --cc=kwilczynski@kernel.org \
    --cc=leitao@debian.org \
    --cc=lgirdwood@gmail.com \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-clk@vger.kernel.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=llvm@lists.linux.dev \
    --cc=longman@redhat.com \
    --cc=lorenzo.stoakes@oracle.com \
    --cc=lossin@kernel.org \
    --cc=maco@android.com \
    --cc=mcgrof@kernel.org \
    --cc=mingo@redhat.com \
    --cc=morbo@google.com \
    --cc=mturquette@baylibre.com \
    --cc=nathan@kernel.org \
    --cc=nick.desaulniers+lkml@gmail.com \
    --cc=nm@ti.com \
    --cc=ojeda@kernel.org \
    --cc=peterz@infradead.org \
    --cc=rafael@kernel.org \
    --cc=russ.weight@linux.dev \
    --cc=rust-for-linux@vger.kernel.org \
    --cc=sboyd@kernel.org \
    --cc=simona@ffwll.ch \
    --cc=surenb@google.com \
    --cc=tamird@gmail.com \
    --cc=tkjos@android.com \
    --cc=tmgross@umich.edu \
    --cc=urezki@gmail.com \
    --cc=vbabka@suse.cz \
    --cc=vireshk@kernel.org \
    --cc=viro@zeniv.linux.org.uk \
    --cc=will@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;
as well as URLs for NNTP newsgroup(s).