diff options
author | Joe Perches <joe@perches.com> | 2012-05-21 22:50:07 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2012-06-06 03:17:22 -0400 |
commit | c767a54ba0657e52e6edaa97cbe0b0a8bf1c1655 (patch) | |
tree | d1430237ad10296e0e1a3d9b6f34c2bc56bcdfd7 /arch/x86/kernel/reboot.c | |
parent | f9ba7179ce91fb77b2adf6eaab3676ab3a1f5a15 (diff) |
x86/debug: Add KERN_<LEVEL> to bare printks, convert printks to pr_<level>
Use a more current logging style:
- Bare printks should have a KERN_<LEVEL> for consistency's sake
- Add pr_fmt where appropriate
- Neaten some macro definitions
- Convert some Ok output to OK
- Use "%s: ", __func__ in pr_fmt for summit
- Convert some printks to pr_<level>
Message output is not identical in all cases.
Signed-off-by: Joe Perches <joe@perches.com>
Cc: levinsasha928@gmail.com
Link: http://lkml.kernel.org/r/1337655007.24226.10.camel@joe2Laptop
[ merged two similar patches, tidied up the changelog ]
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'arch/x86/kernel/reboot.c')
-rw-r--r-- | arch/x86/kernel/reboot.c | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/arch/x86/kernel/reboot.c b/arch/x86/kernel/reboot.c index 79c45af81604..ab3f06260712 100644 --- a/arch/x86/kernel/reboot.c +++ b/arch/x86/kernel/reboot.c | |||
@@ -1,3 +1,5 @@ | |||
1 | #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt | ||
2 | |||
1 | #include <linux/module.h> | 3 | #include <linux/module.h> |
2 | #include <linux/reboot.h> | 4 | #include <linux/reboot.h> |
3 | #include <linux/init.h> | 5 | #include <linux/init.h> |
@@ -152,7 +154,8 @@ static int __init set_bios_reboot(const struct dmi_system_id *d) | |||
152 | { | 154 | { |
153 | if (reboot_type != BOOT_BIOS) { | 155 | if (reboot_type != BOOT_BIOS) { |
154 | reboot_type = BOOT_BIOS; | 156 | reboot_type = BOOT_BIOS; |
155 | printk(KERN_INFO "%s series board detected. Selecting BIOS-method for reboots.\n", d->ident); | 157 | pr_info("%s series board detected. Selecting %s-method for reboots.\n", |
158 | "BIOS", d->ident); | ||
156 | } | 159 | } |
157 | return 0; | 160 | return 0; |
158 | } | 161 | } |
@@ -207,8 +210,8 @@ static int __init set_pci_reboot(const struct dmi_system_id *d) | |||
207 | { | 210 | { |
208 | if (reboot_type != BOOT_CF9) { | 211 | if (reboot_type != BOOT_CF9) { |
209 | reboot_type = BOOT_CF9; | 212 | reboot_type = BOOT_CF9; |
210 | printk(KERN_INFO "%s series board detected. " | 213 | pr_info("%s series board detected. Selecting %s-method for reboots.\n", |
211 | "Selecting PCI-method for reboots.\n", d->ident); | 214 | "PCI", d->ident); |
212 | } | 215 | } |
213 | return 0; | 216 | return 0; |
214 | } | 217 | } |
@@ -217,7 +220,8 @@ static int __init set_kbd_reboot(const struct dmi_system_id *d) | |||
217 | { | 220 | { |
218 | if (reboot_type != BOOT_KBD) { | 221 | if (reboot_type != BOOT_KBD) { |
219 | reboot_type = BOOT_KBD; | 222 | reboot_type = BOOT_KBD; |
220 | printk(KERN_INFO "%s series board detected. Selecting KBD-method for reboot.\n", d->ident); | 223 | pr_info("%s series board detected. Selecting %s-method for reboot.\n", |
224 | "KBD", d->ident); | ||
221 | } | 225 | } |
222 | return 0; | 226 | return 0; |
223 | } | 227 | } |
@@ -668,7 +672,7 @@ static void __machine_emergency_restart(int emergency) | |||
668 | 672 | ||
669 | static void native_machine_restart(char *__unused) | 673 | static void native_machine_restart(char *__unused) |
670 | { | 674 | { |
671 | printk("machine restart\n"); | 675 | pr_notice("machine restart\n"); |
672 | 676 | ||
673 | if (!reboot_force) | 677 | if (!reboot_force) |
674 | machine_shutdown(); | 678 | machine_shutdown(); |