Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755581AbXJHPoh (ORCPT ); Mon, 8 Oct 2007 11:44:37 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1752259AbXJHPo3 (ORCPT ); Mon, 8 Oct 2007 11:44:29 -0400 Received: from smtp2.linux-foundation.org ([207.189.120.14]:36129 "EHLO smtp2.linux-foundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752119AbXJHPo2 (ORCPT ); Mon, 8 Oct 2007 11:44:28 -0400 Date: Mon, 8 Oct 2007 08:42:53 -0700 From: Stephen Hemminger To: "Vegard Nossum" Cc: "Rob Landley" , "Miguel Ojeda" , "Randy Dunlap" , LKML , "Kyle Moffett" , "Michael Holzheu" , "Joe Perches" , "Dick Streefland" , "Geert Uytterhoeven" , "Jesse Barnes" , "Arnd Bergmann" , "Jan Engelhardt" , "Emil Medve" , "linux@horizon.com" Subject: Re: [RFC][PATCH] New message-logging API (kprint) Message-ID: <20071008084253.407303f0@freepuppy.rosehill> In-Reply-To: <19f34abd0710080833q76ef905dr6e47a1ec780cf153@mail.gmail.com> References: <1191528247.13580.11.camel@grianne> <200710051126.50816.rob@landley.net> <19f34abd0710052310r2043f69ew70fe8b5f9ef0493c@mail.gmail.com> <200710071650.50627.rob@landley.net> <20071008082541.2638bb34@freepuppy.rosehill> <19f34abd0710080833q76ef905dr6e47a1ec780cf153@mail.gmail.com> Organization: Linux Foundation X-Mailer: Claws Mail 3.0.0 (GTK+ 2.10.14; x86_64-redhat-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1467 Lines: 44 On Mon, 8 Oct 2007 17:33:53 +0200 "Vegard Nossum" wrote: > On 10/8/07, Stephen Hemminger wrote: > > On Sun, 7 Oct 2007 16:50:49 -0500 > > Rob Landley wrote: > > > > > On Saturday 06 October 2007 1:10:26 am Vegard Nossum wrote: > > > > On 10/5/07, Rob Landley wrote: > > > I made it about halfway through the patch and the only compile time filtering > > > I found was: > > > > > > --- a/drivers/md/md.c > > > +++ b/drivers/md/md.c > > > @@ -62,7 +62,10 @@ > > > #define MdpMinorShift 6 > > > > > > #define DEBUG 0 > > > -#define dprintk(x...) ((void)(DEBUG && printk(x))) > > > +#define dprintk(x...)\ > > > +if(DEBUG) {\ > > > + printk(x);\ > > > +} > > > > > > If you say it does, I'll take your word for it, but there's so much churn in > > > there I didn't find it before my interest ran out... > > > > > > > BTW that change might actually break code (dangling else problems). > > The original way was safer. > > Yep, thanks. I think containing it in do {} while(0) should fix, though, no? > > Vegard The correct fix is to just replace dprintk() with pr_debug() -- Stephen Hemminger - 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/