From: Tamir Duberstein Date: Sat, 18 Oct 2025 19:16:24 +0000 (-0400) Subject: rust_binder: use `kernel::fmt` X-Git-Tag: v6.19-rc1~175^2~31 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5aed9677e507fdf43510fc62774fe40a03c47f31;p=thirdparty%2Fkernel%2Flinux.git rust_binder: use `kernel::fmt` 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 Signed-off-by: Tamir Duberstein Link: https://patch.msgid.link/20251018-cstr-core-v18-3-9378a54385f8@gmail.com Signed-off-by: Miguel Ojeda --- diff --git a/drivers/android/binder/error.rs b/drivers/android/binder/error.rs index 9921827267d0d..b24497cfa292a 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 @@ impl From 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