Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754300AbYKLTsj (ORCPT ); Wed, 12 Nov 2008 14:48:39 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1752811AbYKLTs3 (ORCPT ); Wed, 12 Nov 2008 14:48:29 -0500 Received: from smtp1.linux-foundation.org ([140.211.169.13]:35887 "EHLO smtp1.linux-foundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752636AbYKLTs3 (ORCPT ); Wed, 12 Nov 2008 14:48:29 -0500 Date: Wed, 12 Nov 2008 11:48:24 -0800 (PST) From: Linus Torvalds To: Martin Schwidefsky cc: linux-kernel@vger.kernel.org Subject: Re: [RFC] Add PR_PREFIX to pr_xyz macros. In-Reply-To: <1226511327.23498.3.camel@localhost> Message-ID: References: <1226511327.23498.3.camel@localhost> User-Agent: Alpine 2.00 (LFD 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 748 Lines: 28 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"? Linus -- 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/