aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/kernel.h
diff options
context:
space:
mode:
authorEmil Medve <Emilian.Medve@Freescale.com>2007-10-17 02:29:48 -0400
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-10-17 11:42:57 -0400
commit1f7c8234c7a68c2ccc2a33f3b7d48057980e7c35 (patch)
treec05f0babd6d6be59952c2dc62ade215723e03a93 /include/linux/kernel.h
parent76181c134f87479fa13bf2548ddf2999055d34d4 (diff)
Make the pr_*() family of macros in kernel.h complete
Other/Some pr_*() macros are already defined in kernel.h, but pr_err() was defined multiple times in several other places Signed-off-by: Emil Medve <Emilian.Medve@Freescale.com> Cc: Jean Delvare <khali@linux-fr.org> Cc: Jeff Garzik <jeff@garzik.org> Cc: "Antonino A. Daplas" <adaplas@pol.net> Cc: Tony Lindgren <tony@atomide.com> Reviewed-by: Satyam Sharma <satyam@infradead.org> Acked-by: Randy Dunlap <randy.dunlap@oracle.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include/linux/kernel.h')
-rw-r--r--include/linux/kernel.h22
1 files changed, 17 insertions, 5 deletions
diff --git a/include/linux/kernel.h b/include/linux/kernel.h
index c680e1e6e9a3..b2ea36e5b6b9 100644
--- a/include/linux/kernel.h
+++ b/include/linux/kernel.h
@@ -251,10 +251,25 @@ extern void print_hex_dump_bytes(const char *prefix_str, int prefix_type,
251 const void *buf, size_t len); 251 const void *buf, size_t len);
252#define hex_asc(x) "0123456789abcdef"[x] 252#define hex_asc(x) "0123456789abcdef"[x]
253 253
254#define pr_emerg(fmt, arg...) \
255 printk(KERN_EMERG fmt, ##arg)
256#define pr_alert(fmt, arg...) \
257 printk(KERN_ALERT fmt, ##arg)
258#define pr_crit(fmt, arg...) \
259 printk(KERN_CRIT fmt, ##arg)
260#define pr_err(fmt, arg...) \
261 printk(KERN_ERR fmt, ##arg)
262#define pr_warning(fmt, arg...) \
263 printk(KERN_WARNING fmt, ##arg)
264#define pr_notice(fmt, arg...) \
265 printk(KERN_NOTICE fmt, ##arg)
266#define pr_info(fmt, arg...) \
267 printk(KERN_INFO fmt, ##arg)
268
254#ifdef DEBUG 269#ifdef DEBUG
255/* If you are writing a driver, please use dev_dbg instead */ 270/* If you are writing a driver, please use dev_dbg instead */
256#define pr_debug(fmt,arg...) \ 271#define pr_debug(fmt, arg...) \
257 printk(KERN_DEBUG fmt,##arg) 272 printk(KERN_DEBUG fmt, ##arg)
258#else 273#else
259static inline int __attribute__ ((format (printf, 1, 2))) pr_debug(const char * fmt, ...) 274static inline int __attribute__ ((format (printf, 1, 2))) pr_debug(const char * fmt, ...)
260{ 275{
@@ -262,9 +277,6 @@ static inline int __attribute__ ((format (printf, 1, 2))) pr_debug(const char *
262} 277}
263#endif 278#endif
264 279
265#define pr_info(fmt,arg...) \
266 printk(KERN_INFO fmt,##arg)
267
268/* 280/*
269 * Display an IP address in readable format. 281 * Display an IP address in readable format.
270 */ 282 */