]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
rust_binder: use `kernel::fmt`
authorTamir Duberstein <tamird@gmail.com>
Sat, 18 Oct 2025 19:16:24 +0000 (15:16 -0400)
committerMiguel Ojeda <ojeda@kernel.org>
Mon, 20 Oct 2025 02:04:23 +0000 (04:04 +0200)
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>
Link: https://patch.msgid.link/20251018-cstr-core-v18-3-9378a54385f8@gmail.com
Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
drivers/android/binder/error.rs

index 9921827267d0d679f5aebb586ecf190efe7c6405..b24497cfa292a6f7b7f24aa4c310f8cbb58fea86 100644 (file)
@@ -2,6 +2,7 @@
 
 // Copyright (C) 2025 Google LLC.
 
+use kernel::fmt;
 use kernel::prelude::*;
 
 use crate::defs::*;
@@ -76,8 +77,8 @@ impl From<kernel::alloc::AllocError> for BinderError {
     }
 }
 
-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