Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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 <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>

authored by

Tamir Duberstein and committed by
Miguel Ojeda
5aed9677 d9252f1b

+3 -2
+3 -2
drivers/android/binder/error.rs
··· 2 2 3 3 // Copyright (C) 2025 Google LLC. 4 4 5 + use kernel::fmt; 5 6 use kernel::prelude::*; 6 7 7 8 use crate::defs::*; ··· 77 76 } 78 77 } 79 78 80 - impl core::fmt::Debug for BinderError { 81 - fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { 79 + impl fmt::Debug for BinderError { 80 + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { 82 81 match self.reply { 83 82 BR_FAILED_REPLY => match self.source.as_ref() { 84 83 Some(source) => f