rust-for-linux.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] rust: arc: remove unused PhantomData
@ 2024-11-04 21:23 Tamir Duberstein
  2024-11-04 22:42 ` Boqun Feng
  0 siblings, 1 reply; 17+ messages in thread
From: Tamir Duberstein @ 2024-11-04 21:23 UTC (permalink / raw)
  To: Miguel Ojeda, Alex Gaynor, Boqun Feng, Gary Guo,
	Björn Roy Baron, Benno Lossin, Andreas Hindborg, Alice Ryhl,
	Trevor Gross
  Cc: rust-for-linux, linux-kernel, Tamir Duberstein

There's no need for this. The type had the same form when it was first
introduced, so it seems this was never necessary.

Fixed: 9dc043655003 ("rust: sync: add `Arc` for ref-counted allocations")
Signed-off-by: Tamir Duberstein <tamird@gmail.com>
---
 rust/kernel/sync/arc.rs | 2 --
 1 file changed, 2 deletions(-)

diff --git a/rust/kernel/sync/arc.rs b/rust/kernel/sync/arc.rs
index db9da352d588f65348aa7a5204abbb165b70197f..7e54d31538273d410f80fd65b2070e75e4f69428 100644
--- a/rust/kernel/sync/arc.rs
+++ b/rust/kernel/sync/arc.rs
@@ -127,7 +127,6 @@
 /// ```
 pub struct Arc<T: ?Sized> {
     ptr: NonNull<ArcInner<T>>,
-    _p: PhantomData<ArcInner<T>>,
 }
 
 #[pin_data]
@@ -219,7 +218,6 @@ unsafe fn from_inner(inner: NonNull<ArcInner<T>>) -> Self {
         // INVARIANT: By the safety requirements, the invariants hold.
         Arc {
             ptr: inner,
-            _p: PhantomData,
         }
     }
 

---
base-commit: ae7851c29747fa3765ecb722fe722117a346f988
change-id: 20241104-simplify-arc-70c3574b5fac

Best regards,
-- 
Tamir Duberstein <tamird@gmail.com>


^ permalink raw reply related	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2024-11-07  8:50 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-11-04 21:23 [PATCH] rust: arc: remove unused PhantomData Tamir Duberstein
2024-11-04 22:42 ` Boqun Feng
2024-11-05 11:24   ` Tamir Duberstein
2024-11-05 12:29   ` Miguel Ojeda
2024-11-05 20:13     ` Tamir Duberstein
2024-11-06  9:26       ` Alice Ryhl
2024-11-06 13:44         ` Tamir Duberstein
2024-11-06 15:38           ` Miguel Ojeda
2024-11-06 16:41             ` Tamir Duberstein
2024-11-06 18:30               ` Miguel Ojeda
2024-11-06 19:08                 ` Tamir Duberstein
2024-11-07  8:49                   ` Miguel Ojeda
2024-11-06 15:38       ` Miguel Ojeda
2024-11-06 16:32         ` Tamir Duberstein
2024-11-06 18:19           ` Miguel Ojeda
2024-11-06 21:12             ` Tamir Duberstein
2024-11-07  7:55               ` Alice Ryhl

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).