Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1683327

Re: [PATCH] printk: Modify operators of printed_len

From Joe Perches <joe@perches.com>
Newsgroups linux.kernel
Subject Re: [PATCH] printk: Modify operators of printed_len
Date 2017-07-07 19:20 +0200
Message-ID <u0F58-74W-3@gated-at.bofh.it> (permalink)
References <u0Esq-6Av-41@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Sat, 2017-07-08 at 00:30 +0800, 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.
[]
> diff --git a/kernel/printk/printk.c b/kernel/printk/printk.c
[]
> @@ -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);

If this is appropriate, this should also remove the
initialization of printed_len and perhaps rename it too.

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH] printk: Modify operators of printed_len Pierre Kuo <vichy.kuo@gmail.com> - 2017-07-07 18:40 +0200
  Re: [PATCH] printk: Modify operators of printed_len Joe Perches <joe@perches.com> - 2017-07-07 19:20 +0200
    Re: [PATCH] printk: Modify operators of printed_len pierre kuo <vichy.kuo@gmail.com> - 2017-07-07 22:40 +0200
      Re: [PATCH] printk: Modify operators of printed_len Joe Perches <joe@perches.com> - 2017-07-08 01:10 +0200
        Re: [PATCH] printk: Modify operators of printed_len pierre kuo <vichy.kuo@gmail.com> - 2017-07-08 04:50 +0200

csiph-web