Skip to content

Commit 96e7a88

Browse files
andredbroonie
authored andcommitted
regulator: core: update two debug messages
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 <andre.draszik@linaro.org> Link: https://patch.msgid.link/20260109-regulators-defer-v2-1-1a25dc968e60@linaro.org Signed-off-by: Mark Brown <broonie@kernel.org>
1 parent 9ace475 commit 96e7a88

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

drivers/regulator/core.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1183,7 +1183,7 @@ static void print_constraints_debug(struct regulator_dev *rdev)
11831183
count += scnprintf(buf + count, len - count, "standby ");
11841184

11851185
if (constraints->pw_budget_mW)
1186-
count += scnprintf(buf + count, len - count, "%d mW budget",
1186+
count += scnprintf(buf + count, len - count, "%d mW budget ",
11871187
constraints->pw_budget_mW);
11881188

11891189
if (!count)
@@ -5697,7 +5697,8 @@ static int regulator_register_resolve_supply(struct device *dev, void *data)
56975697
struct regulator_dev *rdev = dev_to_rdev(dev);
56985698

56995699
if (regulator_resolve_supply(rdev))
5700-
rdev_dbg(rdev, "unable to resolve supply\n");
5700+
rdev_dbg(rdev, "unable to resolve supply '%s'\n",
5701+
rdev->supply_name);
57015702

57025703
return 0;
57035704
}

0 commit comments

Comments
 (0)