From: Huang Shijie Date: Wed, 3 Aug 2016 20:46:06 +0000 (-0700) Subject: samples/jprobe: convert the printk to pr_info/pr_err X-Git-Url: http://git.cdn.openwrt.org/?a=commitdiff_plain;h=468b88956c3317de6cf2317374faf671f950724b;p=openwrt%2Fstaging%2Fblogic.git samples/jprobe: convert the printk to pr_info/pr_err We prefer to use the pr_* to print out the log now, this patch converts the printk to pr_info. In the error path, use the pr_err to replace the printk. Link: http://lkml.kernel.org/r/1464143083-3877-2-git-send-email-shijie.huang@arm.com Signed-off-by: Huang Shijie Cc: Petr Mladek Cc: Steve Capper Cc: Ananth N Mavinakayanahalli Cc: Anil S Keshavamurthy Cc: Masami Hiramatsu Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/samples/kprobes/jprobe_example.c b/samples/kprobes/jprobe_example.c index c3108bb15789..e3c0a40909f7 100644 --- a/samples/kprobes/jprobe_example.c +++ b/samples/kprobes/jprobe_example.c @@ -48,10 +48,10 @@ static int __init jprobe_init(void) ret = register_jprobe(&my_jprobe); if (ret < 0) { - printk(KERN_INFO "register_jprobe failed, returned %d\n", ret); + pr_err("register_jprobe failed, returned %d\n", ret); return -1; } - printk(KERN_INFO "Planted jprobe at %p, handler addr %p\n", + pr_info("Planted jprobe at %p, handler addr %p\n", my_jprobe.kp.addr, my_jprobe.entry); return 0; } @@ -59,7 +59,7 @@ static int __init jprobe_init(void) static void __exit jprobe_exit(void) { unregister_jprobe(&my_jprobe); - printk(KERN_INFO "jprobe at %p unregistered\n", my_jprobe.kp.addr); + pr_info("jprobe at %p unregistered\n", my_jprobe.kp.addr); } module_init(jprobe_init)