From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753282Ab1GOQEZ (ORCPT ); Fri, 15 Jul 2011 12:04:25 -0400 Received: from mx1.redhat.com ([209.132.183.28]:56964 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753224Ab1GOQEY (ORCPT ); Fri, 15 Jul 2011 12:04:24 -0400 Date: Fri, 15 Jul 2011 12:04:18 -0400 From: Jason Baron To: Bart Van Assche Cc: Joe Perches , gregkh@suse.de, jim.cromie@gmail.com, linux-kernel@vger.kernel.org Subject: Re: [PATCH 11/11] dynamic_debug: use a single printk() to emit msgs Message-ID: <20110715160417.GB2493@redhat.com> References: <3667c0a87dd8fd64fdf1b1e8107b130a9b41096e.1310657068.git.jbaron@redhat.com> <1310744914.7582.36.camel@Joe-Laptop> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.5.20 (2009-12-10) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Jul 15, 2011 at 05:57:11PM +0200, Bart Van Assche wrote: > On Fri, Jul 15, 2011 at 5:48 PM, Joe Perches wrote: > > On Fri, 2011-07-15 at 12:05 +0200, Bart Van Assche wrote: > >> Not that's it important, but this change makes is possible to > >> eliminate the tid[] and lineno[] arrays again. Has that been > >> considered ? > > > > tid and lineno are decimal.  Not using intermediate > > arrays would require awkward contortions to snprintf > > them without emitting 0 in the output. > > Sorry, but I do not agree with the above. The current implementation > of __dynamic_pr_debug() shows that an implementation without temporary > arrays does not require any awkward constructs. See e.g. > http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=blob;f=lib/dynamic_debug.c > for the source code of the current implementation of > __dynamic_pr_debug(). > > This may be subjective, but my opinion is that following that style > results in shorter and more elegant code than the approach with the > temporary arrays proposed in patch 11/11. > > Bart. yes, but that approach uses 'KERN_CONT'. The point of patch 11/11 is to get rid of KERN_CONT, which is racy. Thanks, -Jason