diff options
author | Maneesh Soni <maneesh@in.ibm.com> | 2005-06-25 14:58:28 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-06-25 16:24:55 -0700 |
commit | 72414d3f1d22fc3e311b162fca95c430048d38ce (patch) | |
tree | 46850947c1602357dd3c51d8d6ebaa5805507f9f /arch/ppc | |
parent | 4f339ecb30c759f94a29992d4635d9194132b6cf (diff) | |
download | blackbird-op-linux-72414d3f1d22fc3e311b162fca95c430048d38ce.tar.gz blackbird-op-linux-72414d3f1d22fc3e311b162fca95c430048d38ce.zip |
[PATCH] kexec code cleanup
o Following patch provides purely cosmetic changes and corrects CodingStyle
guide lines related certain issues like below in kexec related files
o braces for one line "if" statements, "for" loops,
o more than 80 column wide lines,
o No space after "while", "for" and "switch" key words
o Changes:
o take-2: Removed the extra tab before "case" key words.
o take-3: Put operator at the end of line and space before "*/"
Signed-off-by: Maneesh Soni <maneesh@in.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'arch/ppc')
-rw-r--r-- | arch/ppc/kernel/machine_kexec.c | 30 |
1 files changed, 13 insertions, 17 deletions
diff --git a/arch/ppc/kernel/machine_kexec.c b/arch/ppc/kernel/machine_kexec.c index b82535357d6d..84d65a87191e 100644 --- a/arch/ppc/kernel/machine_kexec.c +++ b/arch/ppc/kernel/machine_kexec.c @@ -21,24 +21,23 @@ #include <asm/machdep.h> typedef NORET_TYPE void (*relocate_new_kernel_t)( - unsigned long indirection_page, unsigned long reboot_code_buffer, - unsigned long start_address) ATTRIB_NORET; + unsigned long indirection_page, + unsigned long reboot_code_buffer, + unsigned long start_address) ATTRIB_NORET; const extern unsigned char relocate_new_kernel[]; const extern unsigned int relocate_new_kernel_size; void machine_shutdown(void) { - if (ppc_md.machine_shutdown) { + if (ppc_md.machine_shutdown) ppc_md.machine_shutdown(); - } } void machine_crash_shutdown(struct pt_regs *regs) { - if (ppc_md.machine_crash_shutdown) { + if (ppc_md.machine_crash_shutdown) ppc_md.machine_crash_shutdown(); - } } /* @@ -48,9 +47,8 @@ void machine_crash_shutdown(struct pt_regs *regs) */ int machine_kexec_prepare(struct kimage *image) { - if (ppc_md.machine_kexec_prepare) { + if (ppc_md.machine_kexec_prepare) return ppc_md.machine_kexec_prepare(image); - } /* * Fail if platform doesn't provide its own machine_kexec_prepare * implementation. @@ -60,9 +58,8 @@ int machine_kexec_prepare(struct kimage *image) void machine_kexec_cleanup(struct kimage *image) { - if (ppc_md.machine_kexec_cleanup) { + if (ppc_md.machine_kexec_cleanup) ppc_md.machine_kexec_cleanup(image); - } } /* @@ -71,9 +68,9 @@ void machine_kexec_cleanup(struct kimage *image) */ NORET_TYPE void machine_kexec(struct kimage *image) { - if (ppc_md.machine_kexec) { + if (ppc_md.machine_kexec) ppc_md.machine_kexec(image); - } else { + else { /* * Fall back to normal restart if platform doesn't provide * its own kexec function, and user insist to kexec... @@ -83,7 +80,6 @@ NORET_TYPE void machine_kexec(struct kimage *image) for(;;); } - /* * This is a generic machine_kexec function suitable at least for * non-OpenFirmware embedded platforms. @@ -104,15 +100,15 @@ void machine_kexec_simple(struct kimage *image) /* we need both effective and real address here */ reboot_code_buffer = - (unsigned long)page_address(image->control_code_page); + (unsigned long)page_address(image->control_code_page); reboot_code_buffer_phys = virt_to_phys((void *)reboot_code_buffer); /* copy our kernel relocation code to the control code page */ - memcpy((void *)reboot_code_buffer, - relocate_new_kernel, relocate_new_kernel_size); + memcpy((void *)reboot_code_buffer, relocate_new_kernel, + relocate_new_kernel_size); flush_icache_range(reboot_code_buffer, - reboot_code_buffer + KEXEC_CONTROL_CODE_SIZE); + reboot_code_buffer + KEXEC_CONTROL_CODE_SIZE); printk(KERN_INFO "Bye!\n"); /* now call it */ |