From: ebiederm@xmission.com (Eric W. Biederman)
To: Joe Perches <joe@perches.com>
Cc: kexec@lists.infradead.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 16/21] kernel/kexec.c: use pr_<level> and add pr_fmt(fmt)
Date: Mon, 05 Oct 2009 05:01:16 -0700 [thread overview]
Message-ID: <m163auvylv.fsf@fess.ebiederm.org> (raw)
In-Reply-To: <40ffa7c5595f4afbba793919b397b5139cde901a.1254701151.git.joe@perches.com> (Joe Perches's message of "Sun\, 4 Oct 2009 17\:53\:43 -0700")
Joe Perches <joe@perches.com> writes:
> Added #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
> Converted printk(KERN_<level> to pr_<level>(
> Added KERN_ERR to allocation failure message
I'm dense and I haven't seen the discussions. What
is the point of adding a prefix string where none exists
into a bunch of printks?
> Signed-off-by: Joe Perches <joe@perches.com>
> ---
> kernel/kexec.c | 21 ++++++++++-----------
> 1 files changed, 10 insertions(+), 11 deletions(-)
>
> diff --git a/kernel/kexec.c b/kernel/kexec.c
> index f336e21..e805351 100644
> --- a/kernel/kexec.c
> +++ b/kernel/kexec.c
> @@ -6,6 +6,8 @@
> * Version 2. See the file COPYING for more details.
> */
>
> +#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
> +
> #include <linux/capability.h>
> #include <linux/mm.h>
> #include <linux/file.h>
> @@ -245,13 +247,13 @@ static int kimage_normal_alloc(struct kimage **rimage, unsigned long entry,
> image->control_code_page = kimage_alloc_control_pages(image,
> get_order(KEXEC_CONTROL_PAGE_SIZE));
> if (!image->control_code_page) {
> - printk(KERN_ERR "Could not allocate control_code_buffer\n");
> + pr_err("Could not allocate control_code_buffer\n");
> goto out;
> }
>
> image->swap_page = kimage_alloc_control_pages(image, 0);
> if (!image->swap_page) {
> - printk(KERN_ERR "Could not allocate swap buffer\n");
> + pr_err("Could not allocate swap buffer\n");
> goto out;
> }
>
> @@ -320,7 +322,7 @@ static int kimage_crash_alloc(struct kimage **rimage, unsigned long entry,
> image->control_code_page = kimage_alloc_control_pages(image,
> get_order(KEXEC_CONTROL_PAGE_SIZE));
> if (!image->control_code_page) {
> - printk(KERN_ERR "Could not allocate control_code_buffer\n");
> + pr_err("Could not allocate control_code_buffer\n");
> goto out;
> }
>
> @@ -1141,8 +1143,7 @@ static int __init crash_notes_memory_init(void)
> /* Allocate memory for saving cpu registers. */
> crash_notes = alloc_percpu(note_buf_t);
> if (!crash_notes) {
> - printk("Kexec: Memory allocation for saving cpu register"
> - " states failed\n");
> + pr_err("Memory allocation for saving cpu register states failed\n");
> return -ENOMEM;
> }
> return 0;
> @@ -1192,8 +1193,7 @@ static int __init parse_crashkernel_mem(char *cmdline,
> if (*cur != ':') {
> end = memparse(cur, &tmp);
> if (cur == tmp) {
> - pr_warning("crashkernel: Memory "
> - "value expected\n");
> + pr_warning("crashkernel: Memory value expected\n");
> return -EINVAL;
> }
> cur = tmp;
> @@ -1211,7 +1211,7 @@ static int __init parse_crashkernel_mem(char *cmdline,
>
> size = memparse(cur, &tmp);
> if (cur == tmp) {
> - pr_warning("Memory value expected\n");
> + pr_warning("crashkernel: Memory value expected\n");
> return -EINVAL;
> }
> cur = tmp;
> @@ -1234,8 +1234,7 @@ static int __init parse_crashkernel_mem(char *cmdline,
> cur++;
> *crash_base = memparse(cur, &tmp);
> if (cur == tmp) {
> - pr_warning("Memory value expected "
> - "after '@'\n");
> + pr_warning("crashkernel: Memory value expected after '@'\n");
> return -EINVAL;
> }
> }
> @@ -1473,7 +1472,7 @@ int kernel_kexec(void)
> #endif
> {
> kernel_restart_prepare(NULL);
> - printk(KERN_EMERG "Starting new kernel\n");
> + pr_emerg("Starting new kernel\n");
> machine_shutdown();
> }
>
> --
> 1.6.3.1.10.g659a0.dirty
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.tux.org/lkml/
_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec
WARNING: multiple messages have this Message-ID (diff)
From: ebiederm@xmission.com (Eric W. Biederman)
To: Joe Perches <joe@perches.com>
Cc: linux-kernel@vger.kernel.org, kexec@lists.infradead.org
Subject: Re: [PATCH 16/21] kernel/kexec.c: use pr_<level> and add pr_fmt(fmt)
Date: Mon, 05 Oct 2009 05:01:16 -0700 [thread overview]
Message-ID: <m163auvylv.fsf@fess.ebiederm.org> (raw)
In-Reply-To: <40ffa7c5595f4afbba793919b397b5139cde901a.1254701151.git.joe@perches.com> (Joe Perches's message of "Sun\, 4 Oct 2009 17\:53\:43 -0700")
Joe Perches <joe@perches.com> writes:
> Added #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
> Converted printk(KERN_<level> to pr_<level>(
> Added KERN_ERR to allocation failure message
I'm dense and I haven't seen the discussions. What
is the point of adding a prefix string where none exists
into a bunch of printks?
> Signed-off-by: Joe Perches <joe@perches.com>
> ---
> kernel/kexec.c | 21 ++++++++++-----------
> 1 files changed, 10 insertions(+), 11 deletions(-)
>
> diff --git a/kernel/kexec.c b/kernel/kexec.c
> index f336e21..e805351 100644
> --- a/kernel/kexec.c
> +++ b/kernel/kexec.c
> @@ -6,6 +6,8 @@
> * Version 2. See the file COPYING for more details.
> */
>
> +#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
> +
> #include <linux/capability.h>
> #include <linux/mm.h>
> #include <linux/file.h>
> @@ -245,13 +247,13 @@ static int kimage_normal_alloc(struct kimage **rimage, unsigned long entry,
> image->control_code_page = kimage_alloc_control_pages(image,
> get_order(KEXEC_CONTROL_PAGE_SIZE));
> if (!image->control_code_page) {
> - printk(KERN_ERR "Could not allocate control_code_buffer\n");
> + pr_err("Could not allocate control_code_buffer\n");
> goto out;
> }
>
> image->swap_page = kimage_alloc_control_pages(image, 0);
> if (!image->swap_page) {
> - printk(KERN_ERR "Could not allocate swap buffer\n");
> + pr_err("Could not allocate swap buffer\n");
> goto out;
> }
>
> @@ -320,7 +322,7 @@ static int kimage_crash_alloc(struct kimage **rimage, unsigned long entry,
> image->control_code_page = kimage_alloc_control_pages(image,
> get_order(KEXEC_CONTROL_PAGE_SIZE));
> if (!image->control_code_page) {
> - printk(KERN_ERR "Could not allocate control_code_buffer\n");
> + pr_err("Could not allocate control_code_buffer\n");
> goto out;
> }
>
> @@ -1141,8 +1143,7 @@ static int __init crash_notes_memory_init(void)
> /* Allocate memory for saving cpu registers. */
> crash_notes = alloc_percpu(note_buf_t);
> if (!crash_notes) {
> - printk("Kexec: Memory allocation for saving cpu register"
> - " states failed\n");
> + pr_err("Memory allocation for saving cpu register states failed\n");
> return -ENOMEM;
> }
> return 0;
> @@ -1192,8 +1193,7 @@ static int __init parse_crashkernel_mem(char *cmdline,
> if (*cur != ':') {
> end = memparse(cur, &tmp);
> if (cur == tmp) {
> - pr_warning("crashkernel: Memory "
> - "value expected\n");
> + pr_warning("crashkernel: Memory value expected\n");
> return -EINVAL;
> }
> cur = tmp;
> @@ -1211,7 +1211,7 @@ static int __init parse_crashkernel_mem(char *cmdline,
>
> size = memparse(cur, &tmp);
> if (cur == tmp) {
> - pr_warning("Memory value expected\n");
> + pr_warning("crashkernel: Memory value expected\n");
> return -EINVAL;
> }
> cur = tmp;
> @@ -1234,8 +1234,7 @@ static int __init parse_crashkernel_mem(char *cmdline,
> cur++;
> *crash_base = memparse(cur, &tmp);
> if (cur == tmp) {
> - pr_warning("Memory value expected "
> - "after '@'\n");
> + pr_warning("crashkernel: Memory value expected after '@'\n");
> return -EINVAL;
> }
> }
> @@ -1473,7 +1472,7 @@ int kernel_kexec(void)
> #endif
> {
> kernel_restart_prepare(NULL);
> - printk(KERN_EMERG "Starting new kernel\n");
> + pr_emerg("Starting new kernel\n");
> machine_shutdown();
> }
>
> --
> 1.6.3.1.10.g659a0.dirty
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.tux.org/lkml/
next prev parent reply other threads:[~2009-10-05 12:01 UTC|newest]
Thread overview: 59+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-10-05 0:53 [PATCH 00/21] pr_dbg, pr_fmt Joe Perches
2009-10-05 1:18 ` Joe Perches
2009-10-05 1:18 ` Joe Perches
2009-10-05 0:53 ` Joe Perches
2009-10-05 0:53 ` [PATCH 01/21] include/linux/ dynamic_debug.h kernel.h: Remove KBUILD_MODNAME from dynamic_pr_debug, add pr_dbg Joe Perches
2009-10-05 0:53 ` [PATCH 02/21] ftrace.c: Add #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt Joe Perches
2009-10-05 13:10 ` Steven Rostedt
2009-10-05 17:21 ` Joe Perches
2009-10-05 17:32 ` Steven Rostedt
2009-10-12 6:10 ` [tip:tracing/core] " tip-bot for Joe Perches
2009-10-05 0:53 ` [PATCH 03/21] mtrr: use pr_<level> and pr_fmt Joe Perches
2009-10-05 0:53 ` [PATCH 04/21] microcode: use pr_<level> and add pr_fmt Joe Perches
2009-10-05 0:53 ` [PATCH 05/21] amd_iommu.c: use pr_<level> and add pr_fmt(fmt) Joe Perches
2009-10-12 15:00 ` Joerg Roedel
2009-10-12 17:00 ` Joe Perches
2009-10-05 0:53 ` [PATCH 06/21] es7000_32.c: " Joe Perches
2009-10-05 0:53 ` [PATCH 07/21] arch/x86/kernel/apic/: " Joe Perches
2009-10-05 0:53 ` [PATCH 08/21] mcheck/: " Joe Perches
2009-10-05 0:53 ` [PATCH 09/21] arch/x86/kernel/setup_percpu.c: " Joe Perches
2009-10-05 0:53 ` [PATCH 10/21] arch/x86/kernel/cpu/: " Joe Perches
2009-10-05 0:53 ` [PATCH 11/21] i8254.c: Add pr_fmt(fmt) Joe Perches
2009-10-05 0:53 ` [PATCH 12/21] kmmio.c: Add and use pr_fmt(fmt) Joe Perches
2009-10-05 0:53 ` [PATCH 13/21] testmmiotrace.c: " Joe Perches
2009-10-12 6:10 ` [tip:tracing/core] " tip-bot for Joe Perches
2009-10-05 0:53 ` [PATCH 14/21] crypto/: use pr_<level> and add pr_fmt(fmt) Joe Perches
2009-10-05 0:53 ` [PATCH 15/21] kernel/power/: " Joe Perches
2009-10-05 0:53 ` Joe Perches
2009-10-05 19:43 ` Rafael J. Wysocki
2009-10-05 19:43 ` Rafael J. Wysocki
2009-10-05 20:31 ` Joe Perches
2009-10-05 20:31 ` Joe Perches
2009-10-05 22:37 ` Rafael J. Wysocki
2009-10-05 22:37 ` Rafael J. Wysocki
2009-10-09 3:53 ` Joe Perches
2009-10-09 3:53 ` Joe Perches
2009-10-10 21:28 ` Rafael J. Wysocki
2009-10-10 21:28 ` Rafael J. Wysocki
2009-10-11 1:49 ` Joe Perches
2009-10-11 1:49 ` Joe Perches
2009-10-11 8:59 ` Pavel Machek
2009-10-11 8:59 ` Pavel Machek
2009-10-05 0:53 ` [PATCH 16/21] kernel/kexec.c: " Joe Perches
2009-10-05 0:53 ` Joe Perches
2009-10-05 12:01 ` Eric W. Biederman [this message]
2009-10-05 12:01 ` Eric W. Biederman
2009-10-05 17:57 ` Joe Perches
2009-10-05 17:57 ` Joe Perches
2009-10-05 0:53 ` [PATCH 17/21] crypto/async_tx/raid6test.c: " Joe Perches
2009-10-05 0:53 ` [PATCH 18/21] arch/x86/mm/mmio-mod.c: use pr_fmt Joe Perches
2009-10-05 0:53 ` [PATCH 19/21] drivers/net/bonding/: : " Joe Perches
2009-10-05 7:12 ` David Miller
2009-10-05 0:53 ` [PATCH 20/21] drivers/net/tlan: use pr_<level> and add pr_fmt(fmt) Joe Perches
2009-10-05 7:12 ` David Miller
2009-10-05 0:53 ` [PATCH 21/21] drivers/net/tlan.h: Convert printk(KERN_DEBUG to pr_dbg( Joe Perches
2009-10-05 7:12 ` David Miller
2009-10-05 7:16 ` Joe Perches
2009-10-05 7:20 ` David Miller
2009-10-05 21:15 ` Rafael J. Wysocki
2009-10-05 21:28 ` Joe Perches
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=m163auvylv.fsf@fess.ebiederm.org \
--to=ebiederm@xmission.com \
--cc=joe@perches.com \
--cc=kexec@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
/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.