From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756622AbYLEDN0 (ORCPT ); Thu, 4 Dec 2008 22:13:26 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1753545AbYLEDNS (ORCPT ); Thu, 4 Dec 2008 22:13:18 -0500 Received: from vps1.tull.net ([66.180.172.116]:46753 "HELO vps1.tull.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with SMTP id S1753492AbYLEDNS (ORCPT ); Thu, 4 Dec 2008 22:13:18 -0500 Date: Fri, 5 Dec 2008 14:13:12 +1100 From: Nick Andrew To: Kay Sievers Cc: Matt Mackall , Andrew Morton , Linux Kernel Mailing List Subject: Re: [PATCH] Use vprintk rather that vsnprintf where possible Message-ID: <20081205031312.GA1381@mail.local.tull.net> References: <1228423309.3255.109.camel@calx> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.18 (2008-05-17) X-SMTPD: qpsmtpd/0.26, http://develooper.com/code/qpsmtpd/ Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Dec 05, 2008 at 04:05:06AM +0100, Kay Sievers wrote: > On Thu, Dec 4, 2008 at 21:41, Matt Mackall wrote: > > This does away with lots of large static and on-stack buffers as well > > as a few associated locks. > > > - len = snprintf(s, 256, KERN_DEBUG "%s: ", prefix); > > - > > va_start(args, fmt); > > - len += vsnprintf(&s[len], (256 - len), fmt, args); > > + printk(KERN_DEBUG "%s: ", prefix); > > + vprintk(fmt, args); > > If we convert to two printk calls for a single line, does that not > possibly get mixed up with printks from other locations and lead to > hardly readable log output? That's right. Nick.