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

From: Timur Tabi <[email-masked]>
Date: Wed, 07 Feb 2007 20:07:47 -0600

Michael Ellerman wrote:

>> Perhaps we should define ppc_md.progress() such that it never sends the output 
>> to the same place as printk().  If the only output device is the serial port, 
>> and printk() already outputs there, then ppc_md.progress() should do nothing. 
>> This would eliminate any "accidental" use of ppc_md.progress(), when printk() is 
>> the better choice.
> 
> But then you'll end up with code that does:
> 
>  printk("Setup done");
>  ppc_md.progress("Setup done");

Technically that's true, but I think this will be rare.  The printk() 
messages are supposed to be more verbose than the progress() messages.

Besides, progress() always takes two parameters - a string and a number. 
  So it's not exactly a clone of printk().

> Because on systems where the output _does_ go to two places, you'll want
> the messages to appear in both.
> 
> I don't see what the problem is with progress messages going to the
> printk buffer?

The problem is that currently, a lot of code uses ppc_md.progress() when 
it should use printk() instead.  If progress() is intended for 2-len LED 
displays, then it's not really a substitute for printk().  progress() is 
supposed to display specialized messages, so I think it makes sense for 
it to be treated like a specialized function.