Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752469AbdGGRMi (ORCPT ); Fri, 7 Jul 2017 13:12:38 -0400 Received: from smtprelay0016.hostedemail.com ([216.40.44.16]:43631 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751100AbdGGRMh (ORCPT ); Fri, 7 Jul 2017 13:12:37 -0400 X-Session-Marker: 6A6F6540706572636865732E636F6D X-Spam-Summary: 30,2,0,,d41d8cd98f00b204,joe@perches.com,:::::::::,RULES_HIT:41:355:379:541:599:968:988:989:1260:1277:1311:1313:1314:1345:1359:1373:1437:1515:1516:1518:1534:1540:1593:1594:1711:1730:1747:1777:1792:2393:2559:2562:2828:3138:3139:3140:3141:3142:3352:3622:3865:3866:3867:3868:3870:3871:3872:3874:4321:5007:10010:10400:10848:11232:11658:11914:12296:12740:12760:12895:13069:13311:13357:13439:14659:14721:21080:21433:21627:30012:30054:30091,0,RBL:none,CacheIP:none,Bayesian:0.5,0.5,0.5,Netcheck:none,DomainCache:0,MSF:not bulk,SPF:,MSBL:0,DNSBL:none,Custom_rules:0:1:0,LFtime:2,LUA_SUMMARY:none X-HE-Tag: drink47_50c5f9aff0c2c X-Filterd-Recvd-Size: 1602 Message-ID: <1499447553.20988.3.camel@perches.com> Subject: Re: [PATCH] printk: Modify operators of printed_len From: Joe Perches To: Pierre Kuo , pmladek@suse.com Cc: sergey.senozhatsky@gmail.com, rostedt@goodmis.org, linux-kernel@vger.kernel.org Date: Fri, 07 Jul 2017 10:12:33 -0700 In-Reply-To: <1499445024-23524-1-git-send-email-vichy.kuo@gmail.com> References: <1499445024-23524-1-git-send-email-vichy.kuo@gmail.com> Content-Type: text/plain; charset="ISO-8859-1" X-Mailer: Evolution 3.22.6-1ubuntu1 Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 787 Lines: 17 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.