From: akpm@linux-foundation.org
To: shijie.huang@arm.com, ananth@linux.vnet.ibm.com,
anil.s.keshavamurthy@intel.com, mhiramat@kernel.org,
pmladek@suse.com, steve.capper@arm.com,
mm-commits@vger.kernel.org
Subject: + samples-kretprobe-convert-the-printk-to-pr_info-pr_err.patch added to -mm tree
Date: Wed, 25 May 2016 15:38:06 -0700 [thread overview]
Message-ID: <5746294e.DFaS3prOTKyEoaGU%akpm@linux-foundation.org> (raw)
The patch titled
Subject: samples/kretprobe: convert the printk to pr_info/pr_err
has been added to the -mm tree. Its filename is
samples-kretprobe-convert-the-printk-to-pr_info-pr_err.patch
This patch should soon appear at
http://ozlabs.org/~akpm/mmots/broken-out/samples-kretprobe-convert-the-printk-to-pr_info-pr_err.patch
and later at
http://ozlabs.org/~akpm/mmotm/broken-out/samples-kretprobe-convert-the-printk-to-pr_info-pr_err.patch
Before you just go and hit "reply", please:
a) Consider who else should be cc'ed
b) Prefer to cc a suitable mailing list as well
c) Ideally: find the original patch on the mailing list and do a
reply-to-all to that, adding suitable additional cc's
*** Remember to use Documentation/SubmitChecklist when testing your code ***
The -mm tree is included into linux-next and is updated
there every 3-4 working days
------------------------------------------------------
From: Huang Shijie <shijie.huang@arm.com>
Subject: samples/kretprobe: 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-3-git-send-email-shijie.huang@arm.com
Signed-off-by: Huang Shijie <shijie.huang@arm.com>
Cc: Petr Mladek <pmladek@suse.com>
Cc: Steve Capper <steve.capper@arm.com>
Cc: Ananth N Mavinakayanahalli <ananth@linux.vnet.ibm.com>
Cc: Anil S Keshavamurthy <anil.s.keshavamurthy@intel.com>
Cc: Masami Hiramatsu <mhiramat@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---
samples/kprobes/kretprobe_example.c | 12 +++++-------
1 file changed, 5 insertions(+), 7 deletions(-)
diff -puN samples/kprobes/kretprobe_example.c~samples-kretprobe-convert-the-printk-to-pr_info-pr_err samples/kprobes/kretprobe_example.c
--- a/samples/kprobes/kretprobe_example.c~samples-kretprobe-convert-the-printk-to-pr_info-pr_err
+++ a/samples/kprobes/kretprobe_example.c
@@ -62,7 +62,7 @@ static int ret_handler(struct kretprobe_
now = ktime_get();
delta = ktime_to_ns(ktime_sub(now, data->entry_stamp));
- printk(KERN_INFO "%s returned %d and took %lld ns to execute\n",
+ pr_info("%s returned %d and took %lld ns to execute\n",
func_name, retval, (long long)delta);
return 0;
}
@@ -82,11 +82,10 @@ static int __init kretprobe_init(void)
my_kretprobe.kp.symbol_name = func_name;
ret = register_kretprobe(&my_kretprobe);
if (ret < 0) {
- printk(KERN_INFO "register_kretprobe failed, returned %d\n",
- ret);
+ pr_err("register_kretprobe failed, returned %d\n", ret);
return -1;
}
- printk(KERN_INFO "Planted return probe at %s: %p\n",
+ pr_info("Planted return probe at %s: %p\n",
my_kretprobe.kp.symbol_name, my_kretprobe.kp.addr);
return 0;
}
@@ -94,11 +93,10 @@ static int __init kretprobe_init(void)
static void __exit kretprobe_exit(void)
{
unregister_kretprobe(&my_kretprobe);
- printk(KERN_INFO "kretprobe at %p unregistered\n",
- my_kretprobe.kp.addr);
+ pr_info("kretprobe at %p unregistered\n", my_kretprobe.kp.addr);
/* nmissed > 0 suggests that maxactive was set too low. */
- printk(KERN_INFO "Missed probing %d instances of %s\n",
+ pr_info("Missed probing %d instances of %s\n",
my_kretprobe.nmissed, my_kretprobe.kp.symbol_name);
}
_
Patches currently in -mm which might be from shijie.huang@arm.com are
samples-kprobe-convert-the-printk-to-pr_info-pr_err.patch
samples-jprobe-convert-the-printk-to-pr_info-pr_err.patch
samples-kretprobe-convert-the-printk-to-pr_info-pr_err.patch
samples-kretprobe-fix-the-wrong-type.patch
reply other threads:[~2016-05-25 22:38 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5746294e.DFaS3prOTKyEoaGU%akpm@linux-foundation.org \
--to=akpm@linux-foundation.org \
--cc=ananth@linux.vnet.ibm.com \
--cc=anil.s.keshavamurthy@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mhiramat@kernel.org \
--cc=mm-commits@vger.kernel.org \
--cc=pmladek@suse.com \
--cc=shijie.huang@arm.com \
--cc=steve.capper@arm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.