Skip to content

Commit 5522958

Browse files
committed
rust: use <> link style in comments too
This is intended to follow our "use Markdown for comments too" / "comments and docs should be easily interchangeable" guideline. Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
1 parent 77a1a8c commit 5522958

File tree

5 files changed

+6
-7
lines changed

5 files changed

+6
-7
lines changed

rust/bindings/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
1111
#![no_std]
1212
#![feature(core_ffi_c)]
13-
// See https://github.com/rust-lang/rust-bindgen/issues/1651.
13+
// See <https://github.com/rust-lang/rust-bindgen/issues/1651>.
1414
#![cfg_attr(test, allow(deref_nullptr))]
1515
#![cfg_attr(test, allow(unaligned_references))]
1616
#![cfg_attr(test, allow(unsafe_op_in_unsafe_fn))]

rust/kernel/file.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -335,7 +335,7 @@ impl<A: OpenAdapter<T::OpenData>, T: Operations> OperationsVtable<A, T> {
335335
// function is running.
336336
let f = unsafe { T::Data::borrow((*file).private_data) };
337337
// No `FMODE_UNSIGNED_OFFSET` support, so `offset` must be in [0, 2^63).
338-
// See discussion in https://github.com/fishinabarrel/linux-kernel-module-rust/pull/113
338+
// See <https://github.com/fishinabarrel/linux-kernel-module-rust/pull/113>.
339339
let read = T::read(
340340
f,
341341
unsafe { File::from_ptr(file) },
@@ -388,7 +388,7 @@ impl<A: OpenAdapter<T::OpenData>, T: Operations> OperationsVtable<A, T> {
388388
// function is running.
389389
let f = unsafe { T::Data::borrow((*file).private_data) };
390390
// No `FMODE_UNSIGNED_OFFSET` support, so `offset` must be in [0, 2^63).
391-
// See discussion in https://github.com/fishinabarrel/linux-kernel-module-rust/pull/113
391+
// See <https://github.com/fishinabarrel/linux-kernel-module-rust/pull/113>.
392392
let written = T::write(
393393
f,
394394
unsafe { File::from_ptr(file) },

rust/kernel/kasync/net.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,7 @@ impl<'a, Out, F: FnMut() -> Result<Out> + Send + 'a> SocketFuture<'a, Out, F> {
199199
// There is a potential soundness issue here because we're generating a shared reference to
200200
// `Self` while `Self::poll` has a mutable (unique) reference. However, for `!Unpin` types
201201
// (like `Self`), `&mut T` is treated as `*mut T` per
202-
// https://github.com/rust-lang/rust/issues/63818 -- so we avoid the unsoundness. Once a
202+
// <https://github.com/rust-lang/rust/issues/63818> -- so we avoid the unsoundness. Once a
203203
// more definitive solution is available, we can change this to use it.
204204
let s = unsafe { &*crate::container_of!(wq_entry, Self, wq_entry) };
205205
if mask & s.mask == 0 {

rust/kernel/lib.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -262,7 +262,6 @@ fn panic(info: &core::panic::PanicInfo<'_>) -> ! {
262262
// SAFETY: FFI call.
263263
unsafe { bindings::BUG() };
264264
// Bindgen currently does not recognize `__noreturn` so `BUG` returns `()`
265-
// instead of `!`.
266-
// https://github.com/rust-lang/rust-bindgen/issues/2094
265+
// instead of `!`. See <https://github.com/rust-lang/rust-bindgen/issues/2094>.
267266
loop {}
268267
}

rust/kernel/sync/guard.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ pub struct Guard<'a, L: Lock<I> + ?Sized, I: LockInfo = WriteLock> {
2121

2222
// SAFETY: `Guard` is sync when the data protected by the lock is also sync. This is more
2323
// conservative than the default compiler implementation; more details can be found on
24-
// https://github.com/rust-lang/rust/issues/41622 -- it refers to `MutexGuard` from the standard
24+
// <https://github.com/rust-lang/rust/issues/41622> -- it refers to `MutexGuard` from the standard
2525
// library.
2626
unsafe impl<L, I> Sync for Guard<'_, L, I>
2727
where

0 commit comments

Comments
 (0)