Message ID | 1435095556-15924-39-git-send-email-sjg@chromium.org |
---|---|
State | Accepted |
Delegated to: | Simon Glass |
Headers | show |
Hello Simon, On 06/23/2015 11:39 PM, Simon Glass wrote: > To reduce unnecessary code size in an uncommon code path, use debug() > where possible(). The driver returns an error which indicates failure. > > Signed-off-by: Simon Glass <sjg@chromium.org> > --- > > Changes in v3: None > Changes in v2: None > > drivers/power/regulator/regulator-uclass.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/power/regulator/regulator-uclass.c b/drivers/power/regulator/regulator-uclass.c > index a2d0b9f..12e141b 100644 > --- a/drivers/power/regulator/regulator-uclass.c > +++ b/drivers/power/regulator/regulator-uclass.c > @@ -262,7 +262,7 @@ static int regulator_post_bind(struct udevice *dev) > if (regulator_name_is_unique(dev, uc_pdata->name)) > return 0; > > - error("\"%s\" of dev: \"%s\", has nonunique value: \"%s\"", > + debug("\"%s\" of dev: \"%s\", has nonunique value: \"%s\"", > property, dev->name, uc_pdata->name); > > return -EINVAL; > Tested on: - Odroid U3 (odroid_defconfig) - Sandbox - ut pmic/regulator Tested-by: Przemyslaw Marczak <p.marczak@samsung.com> Acked-by: Przemyslaw Marczak <p.marczak@samsung.com> Best regards,
On 1 July 2015 at 03:44, Przemyslaw Marczak <p.marczak@samsung.com> wrote: > Hello Simon, > > On 06/23/2015 11:39 PM, Simon Glass wrote: >> >> To reduce unnecessary code size in an uncommon code path, use debug() >> where possible(). The driver returns an error which indicates failure. >> >> Signed-off-by: Simon Glass <sjg@chromium.org> >> --- >> >> Changes in v3: None >> Changes in v2: None >> >> drivers/power/regulator/regulator-uclass.c | 2 +- >> 1 file changed, 1 insertion(+), 1 deletion(-) >> >> diff --git a/drivers/power/regulator/regulator-uclass.c >> b/drivers/power/regulator/regulator-uclass.c >> index a2d0b9f..12e141b 100644 >> --- a/drivers/power/regulator/regulator-uclass.c >> +++ b/drivers/power/regulator/regulator-uclass.c >> @@ -262,7 +262,7 @@ static int regulator_post_bind(struct udevice *dev) >> if (regulator_name_is_unique(dev, uc_pdata->name)) >> return 0; >> >> - error("\"%s\" of dev: \"%s\", has nonunique value: \"%s\"", >> + debug("\"%s\" of dev: \"%s\", has nonunique value: \"%s\"", >> property, dev->name, uc_pdata->name); >> >> return -EINVAL; >> > > Tested on: > - Odroid U3 (odroid_defconfig) > - Sandbox - ut pmic/regulator > > Tested-by: Przemyslaw Marczak <p.marczak@samsung.com> > Acked-by: Przemyslaw Marczak <p.marczak@samsung.com> > > Best regards, > -- > Przemyslaw Marczak > Samsung R&D Institute Poland > Samsung Electronics > p.marczak@samsung.com Applied to u-boot-dm.
diff --git a/drivers/power/regulator/regulator-uclass.c b/drivers/power/regulator/regulator-uclass.c index a2d0b9f..12e141b 100644 --- a/drivers/power/regulator/regulator-uclass.c +++ b/drivers/power/regulator/regulator-uclass.c @@ -262,7 +262,7 @@ static int regulator_post_bind(struct udevice *dev) if (regulator_name_is_unique(dev, uc_pdata->name)) return 0; - error("\"%s\" of dev: \"%s\", has nonunique value: \"%s\"", + debug("\"%s\" of dev: \"%s\", has nonunique value: \"%s\"", property, dev->name, uc_pdata->name); return -EINVAL;
To reduce unnecessary code size in an uncommon code path, use debug() where possible(). The driver returns an error which indicates failure. Signed-off-by: Simon Glass <sjg@chromium.org> --- Changes in v3: None Changes in v2: None drivers/power/regulator/regulator-uclass.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)