[PATCH 2/5] clk: call log_debug() instead to avoid console log printing

Yang Xiwen via B4 Relay devnull+forbidden405.outlook.com at kernel.org
Tue Aug 8 18:37:42 CEST 2023

From: Yang Xiwen <forbidden405 at outlook.com>

it's a very common case to register a clock without a parent, such as
clk_register_fixed_rate(). Replace log_error() with log_debug() to avoid
useless console log if not debugging.

Signed-off-by: Yang Xiwen <forbidden405 at outlook.com>
 drivers/clk/clk.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/clk/clk.c b/drivers/clk/clk.c
index a5a3461b66..a38daaac0c 100644
--- a/drivers/clk/clk.c
+++ b/drivers/clk/clk.c
@@ -24,8 +24,8 @@ int clk_register(struct clk *clk, const char *drv_name,
 	ret = uclass_get_device_by_name(UCLASS_CLK, parent_name, &parent);
 	if (ret) {
-		log_err("%s: failed to get %s device (parent of %s)\n",
-			__func__, parent_name, name);
+		log_debug("%s: failed to get %s device (parent of %s)\n",
+			  __func__, parent_name, name);
 	} else {
 		log_debug("%s: name: %s parent: %s [0x%p]\n", __func__, name,
 			  parent->name, parent);


More information about the U-Boot mailing list