diff options
| author | Andrew Morton <akpm@linux-foundation.org> | 2013-04-29 19:18:20 -0400 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2013-04-29 21:28:20 -0400 |
| commit | ea676e846a8171b8e215627259f485a4e70328cb (patch) | |
| tree | 01e489c639bec5a2e84c6f7398176643eee183a7 /init | |
| parent | c2409b004ac4757ac5121851f8a58e0bcbcf7a3c (diff) | |
init/main.c: convert to pr_foo()
Also enables cleanup of some 80-col trickery.
Cc: Richard Weinberger <richard@nod.at>
Cc: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'init')
| -rw-r--r-- | init/main.c | 31 |
1 files changed, 15 insertions, 16 deletions
diff --git a/init/main.c b/init/main.c index e1c87e1d6359..ea73e1eb361c 100644 --- a/init/main.c +++ b/init/main.c | |||
| @@ -9,6 +9,8 @@ | |||
| 9 | * Simplified starting of init: Michael A. Griffith <grif@acm.org> | 9 | * Simplified starting of init: Michael A. Griffith <grif@acm.org> |
| 10 | */ | 10 | */ |
| 11 | 11 | ||
| 12 | #define DEBUG /* Enable initcall_debug */ | ||
| 13 | |||
| 12 | #include <linux/types.h> | 14 | #include <linux/types.h> |
| 13 | #include <linux/module.h> | 15 | #include <linux/module.h> |
| 14 | #include <linux/proc_fs.h> | 16 | #include <linux/proc_fs.h> |
| @@ -174,8 +176,8 @@ static int __init obsolete_checksetup(char *line) | |||
| 174 | if (line[n] == '\0' || line[n] == '=') | 176 | if (line[n] == '\0' || line[n] == '=') |
| 175 | had_early_param = 1; | 177 | had_early_param = 1; |
| 176 | } else if (!p->setup_func) { | 178 | } else if (!p->setup_func) { |
| 177 | printk(KERN_WARNING "Parameter %s is obsolete," | 179 | pr_warn("Parameter %s is obsolete, ignored\n", |
| 178 | " ignored\n", p->str); | 180 | p->str); |
| 179 | return 1; | 181 | return 1; |
| 180 | } else if (p->setup_func(line + n)) | 182 | } else if (p->setup_func(line + n)) |
| 181 | return 1; | 183 | return 1; |
| @@ -398,8 +400,7 @@ static int __init do_early_param(char *param, char *val, const char *unused) | |||
| 398 | strcmp(p->str, "earlycon") == 0) | 400 | strcmp(p->str, "earlycon") == 0) |
| 399 | ) { | 401 | ) { |
| 400 | if (p->setup_func(val) != 0) | 402 | if (p->setup_func(val) != 0) |
| 401 | printk(KERN_WARNING | 403 | pr_warn("Malformed early option '%s'\n", param); |
| 402 | "Malformed early option '%s'\n", param); | ||
| 403 | } | 404 | } |
| 404 | } | 405 | } |
| 405 | /* We accept everything at this stage. */ | 406 | /* We accept everything at this stage. */ |
| @@ -497,7 +498,7 @@ asmlinkage void __init start_kernel(void) | |||
| 497 | tick_init(); | 498 | tick_init(); |
| 498 | boot_cpu_init(); | 499 | boot_cpu_init(); |
| 499 | page_address_init(); | 500 | page_address_init(); |
| 500 | printk(KERN_NOTICE "%s", linux_banner); | 501 | pr_notice("%s", linux_banner); |
| 501 | setup_arch(&command_line); | 502 | setup_arch(&command_line); |
| 502 | mm_init_owner(&init_mm, &init_task); | 503 | mm_init_owner(&init_mm, &init_task); |
| 503 | mm_init_cpumask(&init_mm); | 504 | mm_init_cpumask(&init_mm); |
| @@ -509,7 +510,7 @@ asmlinkage void __init start_kernel(void) | |||
| 509 | build_all_zonelists(NULL, NULL); | 510 | build_all_zonelists(NULL, NULL); |
| 510 | page_alloc_init(); | 511 | page_alloc_init(); |
| 511 | 512 | ||
| 512 | printk(KERN_NOTICE "Kernel command line: %s\n", boot_command_line); | 513 | pr_notice("Kernel command line: %s\n", boot_command_line); |
| 513 | parse_early_param(); | 514 | parse_early_param(); |
| 514 | parse_args("Booting kernel", static_command_line, __start___param, | 515 | parse_args("Booting kernel", static_command_line, __start___param, |
| 515 | __stop___param - __start___param, | 516 | __stop___param - __start___param, |
| @@ -582,8 +583,7 @@ asmlinkage void __init start_kernel(void) | |||
| 582 | #ifdef CONFIG_BLK_DEV_INITRD | 583 | #ifdef CONFIG_BLK_DEV_INITRD |
| 583 | if (initrd_start && !initrd_below_start_ok && | 584 | if (initrd_start && !initrd_below_start_ok && |
| 584 | page_to_pfn(virt_to_page((void *)initrd_start)) < min_low_pfn) { | 585 | page_to_pfn(virt_to_page((void *)initrd_start)) < min_low_pfn) { |
| 585 | printk(KERN_CRIT "initrd overwritten (0x%08lx < 0x%08lx) - " | 586 | pr_crit("initrd overwritten (0x%08lx < 0x%08lx) - disabling it.\n", |
| 586 | "disabling it.\n", | ||
| 587 | page_to_pfn(virt_to_page((void *)initrd_start)), | 587 | page_to_pfn(virt_to_page((void *)initrd_start)), |
| 588 | min_low_pfn); | 588 | min_low_pfn); |
| 589 | initrd_start = 0; | 589 | initrd_start = 0; |
| @@ -662,14 +662,14 @@ static int __init_or_module do_one_initcall_debug(initcall_t fn) | |||
| 662 | unsigned long long duration; | 662 | unsigned long long duration; |
| 663 | int ret; | 663 | int ret; |
| 664 | 664 | ||
| 665 | printk(KERN_DEBUG "calling %pF @ %i\n", fn, task_pid_nr(current)); | 665 | pr_debug("calling %pF @ %i\n", fn, task_pid_nr(current)); |
| 666 | calltime = ktime_get(); | 666 | calltime = ktime_get(); |
| 667 | ret = fn(); | 667 | ret = fn(); |
| 668 | rettime = ktime_get(); | 668 | rettime = ktime_get(); |
| 669 | delta = ktime_sub(rettime, calltime); | 669 | delta = ktime_sub(rettime, calltime); |
| 670 | duration = (unsigned long long) ktime_to_ns(delta) >> 10; | 670 | duration = (unsigned long long) ktime_to_ns(delta) >> 10; |
| 671 | printk(KERN_DEBUG "initcall %pF returned %d after %lld usecs\n", fn, | 671 | pr_debug("initcall %pF returned %d after %lld usecs\n", |
| 672 | ret, duration); | 672 | fn, ret, duration); |
| 673 | 673 | ||
| 674 | return ret; | 674 | return ret; |
| 675 | } | 675 | } |
| @@ -825,8 +825,7 @@ static int __ref kernel_init(void *unused) | |||
| 825 | if (ramdisk_execute_command) { | 825 | if (ramdisk_execute_command) { |
| 826 | if (!run_init_process(ramdisk_execute_command)) | 826 | if (!run_init_process(ramdisk_execute_command)) |
| 827 | return 0; | 827 | return 0; |
| 828 | printk(KERN_ERR "Failed to execute %s\n", | 828 | pr_err("Failed to execute %s\n", ramdisk_execute_command); |
| 829 | ramdisk_execute_command); | ||
| 830 | } | 829 | } |
| 831 | 830 | ||
| 832 | /* | 831 | /* |
| @@ -838,8 +837,8 @@ static int __ref kernel_init(void *unused) | |||
| 838 | if (execute_command) { | 837 | if (execute_command) { |
| 839 | if (!run_init_process(execute_command)) | 838 | if (!run_init_process(execute_command)) |
| 840 | return 0; | 839 | return 0; |
| 841 | printk(KERN_ERR "Failed to execute %s. Attempting " | 840 | pr_err("Failed to execute %s. Attempting defaults...\n", |
| 842 | "defaults...\n", execute_command); | 841 | execute_command); |
| 843 | } | 842 | } |
| 844 | if (!run_init_process("/sbin/init") || | 843 | if (!run_init_process("/sbin/init") || |
| 845 | !run_init_process("/etc/init") || | 844 | !run_init_process("/etc/init") || |
| @@ -884,7 +883,7 @@ static noinline void __init kernel_init_freeable(void) | |||
| 884 | 883 | ||
| 885 | /* Open the /dev/console on the rootfs, this should never fail */ | 884 | /* Open the /dev/console on the rootfs, this should never fail */ |
| 886 | if (sys_open((const char __user *) "/dev/console", O_RDWR, 0) < 0) | 885 | if (sys_open((const char __user *) "/dev/console", O_RDWR, 0) < 0) |
| 887 | printk(KERN_ERR "Warning: unable to open an initial console.\n"); | 886 | pr_err("Warning: unable to open an initial console.\n"); |
| 888 | 887 | ||
| 889 | (void) sys_dup(0); | 888 | (void) sys_dup(0); |
| 890 | (void) sys_dup(0); | 889 | (void) sys_dup(0); |
