[tip: locking/core] rust: sync: Use super::* in spinlock.rs

From: tip-bot2 for Lyude Paul

Date: Wed Aug 12 2026 - 07:23:56 EST


The following commit has been merged into the locking/core branch of tip:

Commit-ID: df9165ab5254acb2035919c6e0511de799c1e8c1
Gitweb: https://git.kernel.org/tip/df9165ab5254acb2035919c6e0511de799c1e8c1
Author: Lyude Paul <lyude@xxxxxxxxxx>
AuthorDate: Fri, 07 Aug 2026 00:02:13 -07:00
Committer: Peter Zijlstra <peterz@xxxxxxxxxxxxx>
CommitterDate: Mon, 10 Aug 2026 12:53:10 +02:00

rust: sync: Use super::* in spinlock.rs

No functional changes.

Signed-off-by: Lyude Paul <lyude@xxxxxxxxxx>
Signed-off-by: Boqun Feng <boqun@xxxxxxxxxx>
Signed-off-by: Peter Zijlstra (Intel) <peterz@xxxxxxxxxxxxx>
Link: https://patch.msgid.link/20260807070218.27144-17-boqun@xxxxxxxxxx
---
rust/kernel/sync/lock/spinlock.rs | 9 ++++-----
1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/rust/kernel/sync/lock/spinlock.rs b/rust/kernel/sync/lock/spinlock.rs
index ef76fa0..d75af32 100644
--- a/rust/kernel/sync/lock/spinlock.rs
+++ b/rust/kernel/sync/lock/spinlock.rs
@@ -3,6 +3,7 @@
//! A kernel spinlock.
//!
//! This module allows Rust code to use the kernel's `spinlock_t`.
+use super::*;

/// Creates a [`SpinLock`] initialiser with the given name and a newly-created lock class.
///
@@ -82,7 +83,7 @@ pub use new_spinlock;
/// ```
///
/// [`spinlock_t`]: srctree/include/linux/spinlock.h
-pub type SpinLock<T> = super::Lock<T, SpinLockBackend>;
+pub type SpinLock<T> = Lock<T, SpinLockBackend>;

/// A kernel `spinlock_t` lock backend.
pub struct SpinLockBackend;
@@ -91,13 +92,11 @@ pub struct SpinLockBackend;
///
/// This is simply a type alias for a [`Guard`] returned from locking a [`SpinLock`]. It will unlock
/// the [`SpinLock`] upon being dropped.
-///
-/// [`Guard`]: super::Guard
-pub type SpinLockGuard<'a, T> = super::Guard<'a, T, SpinLockBackend>;
+pub type SpinLockGuard<'a, T> = Guard<'a, T, SpinLockBackend>;

// SAFETY: The underlying kernel `spinlock_t` object ensures mutual exclusion. `relock` uses the
// default implementation that always calls the same locking method.
-unsafe impl super::Backend for SpinLockBackend {
+unsafe impl Backend for SpinLockBackend {
type State = bindings::spinlock_t;
type GuardState = ();