mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH] of: overlay: split debug messages for of_overlay_apply_symbols
@ 2021-01-18 20:22 Marco Felsch
  2021-01-19  9:33 ` Sascha Hauer
  0 siblings, 1 reply; 2+ messages in thread
From: Marco Felsch @ 2021-01-18 20:22 UTC (permalink / raw)
  To: barebox

Overlays don't need to have __symbols__ therefore it shouldn't be
printed on info level. Move it to debug so interested users can print it
still.

I also fixed a minor alignment issue while on it.

Signed-off-by: Marco Felsch <m.felsch@pengutronix.de>
---
 drivers/of/overlay.c | 11 ++++++++---
 1 file changed, 8 insertions(+), 3 deletions(-)

diff --git a/drivers/of/overlay.c b/drivers/of/overlay.c
index b79dbff94d..dc9711dac5 100644
--- a/drivers/of/overlay.c
+++ b/drivers/of/overlay.c
@@ -106,7 +106,7 @@ static char *of_overlay_fix_path(struct device_node *root,
 }
 
 static void of_overlay_apply_symbols(struct device_node *root,
-				    struct device_node *overlay)
+				     struct device_node *overlay)
 {
 	const char *old_path;
 	char *new_path;
@@ -117,8 +117,13 @@ static void of_overlay_apply_symbols(struct device_node *root,
 	root_symbols = of_get_child_by_name(root, "__symbols__");
 	overlay_symbols = of_get_child_by_name(overlay, "__symbols__");
 
-	if (!overlay_symbols || !root_symbols) {
-		pr_info("overlay/root doesn't have a __symbols__ node\n");
+	if (!overlay_symbols) {
+		pr_debug("overlay doesn't have a __symbols__ node\n");
+		return;
+	}
+
+	if (!root_symbols) {
+		pr_info("root doesn't have a __symbols__ node\n");
 		return;
 	}
 
-- 
2.20.1


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] of: overlay: split debug messages for of_overlay_apply_symbols
  2021-01-18 20:22 [PATCH] of: overlay: split debug messages for of_overlay_apply_symbols Marco Felsch
@ 2021-01-19  9:33 ` Sascha Hauer
  0 siblings, 0 replies; 2+ messages in thread
From: Sascha Hauer @ 2021-01-19  9:33 UTC (permalink / raw)
  To: Marco Felsch; +Cc: barebox

On Mon, Jan 18, 2021 at 09:22:40PM +0100, Marco Felsch wrote:
> Overlays don't need to have __symbols__ therefore it shouldn't be
> printed on info level. Move it to debug so interested users can print it
> still.
> 
> I also fixed a minor alignment issue while on it.
> 
> Signed-off-by: Marco Felsch <m.felsch@pengutronix.de>
> ---
>  drivers/of/overlay.c | 11 ++++++++---
>  1 file changed, 8 insertions(+), 3 deletions(-)

Applied, thanks

Sascha

> 
> diff --git a/drivers/of/overlay.c b/drivers/of/overlay.c
> index b79dbff94d..dc9711dac5 100644
> --- a/drivers/of/overlay.c
> +++ b/drivers/of/overlay.c
> @@ -106,7 +106,7 @@ static char *of_overlay_fix_path(struct device_node *root,
>  }
>  
>  static void of_overlay_apply_symbols(struct device_node *root,
> -				    struct device_node *overlay)
> +				     struct device_node *overlay)
>  {
>  	const char *old_path;
>  	char *new_path;
> @@ -117,8 +117,13 @@ static void of_overlay_apply_symbols(struct device_node *root,
>  	root_symbols = of_get_child_by_name(root, "__symbols__");
>  	overlay_symbols = of_get_child_by_name(overlay, "__symbols__");
>  
> -	if (!overlay_symbols || !root_symbols) {
> -		pr_info("overlay/root doesn't have a __symbols__ node\n");
> +	if (!overlay_symbols) {
> +		pr_debug("overlay doesn't have a __symbols__ node\n");
> +		return;
> +	}
> +
> +	if (!root_symbols) {
> +		pr_info("root doesn't have a __symbols__ node\n");
>  		return;
>  	}
>  
> -- 
> 2.20.1
> 
> 
> _______________________________________________
> barebox mailing list
> barebox@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/barebox
> 

-- 
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-5555 |

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-01-19  9:33 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-18 20:22 [PATCH] of: overlay: split debug messages for of_overlay_apply_symbols Marco Felsch
2021-01-19  9:33 ` Sascha Hauer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox