Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

rust: convert raw URLs to Markdown autolinks in comments

Some comments in Rust files use raw URLs (http://example.com) rather
than Markdown autolinks <URL>. This inconsistency makes the
documentation less uniform and harder to maintain.

This patch converts all remaining raw URLs in Rust code comments to use
the Markdown autolink format, maintaining consistency with the rest of
the codebase which already uses this style.

Suggested-by: Miguel Ojeda <ojeda@kernel.org>
Link: https://github.com/Rust-for-Linux/linux/issues/1153
Signed-off-by: Xizhe Yin <xizheyin@smail.nju.edu.cn>
Link: https://lore.kernel.org/r/509F0B66E3C1575D+20250407033441.5567-1-xizheyin@smail.nju.edu.cn
[ Used From form for Signed-off-by. Sorted tags. - Miguel ]
Signed-off-by: Miguel Ojeda <ojeda@kernel.org>

authored by

Xizhe Yin and committed by
Miguel Ojeda
86d990c7 b9b701fc

+6 -6
+1 -1
rust/kernel/alloc/kbox.rs
··· 101 101 pub type KVBox<T> = Box<T, super::allocator::KVmalloc>; 102 102 103 103 // SAFETY: All zeros is equivalent to `None` (option layout optimization guarantee: 104 - // https://doc.rust-lang.org/stable/std/option/index.html#representation). 104 + // <https://doc.rust-lang.org/stable/std/option/index.html#representation>). 105 105 unsafe impl<T, A: Allocator> ZeroableOption for Box<T, A> {} 106 106 107 107 // SAFETY: `Box` is `Send` if `T` is `Send` because the `Box` owns a `T`.
+1 -1
rust/kernel/block/mq/gen_disk.rs
··· 129 129 get_unique_id: None, 130 130 // TODO: Set to THIS_MODULE. Waiting for const_refs_to_static feature to 131 131 // be merged (unstable in rustc 1.78 which is staged for linux 6.10) 132 - // https://github.com/rust-lang/rust/issues/119618 132 + // <https://github.com/rust-lang/rust/issues/119618> 133 133 owner: core::ptr::null_mut(), 134 134 pr_ops: core::ptr::null_mut(), 135 135 free_disk: None,
+1 -1
rust/kernel/std_vendor.rs
··· 148 148 }; 149 149 ($val:expr $(,)?) => { 150 150 // Use of `match` here is intentional because it affects the lifetimes 151 - // of temporaries - https://stackoverflow.com/a/48732525/1063961 151 + // of temporaries - <https://stackoverflow.com/a/48732525/1063961> 152 152 match $val { 153 153 tmp => { 154 154 $crate::pr_info!("[{}:{}:{}] {} = {:#?}\n",
+1 -1
rust/kernel/sync/arc.rs
··· 135 135 // meaningful with respect to dropck - but this may change in the future so this is left here 136 136 // out of an abundance of caution. 137 137 // 138 - // See https://doc.rust-lang.org/nomicon/phantom-data.html#generic-parameters-and-drop-checking 138 + // See <https://doc.rust-lang.org/nomicon/phantom-data.html#generic-parameters-and-drop-checking> 139 139 // for more detail on the semantics of dropck in the presence of `PhantomData`. 140 140 _p: PhantomData<ArcInner<T>>, 141 141 }
+2 -2
scripts/generate_rust_target.rs
··· 209 209 // target feature of the same name plus the other two target features in 210 210 // `clang/lib/Driver/ToolChains/Arch/X86.cpp`. These should be eventually enabled via 211 211 // `-Ctarget-feature` when `rustc` starts recognizing them (or via a new dedicated 212 - // flag); see https://github.com/rust-lang/rust/issues/116852. 212 + // flag); see <https://github.com/rust-lang/rust/issues/116852>. 213 213 features += ",+retpoline-external-thunk"; 214 214 features += ",+retpoline-indirect-branches"; 215 215 features += ",+retpoline-indirect-calls"; ··· 218 218 // The kernel uses `-mharden-sls=all`, which Clang maps to both these target features in 219 219 // `clang/lib/Driver/ToolChains/Arch/X86.cpp`. These should be eventually enabled via 220 220 // `-Ctarget-feature` when `rustc` starts recognizing them (or via a new dedicated 221 - // flag); see https://github.com/rust-lang/rust/issues/116851. 221 + // flag); see <https://github.com/rust-lang/rust/issues/116851>. 222 222 features += ",+harden-sls-ijmp"; 223 223 features += ",+harden-sls-ret"; 224 224 }