[PATCH] rust: sync: atomic: Fix fmt warning

Boqun Feng posted 1 patch 2 days, 4 hours ago
rust/kernel/sync/atomic.rs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
[PATCH] rust: sync: atomic: Fix fmt warning
Posted by Boqun Feng 2 days, 4 hours ago
Commit 14e9a18b07ec ("rust: sync: atomic: Make Atomic*Ops pub(crate)")
introduced an import ordering that rustfmt disagrees with. Hence fix it.

Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/lkml/202512110753.8B3YlvtX-lkp@intel.com/
Fixes: 14e9a18b07ec ("rust: sync: atomic: Make Atomic*Ops pub(crate)")
Signed-off-by: Boqun Feng <boqun.feng@gmail.com>
---
Hi Ingo & Peter,

Looks like I missed one rustfmt issue in the commit 14e9a18b07ec in
tip/locking/core, here is the fix. Feel free to fold it if you want.
Apologies for not catching this earlier.

 rust/kernel/sync/atomic.rs | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/rust/kernel/sync/atomic.rs b/rust/kernel/sync/atomic.rs
index 3afc376be42d..c07a53f8360b 100644
--- a/rust/kernel/sync/atomic.rs
+++ b/rust/kernel/sync/atomic.rs
@@ -21,8 +21,8 @@
 mod predefine;
 
 pub use internal::AtomicImpl;
-pub use ordering::{Acquire, Full, Relaxed, Release};
 pub(crate) use internal::{AtomicArithmeticOps, AtomicBasicOps, AtomicExchangeOps};
+pub use ordering::{Acquire, Full, Relaxed, Release};
 
 use crate::build_error;
 use internal::AtomicRepr;
-- 
2.51.0
Re: [PATCH] rust: sync: atomic: Fix fmt warning
Posted by Miguel Ojeda 2 days, 2 hours ago
On Thu, Dec 11, 2025 at 10:31 PM Boqun Feng <boqun.feng@gmail.com> wrote:
>
> Commit 14e9a18b07ec ("rust: sync: atomic: Make Atomic*Ops pub(crate)")
> introduced an import ordering that rustfmt disagrees with. Hence fix it.
>
> Reported-by: kernel test robot <lkp@intel.com>
> Closes: https://lore.kernel.org/lkml/202512110753.8B3YlvtX-lkp@intel.com/
> Fixes: 14e9a18b07ec ("rust: sync: atomic: Make Atomic*Ops pub(crate)")
> Signed-off-by: Boqun Feng <boqun.feng@gmail.com>
> ---
> Hi Ingo & Peter,
>
> Looks like I missed one rustfmt issue in the commit 14e9a18b07ec in
> tip/locking/core, here is the fix. Feel free to fold it if you want.
> Apologies for not catching this earlier.

Linus picked 309e49039f12 ("rust: sync: atomic: separate import
"blocks"") in mainline a few days ago (but the solution I did was to
add a newline to separate the import "blocks" with different
visibility instead).

Cheers,
Miguel
Re: [PATCH] rust: sync: atomic: Fix fmt warning
Posted by Boqun Feng 2 days, 2 hours ago
On Fri, Dec 12, 2025 at 12:16:45AM +0100, Miguel Ojeda wrote:
> On Thu, Dec 11, 2025 at 10:31 PM Boqun Feng <boqun.feng@gmail.com> wrote:
> >
> > Commit 14e9a18b07ec ("rust: sync: atomic: Make Atomic*Ops pub(crate)")
> > introduced an import ordering that rustfmt disagrees with. Hence fix it.
> >
> > Reported-by: kernel test robot <lkp@intel.com>
> > Closes: https://lore.kernel.org/lkml/202512110753.8B3YlvtX-lkp@intel.com/
> > Fixes: 14e9a18b07ec ("rust: sync: atomic: Make Atomic*Ops pub(crate)")
> > Signed-off-by: Boqun Feng <boqun.feng@gmail.com>
> > ---
> > Hi Ingo & Peter,
> >
> > Looks like I missed one rustfmt issue in the commit 14e9a18b07ec in
> > tip/locking/core, here is the fix. Feel free to fold it if you want.
> > Apologies for not catching this earlier.
> 
> Linus picked 309e49039f12 ("rust: sync: atomic: separate import
> "blocks"") in mainline a few days ago (but the solution I did was to
> add a newline to separate the import "blocks" with different
> visibility instead).
> 

I see, I must miss that. Hence I'm happy to drop this patch ;-) Thank
you!

Regards,
Boqun

> Cheers,
> Miguel