Difference between printk and pr_info

Jarvis picture Jarvis · Feb 15, 2017 · Viewed 13.9k times · Source

What's the exact difference between printk and pr_info functions ? And under what conditions, should I choose one over the another ?

Answer

barcelona_delpy picture barcelona_delpy · Feb 15, 2017

The kernel's printk.h has:

#define pr_info(fmt,arg...) \
    printk(KERN_INFO fmt,##arg)

Just like the name, pr_info is printk with the KERN_INFO priority.