Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752659AbdGHCtj (ORCPT ); Fri, 7 Jul 2017 22:49:39 -0400 Received: from mail-vk0-f67.google.com ([209.85.213.67]:35090 "EHLO mail-vk0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751812AbdGHCti (ORCPT ); Fri, 7 Jul 2017 22:49:38 -0400 MIME-Version: 1.0 In-Reply-To: <1499468601.20988.7.camel@perches.com> References: <1499445024-23524-1-git-send-email-vichy.kuo@gmail.com> <1499447553.20988.3.camel@perches.com> <1499468601.20988.7.camel@perches.com> From: pierre kuo Date: Sat, 8 Jul 2017 10:49:36 +0800 Message-ID: Subject: Re: [PATCH] printk: Modify operators of printed_len To: Joe Perches Cc: pmladek@suse.com, Sergey Senozhatsky , rostedt@goodmis.org, linux-kernel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 932 Lines: 25 hi Joe >> > [] >> > > 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. >> >> I cannot quite understand the reason why need to rename. >> printed_len seems meet the meaning we expect for here. > > Verbosity. To me, len would be adequate. > > Anyway, the real point was the declaration of printed_len could > remove the " = 0" as it's now only set once. Got it and I will resend the patch again. Appreciate your kind advice.