Skip to contentSkip to conversation

rust: bitmap: fix formatting

PATCH In review Miguel Ojeda 3 participants 3 messages Oct 16, 2025 – Oct 19, 2025

Subsystems (2)
lore
Share & tools
lore

Miguel Ojeda

author maintainer
#0 lore raw

PATCH 1/1 rust: bitmap: fix formatting

We do our best to keep the repository rustfmt-clean, thus run the tool to fix the formatting issue.

---
This one will go on top of:

    https://lore.kernel.org/rust-for-linux/[email protected]/
 rust/kernel/bitmap.rs | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)
rust/kernel/bitmap.rs +6 -2
index 711b8368b38f..aa8fc7bf06fc 100644
@@ -167,7 +167,9 @@ fn deref(&self) -> &Bitmap {
         let ptr = if self.nbits <= BITS_PER_LONG {
             // SAFETY: Bitmap is represented inline.
             #[allow(unused_unsafe, reason = "Safe since Rust 1.92.0")]
-            unsafe { core::ptr::addr_of!(self.repr.bitmap) }
+            unsafe {
+                core::ptr::addr_of!(self.repr.bitmap)
+            }
         } else {
             // SAFETY: Bitmap is represented as array of `unsigned long`.
             unsafe { self.repr.ptr.as_ptr() }
@@ -184,7 +186,9 @@ fn deref_mut(&mut self) -> &mut Bitmap {
         let ptr = if self.nbits <= BITS_PER_LONG {
             // SAFETY: Bitmap is represented inline.
             #[allow(unused_unsafe, reason = "Safe since Rust 1.92.0")]
-            unsafe { core::ptr::addr_of_mut!(self.repr.bitmap) }
+            unsafe {
+                core::ptr::addr_of_mut!(self.repr.bitmap)
+            }
         } else {
             // SAFETY: Bitmap is represented as array of `unsigned long`.
             unsafe { self.repr.ptr.as_ptr() }

base-commit: 32f072d9eaf9c31c2b0527a4a3370570a731e3cc --
2.51.0

Reviewed-by on v1 1/1
#1 lore raw
Quoted 8 lines · Miguel Ojeda

We do our best to keep the repository rustfmt-clean, thus run the tool to fix the formatting issue.

#2 lore raw
In reply to Miguel Ojeda
Quoted 4 lines · Miguel Ojeda

We do our best to keep the repository rustfmt-clean, thus run the tool to fix the formatting issue.

Quoted 8 lines

---
This one will go on top of:

    https://lore.kernel.org/rust-for-linux/[email protected]/

For completeness: I applied this one together with the others and they got merged by Linus. The tree is now again rustfmt-clean.

Thanks!

Cheers,
Miguel