From mboxrd@z Thu Jan 1 00:00:00 1970 From: Julien Grall Subject: Re: [PATCH 2/4] dt-uart: Clarify log messages at init time. Date: Wed, 07 Jan 2015 16:17:05 +0000 Message-ID: <54AD5C01.8050305@linaro.org> References: <1420644673.18631.101.camel@citrix.com> <1420644701-26776-2-git-send-email-ian.campbell@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1420644701-26776-2-git-send-email-ian.campbell@citrix.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Ian Campbell , xen-devel@lists.xen.org Cc: tim@xen.org, stefano.stabellini@eu.citrix.com List-Id: xen-devel@lists.xenproject.org Hi Ian, On 07/01/15 15:31, Ian Campbell wrote: > - Don't log at all if console=dtuart (the default) was not present, in > that case the user has asked for something else, no need for every > other driver to tell them this. > - Use "dtuart" in all other messages, rather than just "console" or > "uart". > - Be more explicit if we are exiting because dtuart= wasn't given. > - Log the options which we've parsed. > > Signed-off-by: Ian Campbell Reviewed-by: Julien Grall Regards, > --- > xen/drivers/char/dt-uart.c | 11 +++++++---- > 1 file changed, 7 insertions(+), 4 deletions(-) > > diff --git a/xen/drivers/char/dt-uart.c b/xen/drivers/char/dt-uart.c > index 45a87a6..04dbb97 100644 > --- a/xen/drivers/char/dt-uart.c > +++ b/xen/drivers/char/dt-uart.c > @@ -41,9 +41,12 @@ void __init dt_uart_init(void) > const char *devpath = opt_dtuart; > char *options; > > - if ( !console_has("dtuart") || !strcmp(opt_dtuart, "") ) > + if ( !console_has("dtuart") ) > + return; /* Not for us */ > + > + if ( !strcmp(opt_dtuart, "") ) > { > - printk("No console\n"); > + printk("No dtuart path configured\n"); > return; > } > > @@ -53,7 +56,7 @@ void __init dt_uart_init(void) > else > options = ""; > > - printk("Looking for UART console %s\n", devpath); > + printk("Looking for dtuart at \"%s\", options \"%s\"\n", devpath, options); > if ( *devpath == '/' ) > dev = dt_find_node_by_path(devpath); > else > @@ -68,7 +71,7 @@ void __init dt_uart_init(void) > ret = device_init(dev, DEVICE_SERIAL, options); > > if ( ret ) > - printk("Unable to initialize serial: %d\n", ret); > + printk("Unable to initialize dtuart: %d\n", ret); > } > > /* > -- Julien Grall