devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Print a device-tree message at KERN_WARNING level
@ 2011-02-07 13:26 Paul Bolle
       [not found] ` <1297085223.1741.24.camel-3NV1x7ENidhrKue/0VVhAg@public.gmane.org>
  0 siblings, 1 reply; 4+ messages in thread
From: Paul Bolle @ 2011-02-07 13:26 UTC (permalink / raw)
  To: devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ; +Cc: Kyle McMartin

For some time now a laptop tracking Fedora's rawhide prints the message
    /proc/device-tree: can't find root

early in each boot. It turns out that in recent Fedora kernels
CONFIG_PROC_DEVICETREE is set to Y by default. (Note that the config
help for PROC_DEVICETREE tells to "say Y here" if "unsure".) Apparently
this is a consequence of their wish to have one kernel for both OPLC x86
and non-OLPC x86 hardware.

Since the majority of x86 hardware will be non-OLPC, KERN_WARNING seems
to be more appropriate than KERN_ERR. (The main benefit of the
KERN_WARNING level is that Fedora's plymouth bootsplash should now hide
this message.)

Signed-off-by: Paul Bolle <pebolle-IWqWACnzNjzz+pZb47iToQ@public.gmane.org>
---
Previously discussed in the thread starting here:
http://lists.fedoraproject.org/pipermail/kernel/2011-February/003012.html

As stated in
http://lists.fedoraproject.org/pipermail/kernel/2011-February/003011.html , I have no idea what this message means. I just prefer to not see it. This seems to be the easiest way to achieve that. But maybe there's an elegant way to drop this message all together on hardware for which it's apparently irrelevant.

 fs/proc/proc_devtree.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/fs/proc/proc_devtree.c b/fs/proc/proc_devtree.c
index d9396a4..71dd779 100644
--- a/fs/proc/proc_devtree.c
+++ b/fs/proc/proc_devtree.c
@@ -233,7 +233,7 @@ void __init proc_device_tree_init(void)
 		return;
 	root = of_find_node_by_path("/");
 	if (root == NULL) {
-		printk(KERN_ERR "/proc/device-tree: can't find root\n");
+		printk(KERN_WARNING "/proc/device-tree: can't find root\n");
 		return;
 	}
 	proc_device_tree_add_node(root, proc_device_tree);
-- 
1.7.4

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

* Re: [PATCH] Print a device-tree message at KERN_WARNING level
       [not found] ` <1297085223.1741.24.camel-3NV1x7ENidhrKue/0VVhAg@public.gmane.org>
@ 2011-02-14 15:27   ` Grant Likely
       [not found]     ` <AANLkTi=n7ogDGzwemR4pP5Uhp-ZoDti+qZ4ubqvjuosK-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
  0 siblings, 1 reply; 4+ messages in thread
From: Grant Likely @ 2011-02-14 15:27 UTC (permalink / raw)
  To: Paul Bolle; +Cc: Kyle McMartin, devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ

On Mon, Feb 7, 2011 at 6:26 AM, Paul Bolle <pebolle-IWqWACnzNjzz+pZb47iToQ@public.gmane.org> wrote:
> For some time now a laptop tracking Fedora's rawhide prints the message
>    /proc/device-tree: can't find root
>
> early in each boot. It turns out that in recent Fedora kernels
> CONFIG_PROC_DEVICETREE is set to Y by default. (Note that the config
> help for PROC_DEVICETREE tells to "say Y here" if "unsure".) Apparently
> this is a consequence of their wish to have one kernel for both OPLC x86
> and non-OLPC x86 hardware.
>
> Since the majority of x86 hardware will be non-OLPC, KERN_WARNING seems
> to be more appropriate than KERN_ERR. (The main benefit of the
> KERN_WARNING level is that Fedora's plymouth bootsplash should now hide
> this message.)
>
> Signed-off-by: Paul Bolle <pebolle-IWqWACnzNjzz+pZb47iToQ@public.gmane.org>
> ---
> Previously discussed in the thread starting here:
> http://lists.fedoraproject.org/pipermail/kernel/2011-February/003012.html
>
> As stated in
> http://lists.fedoraproject.org/pipermail/kernel/2011-February/003011.html , I have no idea what this message means. I just prefer to not see it. This seems to be the easiest way to achieve that. But maybe there's an elegant way to drop this message all together on hardware for which it's apparently irrelevant.

The message is unnecessary.  It can just be dropped altogether, or
changed to a pr_debug().

g.

>
>  fs/proc/proc_devtree.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/fs/proc/proc_devtree.c b/fs/proc/proc_devtree.c
> index d9396a4..71dd779 100644
> --- a/fs/proc/proc_devtree.c
> +++ b/fs/proc/proc_devtree.c
> @@ -233,7 +233,7 @@ void __init proc_device_tree_init(void)
>                return;
>        root = of_find_node_by_path("/");
>        if (root == NULL) {
> -               printk(KERN_ERR "/proc/device-tree: can't find root\n");
> +               printk(KERN_WARNING "/proc/device-tree: can't find root\n");
>                return;
>        }
>        proc_device_tree_add_node(root, proc_device_tree);
> --
> 1.7.4
>
> _______________________________________________
> devicetree-discuss mailing list
> devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org
> https://lists.ozlabs.org/listinfo/devicetree-discuss
>



-- 
Grant Likely, B.Sc., P.Eng.
Secret Lab Technologies Ltd.

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

* [PATCH] [TRIVIAL] Drop an uninteresting message to pr_debug level
       [not found]     ` <AANLkTi=n7ogDGzwemR4pP5Uhp-ZoDti+qZ4ubqvjuosK-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
@ 2011-02-14 21:34       ` Paul Bolle
       [not found]         ` <1297719274.1793.8.camel-3NV1x7ENidhrKue/0VVhAg@public.gmane.org>
  0 siblings, 1 reply; 4+ messages in thread
From: Paul Bolle @ 2011-02-14 21:34 UTC (permalink / raw)
  To: Grant Likely; +Cc: Kyle McMartin, devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ

Signed-off-by: Paul Bolle <pebolle-IWqWACnzNjzz+pZb47iToQ@public.gmane.org>
---
On Mon, 2011-02-14 at 08:27 -0700, Grant Likely wrote:
> The message is unnecessary.  It can just be dropped altogether, or
> changed to a pr_debug().

Thanks. I picked the second option, as it is enough to address my
concerns.

diff --git a/fs/proc/proc_devtree.c b/fs/proc/proc_devtree.c
index d9396a4..927cbd1 100644
--- a/fs/proc/proc_devtree.c
+++ b/fs/proc/proc_devtree.c
@@ -233,7 +233,7 @@ void __init proc_device_tree_init(void)
 		return;
 	root = of_find_node_by_path("/");
 	if (root == NULL) {
-		printk(KERN_ERR "/proc/device-tree: can't find root\n");
+		pr_debug("/proc/device-tree: can't find root\n");
 		return;
 	}
 	proc_device_tree_add_node(root, proc_device_tree);

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

* Re: [PATCH] [TRIVIAL] Drop an uninteresting message to pr_debug level
       [not found]         ` <1297719274.1793.8.camel-3NV1x7ENidhrKue/0VVhAg@public.gmane.org>
@ 2011-02-15 20:39           ` Grant Likely
  0 siblings, 0 replies; 4+ messages in thread
From: Grant Likely @ 2011-02-15 20:39 UTC (permalink / raw)
  To: Paul Bolle; +Cc: Kyle McMartin, devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ

On Mon, Feb 14, 2011 at 10:34:22PM +0100, Paul Bolle wrote:
> Signed-off-by: Paul Bolle <pebolle-IWqWACnzNjzz+pZb47iToQ@public.gmane.org>
> ---
> On Mon, 2011-02-14 at 08:27 -0700, Grant Likely wrote:
> > The message is unnecessary.  It can just be dropped altogether, or
> > changed to a pr_debug().
> 
> Thanks. I picked the second option, as it is enough to address my
> concerns.

Applied, thanks.

g.

> 
> diff --git a/fs/proc/proc_devtree.c b/fs/proc/proc_devtree.c
> index d9396a4..927cbd1 100644
> --- a/fs/proc/proc_devtree.c
> +++ b/fs/proc/proc_devtree.c
> @@ -233,7 +233,7 @@ void __init proc_device_tree_init(void)
>  		return;
>  	root = of_find_node_by_path("/");
>  	if (root == NULL) {
> -		printk(KERN_ERR "/proc/device-tree: can't find root\n");
> +		pr_debug("/proc/device-tree: can't find root\n");
>  		return;
>  	}
>  	proc_device_tree_add_node(root, proc_device_tree);
> 
> 

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

end of thread, other threads:[~2011-02-15 20:39 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-02-07 13:26 [PATCH] Print a device-tree message at KERN_WARNING level Paul Bolle
     [not found] ` <1297085223.1741.24.camel-3NV1x7ENidhrKue/0VVhAg@public.gmane.org>
2011-02-14 15:27   ` Grant Likely
     [not found]     ` <AANLkTi=n7ogDGzwemR4pP5Uhp-ZoDti+qZ4ubqvjuosK-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2011-02-14 21:34       ` [PATCH] [TRIVIAL] Drop an uninteresting message to pr_debug level Paul Bolle
     [not found]         ` <1297719274.1793.8.camel-3NV1x7ENidhrKue/0VVhAg@public.gmane.org>
2011-02-15 20:39           ` Grant Likely

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).