Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e1bebcf4 authored by Fabian Frederick's avatar Fabian Frederick Committed by Linus Torvalds
Browse files

kernel/kexec.c: convert printk to pr_foo()



+ some pr_warning -> pr_warn and checkpatch warning fixes

Signed-off-by: default avatarFabian Frederick <fabf@skynet.be>
Cc: Eric Biederman <ebiederm@xmission.com>
Cc: Vivek Goyal <vgoyal@redhat.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent f06e5153
Loading
Loading
Loading
Loading
+32 −37
Original line number Diff line number Diff line
@@ -257,13 +257,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_free;
	}

	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_free;
	}

@@ -332,7 +332,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_free;
	}

@@ -650,8 +650,7 @@ static void kimage_free(struct kimage *image)
			 * done with it.
			 */
			ind = entry;
		}
		else if (entry & IND_SOURCE)
		} else if (entry & IND_SOURCE)
			kimage_free_entry(entry);
	}
	/* Free the final indirection page */
@@ -774,8 +773,7 @@ static struct page *kimage_alloc_page(struct kimage *image,
			addr = old_addr;
			page = old_page;
			break;
		}
		else {
		} else {
			/* Place the page on the destination list I
			 * will use it later.
			 */
@@ -1230,8 +1228,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_warn("Kexec: Memory allocation for saving cpu register states failed\n");
		return -ENOMEM;
	}
	return 0;
@@ -1267,12 +1264,12 @@ static int __init parse_crashkernel_mem(char *cmdline,
		/* get the start of the range */
		start = memparse(cur, &tmp);
		if (cur == tmp) {
			pr_warning("crashkernel: Memory value expected\n");
			pr_warn("crashkernel: Memory value expected\n");
			return -EINVAL;
		}
		cur = tmp;
		if (*cur != '-') {
			pr_warning("crashkernel: '-' expected\n");
			pr_warn("crashkernel: '-' expected\n");
			return -EINVAL;
		}
		cur++;
@@ -1281,31 +1278,30 @@ 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_warn("crashkernel: Memory value expected\n");
				return -EINVAL;
			}
			cur = tmp;
			if (end <= start) {
				pr_warning("crashkernel: end <= start\n");
				pr_warn("crashkernel: end <= start\n");
				return -EINVAL;
			}
		}

		if (*cur != ':') {
			pr_warning("crashkernel: ':' expected\n");
			pr_warn("crashkernel: ':' expected\n");
			return -EINVAL;
		}
		cur++;

		size = memparse(cur, &tmp);
		if (cur == tmp) {
			pr_warning("Memory value expected\n");
			pr_warn("Memory value expected\n");
			return -EINVAL;
		}
		cur = tmp;
		if (size >= system_ram) {
			pr_warning("crashkernel: invalid size\n");
			pr_warn("crashkernel: invalid size\n");
			return -EINVAL;
		}

@@ -1323,8 +1319,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_warn("Memory value expected after '@'\n");
				return -EINVAL;
			}
		}
@@ -1348,14 +1343,14 @@ static int __init parse_crashkernel_simple(char *cmdline,

	*crash_size = memparse(cmdline, &cur);
	if (cmdline == cur) {
		pr_warning("crashkernel: memory value expected\n");
		pr_warn("crashkernel: memory value expected\n");
		return -EINVAL;
	}

	if (*cur == '@')
		*crash_base = memparse(cur+1, &cur);
	else if (*cur != ' ' && *cur != '\0') {
		pr_warning("crashkernel: unrecognized char\n");
		pr_warn("crashkernel: unrecognized char\n");
		return -EINVAL;
	}

@@ -1691,7 +1686,7 @@ int kernel_kexec(void)
		 * CPU hotplug again; so re-enable it here.
		 */
		cpu_hotplug_enable();
		printk(KERN_EMERG "Starting new kernel\n");
		pr_emerg("Starting new kernel\n");
		machine_shutdown();
	}