Re: [PATCH] mci: Improve error message for non-existent vmmc regulator
On Tue, Sep 14, 2021 at 11:00:17AM +0200, Uwe Kleine-König wrote: > There are three improvements: a) Use a already initialized device as first > parameter to dev_err() and b) indicate that the error will be ignored, and > c) downgrade to a warning. > > This changes the error message from > > ERROR: : Failed to get 'vmmc' regulator. > > to > > WARNING: bcm2835_mci fe34@7e34.of: Failed to get 'vmmc' > regulator (ignored). > > on a Raspberry Pi 4. > > Signed-off-by: Uwe Kleine-König > --- > drivers/mci/mci-core.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) Applied, thanks Sascha -- Pengutronix e.K. | | Steuerwalder Str. 21 | http://www.pengutronix.de/ | 31137 Hildesheim, Germany | Phone: +49-5121-206917-0| Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917- | ___ barebox mailing list barebox@lists.infradead.org http://lists.infradead.org/mailman/listinfo/barebox
Re: [PATCH] mci: Improve error message for non-existent vmmc regulator
On Tue, 2021-09-14 at 11:00 +0200, Uwe Kleine-König wrote: > There are three improvements: a) Use a already initialized device as first > parameter to dev_err() and b) indicate that the error will be ignored, and > c) downgrade to a warning. > > This changes the error message from > > ERROR: : Failed to get 'vmmc' regulator. > > to > > WARNING: bcm2835_mci fe34@7e34.of: Failed to get 'vmmc' > regulator (ignored). > > on a Raspberry Pi 4. > > Signed-off-by: Uwe Kleine-König > --- > drivers/mci/mci-core.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/mci/mci-core.c b/drivers/mci/mci-core.c > index 92a73c8f1dfe..82e2f82f5377 100644 > --- a/drivers/mci/mci-core.c > +++ b/drivers/mci/mci-core.c > @@ -1920,7 +1920,7 @@ int mci_register(struct mci_host *host) > > host->supply = regulator_get(hw_dev, "vmmc"); > if (IS_ERR(host->supply)) { > - dev_err(>dev, "Failed to get 'vmmc' regulator.\n"); > + dev_warn(hw_dev, "Failed to get 'vmmc' regulator (ignored).\n"); > host->supply = NULL; > } > Reviewed-by: Rouven Czerwinski ___ barebox mailing list barebox@lists.infradead.org http://lists.infradead.org/mailman/listinfo/barebox
[PATCH] mci: Improve error message for non-existent vmmc regulator
There are three improvements: a) Use a already initialized device as first parameter to dev_err() and b) indicate that the error will be ignored, and c) downgrade to a warning. This changes the error message from ERROR: : Failed to get 'vmmc' regulator. to WARNING: bcm2835_mci fe34@7e34.of: Failed to get 'vmmc' regulator (ignored). on a Raspberry Pi 4. Signed-off-by: Uwe Kleine-König --- drivers/mci/mci-core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/mci/mci-core.c b/drivers/mci/mci-core.c index 92a73c8f1dfe..82e2f82f5377 100644 --- a/drivers/mci/mci-core.c +++ b/drivers/mci/mci-core.c @@ -1920,7 +1920,7 @@ int mci_register(struct mci_host *host) host->supply = regulator_get(hw_dev, "vmmc"); if (IS_ERR(host->supply)) { - dev_err(>dev, "Failed to get 'vmmc' regulator.\n"); + dev_warn(hw_dev, "Failed to get 'vmmc' regulator (ignored).\n"); host->supply = NULL; } -- 2.30.2 ___ barebox mailing list barebox@lists.infradead.org http://lists.infradead.org/mailman/listinfo/barebox