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: use consistent backtick formatting for NULL in docs

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>

authored by

Peter Novak and committed by
Miguel Ojeda
7f87c7a0 4b2dbf44

+7 -7
+1 -1
rust/kernel/clk.rs
··· 94 94 /// # Invariants 95 95 /// 96 96 /// A [`Clk`] instance holds either a pointer to a valid [`struct clk`] created by the C 97 - /// portion of the kernel or a NULL pointer. 97 + /// portion of the kernel or a `NULL` pointer. 98 98 /// 99 99 /// Instances of this type are reference-counted. Calling [`Clk::get`] ensures that the 100 100 /// allocation remains valid for the lifetime of the [`Clk`].
+1 -1
rust/kernel/debugfs/entry.rs
··· 148 148 /// # Guarantees 149 149 /// 150 150 /// Due to the type invariant, the value returned from this function will always be an error 151 - /// code, NULL, or a live DebugFS directory. If it is live, it will remain live at least as 151 + /// code, `NULL`, or a live DebugFS directory. If it is live, it will remain live at least as 152 152 /// long as this entry lives. 153 153 pub(crate) fn as_ptr(&self) -> *mut bindings::dentry { 154 154 self.entry
+4 -4
rust/kernel/kunit.rs
··· 190 190 191 191 /// Represents an individual test case. 192 192 /// 193 - /// The [`kunit_unsafe_test_suite!`] macro expects a NULL-terminated list of valid test cases. 193 + /// The [`kunit_unsafe_test_suite!`] macro expects a `NULL`-terminated list of valid test cases. 194 194 /// Use [`kunit_case_null`] to generate such a delimiter. 195 195 #[doc(hidden)] 196 196 pub const fn kunit_case( ··· 212 212 } 213 213 } 214 214 215 - /// Represents the NULL test case delimiter. 215 + /// Represents the `NULL` test case delimiter. 216 216 /// 217 - /// The [`kunit_unsafe_test_suite!`] macro expects a NULL-terminated list of test cases. This 217 + /// The [`kunit_unsafe_test_suite!`] macro expects a `NULL`-terminated list of test cases. This 218 218 /// function returns such a delimiter. 219 219 #[doc(hidden)] 220 220 pub const fn kunit_case_null() -> kernel::bindings::kunit_case { ··· 237 237 /// 238 238 /// # Safety 239 239 /// 240 - /// `test_cases` must be a NULL terminated array of valid test cases, 240 + /// `test_cases` must be a `NULL` terminated array of valid test cases, 241 241 /// whose lifetime is at least that of the test suite (i.e., static). 242 242 /// 243 243 /// # Examples
+1 -1
rust/macros/lib.rs
··· 154 154 /// case the default implementation will never be executed. The reason for this 155 155 /// is that the functions will be called through function pointers installed in 156 156 /// C side vtables. When an optional method is not implemented on a `#[vtable]` 157 - /// trait, a NULL entry is installed in the vtable. Thus the default 157 + /// trait, a `NULL` entry is installed in the vtable. Thus the default 158 158 /// implementation is never called. Since these traits are not designed to be 159 159 /// used on the Rust side, it should not be possible to call the default 160 160 /// implementation. This is done to ensure that we call the vtable methods