Re: [PATCHv7 4/8] printk: always use deferred printk when flush printk_safe lines

From: Petr Mladek
Date: Mon Feb 06 2017 - 07:17:00 EST


On Mon 2017-02-06 11:08:20, Sergey Senozhatsky wrote:
> On (02/06/17 10:48), Sergey Senozhatsky wrote:
> [..]
> > from many places:
> >
> > 4x printk_safe_flush_buffer()
> > 1x __printk_safe_flush()
> >
> >
> > replacing printk_safe_flush_line() with printk_deferred() produces things
> > like these
> >
> > printk_deferred("%.*s", end - start, start);
> > printk_deferred("%.*s", strlen(newline), newline);
>
> ah... besides we need to cast length argument to "int".

Good point.


> > just in case, the patch (which I prefer to be ignored)
>
> let's keep printk_safe_flush_line().

I do not have strong opinion but I would slightly prefer
to keep the helper function. The use of printk_deferred()
is a bit tricky and it is better to have only one copy.

Steven, could you live with the original patch, please?

Best Regards,
Petr