summaryrefslogtreecommitdiff
path: root/rust/kernel/kunit.rs
diff options
context:
space:
mode:
authorMark Brown <broonie@kernel.org>2026-03-17 18:07:38 +0000
committerMark Brown <broonie@kernel.org>2026-03-17 18:07:38 +0000
commitc8d0beedf0da06652432354882b95c33a4cb7cfe (patch)
tree369044cede12800331e74a7e10ac7d5273cd8e18 /rust/kernel/kunit.rs
parent9d4189e68ebad418eed964185d5563a71c67756d (diff)
parent58068932402c7f5bf26489e01ae8e8bb89802d1e (diff)
regulator: fp9931: Make vin-supply mandatory
Robby Cai <robby.cai@nxp.com> says: The FP9931 regulator requires a valid "vin" supply to operate correctly. Therefore, the driver should treat "vin" as a mandatory supply. This patchset updates the binding documentation to mark vin-supply as a required property, and modifies the driver accordingly. As suggested in the reviews from Andreas and Mark, v2 switches to using devm_regulator_get() since the supply is mandatory.
Diffstat (limited to 'rust/kernel/kunit.rs')
-rw-r--r--rust/kernel/kunit.rs8
1 files changed, 8 insertions, 0 deletions
diff --git a/rust/kernel/kunit.rs b/rust/kernel/kunit.rs
index f93f24a60bdd..a1edf7491579 100644
--- a/rust/kernel/kunit.rs
+++ b/rust/kernel/kunit.rs
@@ -14,6 +14,10 @@ use crate::prelude::*;
/// Public but hidden since it should only be used from KUnit generated code.
#[doc(hidden)]
pub fn err(args: fmt::Arguments<'_>) {
+ // `args` is unused if `CONFIG_PRINTK` is not set - this avoids a build-time warning.
+ #[cfg(not(CONFIG_PRINTK))]
+ let _ = args;
+
// SAFETY: The format string is null-terminated and the `%pA` specifier matches the argument we
// are passing.
#[cfg(CONFIG_PRINTK)]
@@ -30,6 +34,10 @@ pub fn err(args: fmt::Arguments<'_>) {
/// Public but hidden since it should only be used from KUnit generated code.
#[doc(hidden)]
pub fn info(args: fmt::Arguments<'_>) {
+ // `args` is unused if `CONFIG_PRINTK` is not set - this avoids a build-time warning.
+ #[cfg(not(CONFIG_PRINTK))]
+ let _ = args;
+
// SAFETY: The format string is null-terminated and the `%pA` specifier matches the argument we
// are passing.
#[cfg(CONFIG_PRINTK)]