]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
rust: use consistent backtick formatting for NULL in docs
authorPeter Novak <seimun018r@gmail.com>
Sun, 30 Nov 2025 21:12:33 +0000 (22:12 +0100)
committerMiguel Ojeda <ojeda@kernel.org>
Mon, 26 Jan 2026 02:13:27 +0000 (03:13 +0100)
Some doc comments use `NULL` while others use plain NULL.  Make it
consistent by adding backticks everywhere, matching the majority of
existing usage.

Signed-off-by: Peter Novak <seimun018r@gmail.com>
Acked-by: Stephen Boyd <sboyd@kernel.org>
Acked-by: David Gow <davidgow@google.com>
Reviewed-by: Alexandre Courbot <acourbot@nvidia.com>
Acked-by: Danilo Krummrich <dakr@kernel.org>
Link: https://patch.msgid.link/20251130211233.367946-1-seimun018r@gmail.com
[ Reworded slightly. - Miguel ]
Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
rust/kernel/clk.rs
rust/kernel/debugfs/entry.rs
rust/kernel/kunit.rs
rust/macros/lib.rs

index c1cfaeaa36a22be2e3180b1e9142bb608ab276ea..db3464e2df32457447276d8b4ca3fb7c90ce3de1 100644 (file)
@@ -94,7 +94,7 @@ mod common_clk {
     /// # Invariants
     ///
     /// A [`Clk`] instance holds either a pointer to a valid [`struct clk`] created by the C
-    /// portion of the kernel or a NULL pointer.
+    /// portion of the kernel or a `NULL` pointer.
     ///
     /// Instances of this type are reference-counted. Calling [`Clk::get`] ensures that the
     /// allocation remains valid for the lifetime of the [`Clk`].
index 706cb7f73d6c01716a0e15c24805aa10a1bfbc05..a30bf8f296791da5adc52857fdf7f7455d1a0a83 100644 (file)
@@ -148,7 +148,7 @@ impl Entry<'_> {
     /// # Guarantees
     ///
     /// Due to the type invariant, the value returned from this function will always be an error
-    /// code, NULL, or a live DebugFS directory. If it is live, it will remain live at least as
+    /// code, `NULL`, or a live DebugFS directory. If it is live, it will remain live at least as
     /// long as this entry lives.
     pub(crate) fn as_ptr(&self) -> *mut bindings::dentry {
         self.entry
index 21aef6c97325ba6318aeb6c5555ed0416994669e..4ccc8fc4a8006c98a7f948c5bc8eb13bee6beb88 100644 (file)
@@ -190,7 +190,7 @@ pub fn is_test_result_ok(t: impl TestResult) -> bool {
 
 /// Represents an individual test case.
 ///
-/// The [`kunit_unsafe_test_suite!`] macro expects a NULL-terminated list of valid test cases.
+/// The [`kunit_unsafe_test_suite!`] macro expects a `NULL`-terminated list of valid test cases.
 /// Use [`kunit_case_null`] to generate such a delimiter.
 #[doc(hidden)]
 pub const fn kunit_case(
@@ -212,9 +212,9 @@ pub const fn kunit_case(
     }
 }
 
-/// Represents the NULL test case delimiter.
+/// Represents the `NULL` test case delimiter.
 ///
-/// The [`kunit_unsafe_test_suite!`] macro expects a NULL-terminated list of test cases. This
+/// The [`kunit_unsafe_test_suite!`] macro expects a `NULL`-terminated list of test cases. This
 /// function returns such a delimiter.
 #[doc(hidden)]
 pub const fn kunit_case_null() -> kernel::bindings::kunit_case {
@@ -237,7 +237,7 @@ pub const fn kunit_case_null() -> kernel::bindings::kunit_case {
 ///
 /// # Safety
 ///
-/// `test_cases` must be a NULL terminated array of valid test cases,
+/// `test_cases` must be a `NULL` terminated array of valid test cases,
 /// whose lifetime is at least that of the test suite (i.e., static).
 ///
 /// # Examples
index b38002151871a33f6b4efea70be2deb6ddad38e2..f26775285dc5a39d43e7b369827718a80bb1ad7d 100644 (file)
@@ -154,7 +154,7 @@ pub fn module(ts: TokenStream) -> TokenStream {
 /// case the default implementation will never be executed. The reason for this
 /// is that the functions will be called through function pointers installed in
 /// C side vtables. When an optional method is not implemented on a `#[vtable]`
-/// trait, a NULL entry is installed in the vtable. Thus the default
+/// trait, a `NULL` entry is installed in the vtable. Thus the default
 /// implementation is never called. Since these traits are not designed to be
 /// used on the Rust side, it should not be possible to call the default
 /// implementation. This is done to ensure that we call the vtable methods