Subject: linux-next: manual merge of the rust tree with the driver-core tree

From: Mark Brown <[email-masked]>
Date: Tue, 16 Sep 2025 14:27:27 +0100

Hi all,

Today's linux-next merge of the rust tree got a conflict in:

  rust/kernel/device.rs

between commit:

  1e180614b3608 ("rust: driver-core: Update ARef and AlwaysRefCounted imports from sync::aref")

from the driver-core tree and commit:

  97bcbe585476e ("rust: device: use `kernel::{fmt,prelude::fmt!}`")

from the rust tree.

I fixed it up (see below) and can carry the fix as necessary. This
is now fixed as far as linux-next is concerned, but any non trivial
conflicts should be mentioned to your upstream maintainer when your tree
is submitted for merging.  You may also want to consider cooperating
with the maintainer of the conflicting tree to minimise any particularly
complex conflicts.

diff --cc rust/kernel/device.rs
index c2a6f5c203f04,303af0ef9bf73..0000000000000
--- a/rust/kernel/device.rs
+++ b/rust/kernel/device.rs
@@@ -5,11 -5,10 +5,11 @@@
  //! C header: [`include/linux/device.h`](srctree/include/linux/device.h)
  
  use crate::{
-     bindings,
+     bindings, fmt,
 -    types::{ARef, ForeignOwnable, Opaque},
 +    sync::aref::ARef,
 +    types::{ForeignOwnable, Opaque},
  };
- use core::{fmt, marker::PhantomData, ptr};
+ use core::{marker::PhantomData, ptr};
  
  #[cfg(CONFIG_PRINTK)]
  use crate::c_str;