Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752201Ab1CBF2F (ORCPT ); Wed, 2 Mar 2011 00:28:05 -0500 Received: from mail.perches.com ([173.55.12.10]:4035 "EHLO mail.perches.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750918Ab1CBF2E (ORCPT ); Wed, 2 Mar 2011 00:28:04 -0500 Subject: Re: [PATCH 5/6] mm: add some KERN_CONT markers to continuation lines From: Joe Perches To: Linus Torvalds Cc: Uwe =?ISO-8859-1?Q?Kleine-K=F6nig?= , linux-kernel@vger.kernel.org, Russell King - ARM Linux , kernel@pengutronix.de, Arjan van de Ven , linux-mm@kvack.org In-Reply-To: References: <20101124085645.GW4693@pengutronix.de> <1290589070-854-5-git-send-email-u.kleine-koenig@pengutronix.de> <20110228151736.GO22310@pengutronix.de> Content-Type: text/plain; charset="UTF-8" Date: Tue, 01 Mar 2011 21:28:00 -0800 Message-ID: <1299043680.4208.97.camel@Joe-Laptop> Mime-Version: 1.0 X-Mailer: Evolution 2.30.3 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1222 Lines: 37 On Tue, 2011-03-01 at 13:46 -0800, Linus Torvalds wrote: > the concept of > printk(KERN_CONT "\n") > is just crazy: you're saying "I want to continue the line, in order to > print a newline". Whaa? It's a trivially useful "end of collected printk" mark, which was made a bit superfluous by the code that added any necessary newline before every KERN_. There are a thousand or so of them today. $ grep -rP --include=*.[ch] "\b(printk\s*\(\s*KERN_CONT|pr_cont\s*\(|printk\s*\()\s*\"\\\n\"" * | wc -l 1061 That code made all message terminating newlines a bit obsolete. I won't be submitting any patches to remove those EOM newlines any time soon. I hope no one does that. It would be actually useful to have some form like: cookie = collected_printk_start() loop: collected_printk(cookie, ...) (...) collected_printk_end(cookie) so that interleaved messages from multiple concurrent streams could be sensibly collected either post processed or buffered. -- 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/