Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754711AbYKLUEG (ORCPT ); Wed, 12 Nov 2008 15:04:06 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1752848AbYKLUDz (ORCPT ); Wed, 12 Nov 2008 15:03:55 -0500 Received: from mtagate3.de.ibm.com ([195.212.29.152]:42264 "EHLO mtagate3.de.ibm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751968AbYKLUDy (ORCPT ); Wed, 12 Nov 2008 15:03:54 -0500 Subject: Re: [RFC] Add PR_PREFIX to pr_xyz macros. From: Martin Schwidefsky Reply-To: schwidefsky@de.ibm.com To: Linus Torvalds Cc: linux-kernel@vger.kernel.org In-Reply-To: References: <1226511327.23498.3.camel@localhost> Content-Type: text/plain Organization: IBM Corporation Date: Wed, 12 Nov 2008 20:59:02 +0100 Message-Id: <1226519942.2222.4.camel@localhost> Mime-Version: 1.0 X-Mailer: Evolution 2.22.3.1 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1029 Lines: 37 On Wed, 2008-11-12 at 11:48 -0800, Linus Torvalds wrote: > > On Wed, 12 Nov 2008, Martin Schwidefsky wrote: > > > > +#ifndef PR_PREFIX > > +#define pr_fmt(format) format > > +#else > > +#define pr_fmt(format) PR_PREFIX ": " format > > +#endif > > + > > +#define pr_emerg(fmt, ...) \ > > + printk(KERN_EMERG pr_fmt(fmt), ##__VA_ARGS__) > > So, why can't people just define their pr_fmt() macro directly, something > like > > #define pr_fmt(fmt) \ > "%s:%d " fmt, __FILE__, __LINE__ > > which seems to be much more useful and generic than forcing them to use > "PR_PREFIX"? Even better - much better. With that define a lot more printk wrappers could be replaced. I'll come up with a patch. -- blue skies, Martin. "Reality continues to ruin my life." - Calvin. -- 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/