Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=1065932fcb73ca188a497d8853a1a00422ce6c62
Commit:     1065932fcb73ca188a497d8853a1a00422ce6c62
Parent:     ff32b062ea6d16a1c53d57da0ac9419c9d015534
Author:     Ralf Baechle <[EMAIL PROTECTED]>
AuthorDate: Tue Jul 31 15:16:32 2007 +0100
Committer:  Ralf Baechle <[EMAIL PROTECTED]>
CommitDate: Tue Jul 31 21:35:35 2007 +0100

    [MIPS] Kexec: Fix several warnings.
    
    arch/mips/kernel/machine_kexec.c: In function 'machine_kexec':
    arch/mips/kernel/machine_kexec.c:54: warning: assignment makes integer from 
pointer without a cast
    arch/mips/kernel/machine_kexec.c:70: warning: assignment makes integer from 
pointer without a cast
    arch/mips/kernel/machine_kexec.c:81: warning: format '%08x' expects type 
'unsigned int', but argument 2 has type 'long unsigned int'
    
    Signed-off-by: Ralf Baechle <[EMAIL PROTECTED]>
---
 arch/mips/kernel/machine_kexec.c |   13 ++++++++-----
 1 files changed, 8 insertions(+), 5 deletions(-)

diff --git a/arch/mips/kernel/machine_kexec.c b/arch/mips/kernel/machine_kexec.c
index 8f42fa8..22960d6 100644
--- a/arch/mips/kernel/machine_kexec.c
+++ b/arch/mips/kernel/machine_kexec.c
@@ -14,7 +14,7 @@
 #include <asm/page.h>
 
 extern const unsigned char relocate_new_kernel[];
-extern const unsigned int relocate_new_kernel_size;
+extern const size_t relocate_new_kernel_size;
 
 extern unsigned long kexec_start_address;
 extern unsigned long kexec_indirection_page;
@@ -40,6 +40,8 @@ machine_crash_shutdown(struct pt_regs *regs)
 {
 }
 
+typedef void (*noretfun_t)(void) __attribute__((noreturn));
+
 void
 machine_kexec(struct kimage *image)
 {
@@ -51,7 +53,8 @@ machine_kexec(struct kimage *image)
          (unsigned long)page_address(image->control_code_page);
 
        kexec_start_address = image->start;
-       kexec_indirection_page = phys_to_virt(image->head & PAGE_MASK);
+       kexec_indirection_page =
+               (unsigned long) phys_to_virt(image->head & PAGE_MASK);
 
        memcpy((void*)reboot_code_buffer, relocate_new_kernel,
               relocate_new_kernel_size);
@@ -67,7 +70,7 @@ machine_kexec(struct kimage *image)
               phys_to_virt(entry & PAGE_MASK) : ptr + 1) {
                if (*ptr & IND_SOURCE || *ptr & IND_INDIRECTION ||
                    *ptr & IND_DESTINATION)
-                       *ptr = phys_to_virt(*ptr);
+                       *ptr = (unsigned long) phys_to_virt(*ptr);
        }
 
        /*
@@ -78,8 +81,8 @@ machine_kexec(struct kimage *image)
        flush_icache_range(reboot_code_buffer,
                           reboot_code_buffer + KEXEC_CONTROL_CODE_SIZE);
 
-       printk("Will call new kernel at %08x\n", image->start);
+       printk("Will call new kernel at %08lx\n", image->start);
        printk("Bye ...\n");
        flush_cache_all();
-       ((void (*)(void))reboot_code_buffer)();
+       ((noretfun_t) reboot_code_buffer)();
 }
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to