Subject: Re: [PATCH] Update udbg_progress() to display the integer

From: [email-masked] (Olof Johansson)
Date: Mon, 5 Feb 2007 19:30:51 -0600

On Mon, Feb 05, 2007 at 01:51:55PM -0600, Timur Tabi wrote:
> Although udbg_progress() takes a string and a short as parameters, only
> the string is displayed.  This patch also displays the integer, if it's not
> equal to 0xFFFF.  This gives callers the option to display only the string.

Some platforms do this already, but they output the numbers first. It's
a good idea to stay consistent with that.

See maple_progress, ps3_progress and friends for templates. They're
quite verbose though.

-Olof

> 
> Signed-off-by: Timur Tabi <[email-masked]>
> ---
>  arch/powerpc/kernel/udbg.c |    5 +++++
>  1 files changed, 5 insertions(+), 0 deletions(-)
> 
> diff --git a/arch/powerpc/kernel/udbg.c b/arch/powerpc/kernel/udbg.c
> index 5730906..c474961 100644
> --- a/arch/powerpc/kernel/udbg.c
> +++ b/arch/powerpc/kernel/udbg.c
> @@ -121,6 +121,11 @@ void udbg_printf(const char *fmt, ...)
>  void __init udbg_progress(char *s, unsigned short hex)
>  {
>  	udbg_puts(s);
> +	if (hex != 0xffff) {
> +		char buf[8];
> +		sprintf(buf, " : %04X", hex);
> +		udbg_puts(buf);
> +	}
>  	udbg_puts("\n");
>  }
>  
> -- 
> 1.4.4
> 
> _______________________________________________
> Linuxppc-dev mailing list
> [email-masked]
> https://ozlabs.org/mailman/listinfo/linuxppc-dev