diff mbox

[-v3,1/4] printk, Add pr_pfx for library functions

Message ID 1291277105-31758-2-git-send-email-ying.huang@intel.com (mailing list archive)
State New, archived
Headers show

Commit Message

Huang, Ying Dec. 2, 2010, 8:05 a.m. UTC
None
diff mbox

Patch

--- 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
  */