mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-29 01:51:39 +00:00
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>
This commit is contained in:
parent
76181c134f
commit
1f7c8234c7
5 changed files with 25 additions and 22 deletions
|
@ -251,10 +251,25 @@ extern void print_hex_dump_bytes(const char *prefix_str, int prefix_type,
|
|||
const void *buf, size_t len);
|
||||
#define hex_asc(x) "0123456789abcdef"[x]
|
||||
|
||||
#define pr_emerg(fmt, arg...) \
|
||||
printk(KERN_EMERG fmt, ##arg)
|
||||
#define pr_alert(fmt, arg...) \
|
||||
printk(KERN_ALERT fmt, ##arg)
|
||||
#define pr_crit(fmt, arg...) \
|
||||
printk(KERN_CRIT fmt, ##arg)
|
||||
#define pr_err(fmt, arg...) \
|
||||
printk(KERN_ERR fmt, ##arg)
|
||||
#define pr_warning(fmt, arg...) \
|
||||
printk(KERN_WARNING fmt, ##arg)
|
||||
#define pr_notice(fmt, arg...) \
|
||||
printk(KERN_NOTICE fmt, ##arg)
|
||||
#define pr_info(fmt, arg...) \
|
||||
printk(KERN_INFO fmt, ##arg)
|
||||
|
||||
#ifdef DEBUG
|
||||
/* If you are writing a driver, please use dev_dbg instead */
|
||||
#define pr_debug(fmt,arg...) \
|
||||
printk(KERN_DEBUG fmt,##arg)
|
||||
#define pr_debug(fmt, arg...) \
|
||||
printk(KERN_DEBUG fmt, ##arg)
|
||||
#else
|
||||
static inline int __attribute__ ((format (printf, 1, 2))) pr_debug(const char * fmt, ...)
|
||||
{
|
||||
|
@ -262,9 +277,6 @@ static inline int __attribute__ ((format (printf, 1, 2))) pr_debug(const char *
|
|||
}
|
||||
#endif
|
||||
|
||||
#define pr_info(fmt,arg...) \
|
||||
printk(KERN_INFO fmt,##arg)
|
||||
|
||||
/*
|
||||
* Display an IP address in readable format.
|
||||
*/
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue