From patchwork Thu Dec 2 08:05:02 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Huang, Ying" X-Patchwork-Id: 373301 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id oB286JNp009621 for ; Thu, 2 Dec 2010 08:06:37 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757259Ab0LBIF6 (ORCPT ); Thu, 2 Dec 2010 03:05:58 -0500 Received: from mga01.intel.com ([192.55.52.88]:47984 "EHLO mga01.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752687Ab0LBIFM (ORCPT ); Thu, 2 Dec 2010 03:05:12 -0500 Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga101.fm.intel.com with ESMTP; 02 Dec 2010 00:05:11 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.59,287,1288594800"; d="scan'208";a="632307494" Received: from yhuang-dev.sh.intel.com ([10.239.13.2]) by fmsmga002.fm.intel.com with ESMTP; 02 Dec 2010 00:05:10 -0800 From: Huang Ying To: Len Brown Cc: linux-kernel@vger.kernel.org, Andi Kleen , Tony Luck , ying.huang@intel.com, linux-acpi@vger.kernel.org, Peter Zijlstra , Andrew Morton , Linus Torvalds , Ingo Molnar Subject: [PATCH -v3 1/4] printk, Add pr_pfx for library functions Date: Thu, 2 Dec 2010 16:05:02 +0800 Message-Id: <1291277105-31758-2-git-send-email-ying.huang@intel.com> X-Mailer: git-send-email 1.7.2.3 In-Reply-To: <1291277105-31758-1-git-send-email-ying.huang@intel.com> References: <1291277105-31758-1-git-send-email-ying.huang@intel.com> Sender: linux-acpi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter1.kernel.org [140.211.167.41]); Thu, 02 Dec 2010 08:06:37 +0000 (UTC) --- a/include/linux/printk.h +++ b/include/linux/printk.h @@ -202,6 +202,13 @@ extern void print_hex_dump_bytes(const c #endif /* + * Used by library functions, where log level and line prefix need to + * be specifieded by the caller. + */ +#define pr_pfx(pfx, fmt, ...) \ + printk("%s" fmt, pfx, ##__VA_ARGS__) + +/* * ratelimited messages with local ratelimit_state, * no local ratelimit_state used in the !PRINTK case */