lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <95E3B7B9ECBFB14C+20250406034811.32347-1-xizheyin@smail.nju.edu.cn>
Date: Sun,  6 Apr 2025 11:48:11 +0800
From: Xizhe Yin <xizheyin@...il.nju.edu.cn>
To: rust-for-linux@...r.kernel.org
Cc: linux-kernel@...r.kernel.org,
	xizheyin <xizheyin@...il.nju.edu.cn>,
	Miguel Ojeda <ojeda@...nel.org>
Subject: [PATCH] rust: convert raw URLs to Markdown autolinks in comments

From: xizheyin <xizheyin@...il.nju.edu.cn>

Some comments in Rust files use raw URLs (http://example.com) rather
than Markdown autolinks [text](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.

Link: Rust-for-Linux#1153
Suggested-by: Miguel Ojeda <ojeda@...nel.org>
Signed-off-by: Xizhe Yin <xizheyin@...il.nju.edu.cn>
---
 rust/kernel/alloc.rs               | 2 +-
 rust/kernel/alloc/allocator.rs     | 2 +-
 rust/kernel/cred.rs                | 2 +-
 rust/kernel/kunit.rs               | 2 +-
 rust/kernel/miscdevice.rs          | 2 +-
 rust/kernel/print.rs               | 2 +-
 rust/kernel/rbtree.rs              | 2 +-
 rust/kernel/std_vendor.rs          | 4 ++--
 rust/kernel/sync/arc/std_vendor.rs | 4 ++--
 9 files changed, 11 insertions(+), 11 deletions(-)

diff --git a/rust/kernel/alloc.rs b/rust/kernel/alloc.rs
index fc9c9c41cd79..d2f067ed8986 100644
--- a/rust/kernel/alloc.rs
+++ b/rust/kernel/alloc.rs
@@ -152,7 +152,7 @@ pub unsafe trait Allocator {
     /// - aligned to `layout.align()`,
     ///
     /// Additionally, `Flags` are honored as documented in
-    /// <https://docs.kernel.org/core-api/mm-api.html#mm-api-gfp-flags>.
+    /// [kernel documentation: GFP flags](https://docs.kernel.org/core-api/mm-api.html#mm-api-gfp-flags).
     fn alloc(layout: Layout, flags: Flags) -> Result<NonNull<[u8]>, AllocError> {
         // SAFETY: Passing `None` to `realloc` is valid by its safety requirements and asks for a
         // new memory allocation.
diff --git a/rust/kernel/alloc/allocator.rs b/rust/kernel/alloc/allocator.rs
index aa2dfa9dca4c..2e05ae842b62 100644
--- a/rust/kernel/alloc/allocator.rs
+++ b/rust/kernel/alloc/allocator.rs
@@ -6,7 +6,7 @@
 //! linked below. For instance, this includes the concept of "get free page" (GFP) flags and the
 //! typical application of the different kernel allocators.
 //!
-//! Reference: <https://docs.kernel.org/core-api/memory-allocation.html>
+//! Reference: [kernel documentation: Memory Allocation](https://docs.kernel.org/core-api/memory-allocation.html)
 
 use super::Flags;
 use core::alloc::Layout;
diff --git a/rust/kernel/cred.rs b/rust/kernel/cred.rs
index 2599f01e8b28..589557e18d79 100644
--- a/rust/kernel/cred.rs
+++ b/rust/kernel/cred.rs
@@ -6,7 +6,7 @@
 //!
 //! C header: [`include/linux/cred.h`](srctree/include/linux/cred.h).
 //!
-//! Reference: <https://www.kernel.org/doc/html/latest/security/credentials.html>
+//! Reference: [kernel documentation: Credentials](https://www.kernel.org/doc/html/latest/security/credentials.html)
 
 use crate::{
     bindings,
diff --git a/rust/kernel/kunit.rs b/rust/kernel/kunit.rs
index 1604fb6a5b1b..ec0d4889cc12 100644
--- a/rust/kernel/kunit.rs
+++ b/rust/kernel/kunit.rs
@@ -4,7 +4,7 @@
 //!
 //! C header: [`include/kunit/test.h`](srctree/include/kunit/test.h)
 //!
-//! Reference: <https://docs.kernel.org/dev-tools/kunit/index.html>
+//! Reference: [kernel documentation: KUnit](https://docs.kernel.org/dev-tools/kunit/index.html)
 
 use core::{ffi::c_void, fmt};
 
diff --git a/rust/kernel/miscdevice.rs b/rust/kernel/miscdevice.rs
index fa9ecc42602a..3cbd0258475c 100644
--- a/rust/kernel/miscdevice.rs
+++ b/rust/kernel/miscdevice.rs
@@ -6,7 +6,7 @@
 //!
 //! C headers: [`include/linux/miscdevice.h`](srctree/include/linux/miscdevice.h).
 //!
-//! Reference: <https://www.kernel.org/doc/html/latest/driver-api/misc_devices.html>
+//! Reference: [kernel documentation: Miscdevices](https://www.kernel.org/doc/html/latest/driver-api/misc_devices.html)
 
 use crate::{
     bindings,
diff --git a/rust/kernel/print.rs b/rust/kernel/print.rs
index cf4714242e14..896a2ef2652a 100644
--- a/rust/kernel/print.rs
+++ b/rust/kernel/print.rs
@@ -4,7 +4,7 @@
 //!
 //! C header: [`include/linux/printk.h`](srctree/include/linux/printk.h)
 //!
-//! Reference: <https://docs.kernel.org/core-api/printk-basics.html>
+//! Reference: [kernel documentation: Printk basics](https://docs.kernel.org/core-api/printk-basics.html)
 
 use crate::{
     ffi::{c_char, c_void},
diff --git a/rust/kernel/rbtree.rs b/rust/kernel/rbtree.rs
index 5246b2c8a4ff..a9b10ae73dbf 100644
--- a/rust/kernel/rbtree.rs
+++ b/rust/kernel/rbtree.rs
@@ -4,7 +4,7 @@
 //!
 //! C header: [`include/linux/rbtree.h`](srctree/include/linux/rbtree.h)
 //!
-//! Reference: <https://docs.kernel.org/core-api/rbtree.html>
+//! Reference: [kernel documentation: Rbtree](https://docs.kernel.org/core-api/rbtree.html)
 
 use crate::{alloc::Flags, bindings, container_of, error::Result, prelude::*};
 use core::{
diff --git a/rust/kernel/std_vendor.rs b/rust/kernel/std_vendor.rs
index 279bd353687a..ae2a56d7cdc7 100644
--- a/rust/kernel/std_vendor.rs
+++ b/rust/kernel/std_vendor.rs
@@ -3,9 +3,9 @@
 //! Rust standard library vendored code.
 //!
 //! The contents of this file come from the Rust standard library, hosted in
-//! the <https://github.com/rust-lang/rust> repository, licensed under
+//! the [rust-lang/rust](https://github.com/rust-lang/rust) repository, licensed under
 //! "Apache-2.0 OR MIT" and adapted for kernel use. For copyright details,
-//! see <https://github.com/rust-lang/rust/blob/master/COPYRIGHT>.
+//! see [rust-lang/rust/blob/master/COPYRIGHT].
 
 /// [`std::dbg`], but using [`pr_info`] instead of [`eprintln`].
 ///
diff --git a/rust/kernel/sync/arc/std_vendor.rs b/rust/kernel/sync/arc/std_vendor.rs
index 11b3f4ecca5f..a95002ee4add 100644
--- a/rust/kernel/sync/arc/std_vendor.rs
+++ b/rust/kernel/sync/arc/std_vendor.rs
@@ -3,9 +3,9 @@
 //! Rust standard library vendored code.
 //!
 //! The contents of this file come from the Rust standard library, hosted in
-//! the <https://github.com/rust-lang/rust> repository, licensed under
+//! the [rust-lang/rust](https://github.com/rust-lang/rust) repository, licensed under
 //! "Apache-2.0 OR MIT" and adapted for kernel use. For copyright details,
-//! see <https://github.com/rust-lang/rust/blob/master/COPYRIGHT>.
+//! see [rust-lang/rust/blob/master/COPYRIGHT].
 
 use crate::sync::{arc::ArcInner, Arc};
 use core::any::Any;
-- 
2.49.0


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ