From c3bba9fb3bc46c3ae513b375e45a6923afde3801 Mon Sep 17 00:00:00 2001 From: Ben Gooding Date: Sun, 7 May 2023 17:27:39 +0100 Subject: [PATCH 1/2] rust: lock: Add intra-doc links to the Backend trait Add missing intra-doc links to the Backend trait to make navigating the documentation easier. Suggested-by: Benno Lossin Link: https://lore.kernel.org/rust-for-linux/94625fe6-b87a-a8f0-5b2a-a8152d5f7436@proton.me/ Link: https://github.com/Rust-for-Linux/linux/issues/1001 Signed-off-by: Ben Gooding Link: https://lore.kernel.org/r/20230509202314.8248-1-ben.gooding.dev@gmail.com Signed-off-by: Miguel Ojeda --- rust/kernel/sync/lock.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/rust/kernel/sync/lock.rs b/rust/kernel/sync/lock.rs index a2216325632df..70a785f047546 100644 --- a/rust/kernel/sync/lock.rs +++ b/rust/kernel/sync/lock.rs @@ -72,8 +72,8 @@ pub unsafe trait Backend { /// A mutual exclusion primitive. /// -/// Exposes one of the kernel locking primitives. Which one is exposed depends on the lock backend -/// specified as the generic parameter `B`. +/// Exposes one of the kernel locking primitives. Which one is exposed depends on the lock +/// [`Backend`] specified as the generic parameter `B`. #[pin_data] pub struct Lock { /// The kernel lock object. @@ -126,7 +126,7 @@ impl Lock { /// A lock guard. /// -/// Allows mutual exclusion primitives that implement the `Backend` trait to automatically unlock +/// Allows mutual exclusion primitives that implement the [`Backend`] trait to automatically unlock /// when a guard goes out of scope. It also provides a safe and convenient way to access the data /// protected by the lock. #[must_use = "the lock unlocks immediately when the guard is unused"] From 341faf2b45ba266d52c1ca886c4ffca52d666786 Mon Sep 17 00:00:00 2001 From: Ariel Miculas Date: Wed, 26 Apr 2023 23:49:23 +0300 Subject: [PATCH 2/2] rust: helpers: sort includes alphabetically in rust/helpers.c Sort the #include directives of rust/helpers.c alphabetically and add a comment specifying this. The reason for this is to improve readability and to be consistent with the other files with a similar approach within 'rust/'. Suggested-by: Miguel Ojeda Link: https://github.com/Rust-for-Linux/linux/issues/1003 Signed-off-by: Ariel Miculas Reviewed-by: Martin Rodriguez Reboredo Reviewed-by: Gary Guo Link: https://lore.kernel.org/r/20230426204923.16195-1-amiculas@cisco.com Signed-off-by: Miguel Ojeda --- rust/helpers.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/rust/helpers.c b/rust/helpers.c index bb594da56137e..f946f2ea640a3 100644 --- a/rust/helpers.c +++ b/rust/helpers.c @@ -16,16 +16,18 @@ * * All symbols are exported as GPL-only to guarantee no GPL-only feature is * accidentally exposed. + * + * Sorted alphabetically. */ #include #include #include #include -#include #include -#include +#include #include +#include #include __noreturn void rust_helper_BUG(void)