From 96e7a88d32de2554a5d7e54e87eb03d445dd6924 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Andr=C3=A9=20Draszik?= Date: Fri, 9 Jan 2026 08:38:37 +0000 Subject: [PATCH] regulator: core: update two debug messages MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit 1) In print_constraints_debug(), the power budget is printed as: lldo2: 450 <--> 1300 mV at 900 mV 2147483647 mW budge, enabled (note the missing t in budget). This is because there is a --count just below the call to scnprintf(), to make space for the comma. All similar calls to scnprintf() above add an extra space to the format string to allow for that, but this one doesn't, so the last character t is stripped instead. Update the format string to fix the message. 2) Add the name of the supply to the failure message printed when the supply can not be resolved when debug messages are enabled to help with debug. Signed-off-by: André Draszik Link: https://patch.msgid.link/20260109-regulators-defer-v2-1-1a25dc968e60@linaro.org Signed-off-by: Mark Brown --- drivers/regulator/core.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/regulator/core.c b/drivers/regulator/core.c index 4b6182cde859..a723bd00e171 100644 --- a/drivers/regulator/core.c +++ b/drivers/regulator/core.c @@ -1183,7 +1183,7 @@ static void print_constraints_debug(struct regulator_dev *rdev) count += scnprintf(buf + count, len - count, "standby "); if (constraints->pw_budget_mW) - count += scnprintf(buf + count, len - count, "%d mW budget", + count += scnprintf(buf + count, len - count, "%d mW budget ", constraints->pw_budget_mW); if (!count) @@ -5697,7 +5697,8 @@ static int regulator_register_resolve_supply(struct device *dev, void *data) struct regulator_dev *rdev = dev_to_rdev(dev); if (regulator_resolve_supply(rdev)) - rdev_dbg(rdev, "unable to resolve supply\n"); + rdev_dbg(rdev, "unable to resolve supply '%s'\n", + rdev->supply_name); return 0; } -- 2.30.2