From: Oskar Andero <oskar.andero@sonymobile.com>
To: linux-kernel@vger.kernel.org
Cc: linux-arch@vger.kernel.org, masami.hiramatsu.pt@hitachi.com,
davem@davemloft.net, anil.s.keshavamurthy@intel.com,
ananth@in.ibm.com, radovan.lekanovic@sonymobile.com,
bjorn.davidsson@sonymobile.com, oskar.andero@sonymobile.com
Subject: [PATCH v2 4/4] kprobes: replace printk with pr_-functions
Date: Thu, 4 Apr 2013 14:51:29 +0200 [thread overview]
Message-ID: <1365079889-21525-5-git-send-email-oskar.andero@sonymobile.com> (raw)
In-Reply-To: <1365079889-21525-1-git-send-email-oskar.andero@sonymobile.com>
Instead of using printk use pr_info/pr_err/pr_warn. This was
detected by the checkpatch.pl script.
Cc: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
Cc: David S. Miller <davem@davemloft.net>
Signed-off-by: Oskar Andero <oskar.andero@sonymobile.com>
Acked-by: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
---
kernel/kprobes.c | 18 +++++++++---------
1 file changed, 9 insertions(+), 9 deletions(-)
diff --git a/kernel/kprobes.c b/kernel/kprobes.c
index 58c9f4e..d61cbad 100644
--- a/kernel/kprobes.c
+++ b/kernel/kprobes.c
@@ -168,7 +168,7 @@ static void init_kprobe_blacklist(void)
kprobe_lookup_name(kretprobe_blacklist[i].name,
kretprobe_blacklist[i].addr);
if (!kretprobe_blacklist[i].addr)
- printk("kretprobe: lookup failed: %s\n",
+ pr_err("kretprobe: lookup failed: %s\n",
kretprobe_blacklist[i].name);
}
}
@@ -780,7 +780,7 @@ static void reuse_unused_kprobe(struct kprobe *ap)
*/
op = container_of(ap, struct optimized_kprobe, kp);
if (unlikely(list_empty(&op->list)))
- printk(KERN_WARNING "Warning: found a stray unused "
+ pr_warn("Warning: found a stray unused "
"aggrprobe@%p\n", ap->addr);
/* Enable the probe again */
ap->flags &= ~KPROBE_FLAG_DISABLED;
@@ -887,7 +887,7 @@ static void __kprobes optimize_all_kprobes(void)
if (!kprobe_disabled(p))
optimize_kprobe(p);
}
- printk(KERN_INFO "Kprobes globally optimized\n");
+ pr_info("Kprobes globally optimized\n");
}
/* This should be called with kprobe_mutex locked */
@@ -911,7 +911,7 @@ static void __kprobes unoptimize_all_kprobes(void)
}
/* Wait for unoptimizing completion */
wait_for_kprobe_optimizer();
- printk(KERN_INFO "Kprobes globally unoptimized\n");
+ pr_info("Kprobes globally unoptimized\n");
}
int sysctl_kprobes_optimization;
@@ -982,7 +982,7 @@ static void __kprobes __disarm_kprobe(struct kprobe *p, bool reopt)
/* There should be no unused kprobes can be reused without optimization */
static void reuse_unused_kprobe(struct kprobe *ap)
{
- printk(KERN_ERR "Error: There should be no unused kprobe here.\n");
+ pr_err("Error: There should be no unused kprobe here.\n");
BUG_ON(kprobe_unused(ap));
}
@@ -2096,8 +2096,8 @@ EXPORT_SYMBOL_GPL(enable_kprobe);
void __kprobes dump_kprobe(struct kprobe *kp)
{
- printk(KERN_WARNING "Dumping kprobe:\n");
- printk(KERN_WARNING "Name: %s\nAddress: %p\nOffset: %x\n",
+ pr_warn("Dumping kprobe:\n");
+ pr_warn("Name: %s\nAddress: %p\nOffset: %x\n",
kp->symbol_name, kp->addr, kp->offset);
}
@@ -2293,7 +2293,7 @@ static void __kprobes arm_all_kprobes(void)
}
kprobes_all_disarmed = false;
- printk(KERN_INFO "Kprobes globally enabled\n");
+ pr_info("Kprobes globally enabled\n");
already_enabled:
mutex_unlock(&kprobe_mutex);
@@ -2315,7 +2315,7 @@ static void __kprobes disarm_all_kprobes(void)
}
kprobes_all_disarmed = true;
- printk(KERN_INFO "Kprobes globally disabled\n");
+ pr_info("Kprobes globally disabled\n");
for (i = 0; i < KPROBE_TABLE_SIZE; i++) {
head = &kprobe_table[i];
--
1.8.1.5
next prev parent reply other threads:[~2013-04-04 12:51 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-04-04 12:51 [PATCH v2 0/4] kprobes: split blacklist into common and arch Oskar Andero
2013-04-04 12:51 ` [PATCH v2 1/4] kprobes: delay blacklist symbol lookup until we actually need it Oskar Andero
2013-04-05 0:56 ` Joonsoo Kim
2013-04-05 2:16 ` Masami Hiramatsu
2013-04-05 2:16 ` Masami Hiramatsu
2013-04-05 10:00 ` Oskar Andero
2013-04-04 12:51 ` [PATCH v2 2/4] kprobes: split blacklist into common and arch Oskar Andero
2013-04-05 2:34 ` Masami Hiramatsu
2013-04-05 2:34 ` Masami Hiramatsu
2013-04-05 8:04 ` Vineet Gupta
2013-04-04 12:51 ` [PATCH v2 3/4] kprobes: move x86-specific blacklist symbols to arch directory Oskar Andero
2013-04-04 12:51 ` Oskar Andero
2013-04-05 2:36 ` Masami Hiramatsu
2013-04-04 12:51 ` Oskar Andero [this message]
2013-04-04 12:51 ` [PATCH v2 4/4] kprobes: replace printk with pr_-functions Oskar Andero
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=1365079889-21525-5-git-send-email-oskar.andero@sonymobile.com \
--to=oskar.andero@sonymobile.com \
--cc=ananth@in.ibm.com \
--cc=anil.s.keshavamurthy@intel.com \
--cc=bjorn.davidsson@sonymobile.com \
--cc=davem@davemloft.net \
--cc=linux-arch@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=masami.hiramatsu.pt@hitachi.com \
--cc=radovan.lekanovic@sonymobile.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).