Re: printk meeting at LPC

Tetsuo Handa
2019-09-17T14:08:34Z

On 2019/09/17 22:37, Steven Rostedt wrote:
> On Tue, 17 Sep 2019 15:12:04 +0200
> Greg Kroah-Hartman <gregkh@linuxfoundation.org> wrote:
>
>>> Well, it's being used. I was thinking of dropping it if it was not.
>>> Let's keep it then.
>>
>> I think it should be dropped, only one user of the kernel is using it in
>> a legitimate way, which kind of implies it isn't needed.
>
> I'm thinking if it isn't hard to support then we can keep it (meaning
> that we already have to calculate the length anyway). But if it starts
> to complicate the code, then we should drop it.
>

Due to console_loglevel (some are printed and others are not printed) and
possibility of concurrent printk() callers (one line can be printed as
multiple lines), using printk()'s return value for calculating column offset
will not always work as expected. I guess that users should not count on
printk()'s return value. They might want to try printing one line at a time
using their local buffers...