Re: [PATCH] printk/nmi: avoid direct printk()-s from __printk_nmi_flush()

From: Sergey Senozhatsky
Date: Mon Aug 29 2016 - 21:07:01 EST


On (08/29/16 17:16), Petr Mladek wrote:
[..]
> The comment above is not longer valid.

oh, yes. it shouldn't even be there.

> > -static void print_nmi_seq_line(struct nmi_seq_buf *s, int start, int end)
> > +static void __print_nmi_seq_line(const char *text, int len)
>
> Also the name of the function might be confusing because it is not
> longer used only for the seq buffer. I would rename it to
> something like:
>
> printk_nmi_flush_line()

sounds good.

> > +static void print_nmi_seq_line(struct nmi_seq_buf *s, int start, int end)
> > +{
>
> Then I would rename also this function to something like:
>
> printk_nmi_flush_seq_line()

sounds good.

> > + const char *buf = s->buffer + start;
> > +
> > + __print_nmi_seq_line(buf, (end - start) + 1);
> > +}
> > +
>
> Othrewise, it looks fine. With the above suggested changes, feel
> free to add:
>
> Reviewed-by: Petr Mladek <pmladek@xxxxxxxx>

thanks, will re-spin today.

-ss