diff mbox series

[05/12] syscon: Drop the logging in syscon_get_by_driver_data()

Message ID 20200928004624.1652803-6-sjg@chromium.org
State Accepted
Commit 28dc20f34a5a946427d3d02aaf76b4d90f3c5468
Delegated to: Tom Rini
Headers show
Series Various minor patches | expand

Commit Message

Simon Glass Sept. 28, 2020, 12:46 a.m. UTC
This function can be called when it is not known whether it will find
anything. This results in confusing log messages if the device is not
found. It is better for the caller to log the failure, if necessary.

Drop the logging from this function.

Signed-off-by: Simon Glass <sjg@chromium.org>
---

 drivers/core/syscon-uclass.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Tom Rini Oct. 23, 2020, 12:26 a.m. UTC | #1
On Sun, Sep 27, 2020 at 06:46:17PM -0600, Simon Glass wrote:

> This function can be called when it is not known whether it will find
> anything. This results in confusing log messages if the device is not
> found. It is better for the caller to log the failure, if necessary.
> 
> Drop the logging from this function.
> 
> Signed-off-by: Simon Glass <sjg@chromium.org>

Applied to u-boot/master, thanks!
diff mbox series

Patch

diff --git a/drivers/core/syscon-uclass.c b/drivers/core/syscon-uclass.c
index 9cbda4ebdae..66ac579e465 100644
--- a/drivers/core/syscon-uclass.c
+++ b/drivers/core/syscon-uclass.c
@@ -140,7 +140,7 @@  int syscon_get_by_driver_data(ulong driver_data, struct udevice **devp)
 
 	ret = uclass_first_device_drvdata(UCLASS_SYSCON, driver_data, devp);
 	if (ret)
-		return log_msg_ret("find", ret);
+		return ret;
 
 	return 0;
 }