Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753300AbaACBo5 (ORCPT ); Thu, 2 Jan 2014 20:44:57 -0500 Received: from mail-we0-f178.google.com ([74.125.82.178]:36836 "EHLO mail-we0-f178.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752993AbaACBo4 (ORCPT ); Thu, 2 Jan 2014 20:44:56 -0500 MIME-Version: 1.0 In-Reply-To: <1388710666.2259.71.camel@joe-AO722> References: <20140102145548.f3fe2c3fd3ea706ed388685c@linux-foundation.org> <1388710666.2259.71.camel@joe-AO722> From: Kay Sievers Date: Fri, 3 Jan 2014 02:44:35 +0100 Message-ID: Subject: Re: [PATCH] printk: flush conflicting continuation line To: Joe Perches Cc: Andrew Morton , Arun KS , LKML , Tejun Heo , fweisbec@gmail.com, paul.gortmaker@windriver.com 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: 1173 Lines: 34 On Fri, Jan 3, 2014 at 1:57 AM, Joe Perches wrote: > (Adding Kay to cc's) > > Kay? any opinion on correctness? Sounds fine by looking at it. Did not test anything though. >> > --- a/kernel/printk/printk.c >> > +++ b/kernel/printk/printk.c >> > @@ -1604,7 +1604,10 @@ asmlinkage int vprintk_emit(int facility, int level, >> > if (!(lflags & LOG_PREFIX)) >> > stored = cont_add(facility, level, text, text_len); >> > cont_flush(LOG_NEWLINE); >> > - } >> > + /* Flush conflicting buffer. An earlier newline was missing >> > + * and current print is from different task */ >> > + } else if (cont.len && cont.owner != current) >> > + cont_flush(LOG_NEWLINE); Unless I miss something, this whole sections all go inside a: if (cont.len) { ... cont_flush(LOG_NEWLINE); } and look a bit less confusing than the two conditions with just the negated "current" check and duplicated flush call? Kay -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/