[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20170708051251.GB488@tigerII.localdomain>
Date: Sat, 8 Jul 2017 14:12:51 +0900
From: Sergey Senozhatsky <sergey.senozhatsky@...il.com>
To: Pierre Kuo <vichy.kuo@...il.com>
Cc: pmladek@...e.com, sergey.senozhatsky@...il.com,
rostedt@...dmis.org, linux-kernel@...r.kernel.org, joe@...ches.com
Subject: Re: [PATCH] printk: Modify operators of printed_len
On (07/08/17 10:51), Pierre Kuo wrote:
> In 8b1742c9c207, we remove printk-recursion detection code in
> vprintk_emit(), where it is the first place that printed_len calculated.
> After removing above detection, it seems we can directly assign the
> result of log_output to printed_len.
>
> Signed-off-by: Pierre Kuo <vichy.kuo@...il.com>
Reviewed-by: Sergey Senozhatsky <sergey.senozhatsky@...il.com>
-ss
> ---
> kernel/printk/printk.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/kernel/printk/printk.c b/kernel/printk/printk.c
> index fc47863..a2a8cac 100644
> --- a/kernel/printk/printk.c
> +++ b/kernel/printk/printk.c
> @@ -1701,7 +1701,7 @@ asmlinkage int vprintk_emit(int facility, int level,
> size_t text_len = 0;
> enum log_flags lflags = 0;
> unsigned long flags;
> - int printed_len = 0;
> + int printed_len;
> bool in_sched = false;
>
> if (level == LOGLEVEL_SCHED) {
> @@ -1754,7 +1754,7 @@ asmlinkage int vprintk_emit(int facility, int level,
> if (dict)
> lflags |= LOG_PREFIX|LOG_NEWLINE;
>
> - printed_len += log_output(facility, level, lflags, dict, dictlen, text, text_len);
> + printed_len = log_output(facility, level, lflags, dict, dictlen, text, text_len);
>
> logbuf_unlock_irqrestore(flags);
>
> --
> 1.7.9.5
>
Powered by blists - more mailing lists