From ddc94378db9fe0c9076512768b3576e0fdc580dd Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Sat, 7 Jun 2014 22:07:58 -0600 Subject: m68k: Fix warnings with gcc 4.6 Most of the warnings seem to be related to using 'int' for size_t. Change this and fix up the remaining warnings and problems. For bootm, the warning was masked by others, and there is an actual bug in the code. Signed-off-by: Simon Glass --- arch/m68k/cpu/mcf532x/cpu_init.c | 2 +- arch/m68k/include/asm/posix_types.h | 2 +- arch/m68k/lib/bootm.c | 7 ++----- 3 files changed, 4 insertions(+), 7 deletions(-) (limited to 'arch/m68k') diff --git a/arch/m68k/cpu/mcf532x/cpu_init.c b/arch/m68k/cpu/mcf532x/cpu_init.c index db7ded4782..8d01f5fcf0 100644 --- a/arch/m68k/cpu/mcf532x/cpu_init.c +++ b/arch/m68k/cpu/mcf532x/cpu_init.c @@ -208,10 +208,10 @@ void cpu_init_f(void) scm2_t *scm2 = (scm2_t *) MMAP_SCM2; gpio_t *gpio = (gpio_t *) MMAP_GPIO; fbcs_t *fbcs = (fbcs_t *) MMAP_FBCS; +#ifndef CONFIG_WATCHDOG wdog_t *wdog = (wdog_t *) MMAP_WDOG; /* watchdog is enabled by default - disable the watchdog */ -#ifndef CONFIG_WATCHDOG out_be16(&wdog->cr, 0); #endif diff --git a/arch/m68k/include/asm/posix_types.h b/arch/m68k/include/asm/posix_types.h index 4fbc0405f7..b97d267423 100644 --- a/arch/m68k/include/asm/posix_types.h +++ b/arch/m68k/include/asm/posix_types.h @@ -15,7 +15,7 @@ typedef long __kernel_off_t; typedef int __kernel_pid_t; typedef unsigned int __kernel_uid_t; typedef unsigned int __kernel_gid_t; -typedef unsigned int __kernel_size_t; +typedef unsigned long __kernel_size_t; typedef int __kernel_ssize_t; typedef long __kernel_ptrdiff_t; typedef long __kernel_time_t; diff --git a/arch/m68k/lib/bootm.c b/arch/m68k/lib/bootm.c index 804e01dae6..fa9c493081 100644 --- a/arch/m68k/lib/bootm.c +++ b/arch/m68k/lib/bootm.c @@ -50,11 +50,7 @@ void arch_lmb_reserve(struct lmb *lmb) int do_bootm_linux(int flag, int argc, char * const argv[], bootm_headers_t *images) { - ulong rd_len; - ulong initrd_start, initrd_end; int ret; - - ulong cmd_start, cmd_end; bd_t *kbd; void (*kernel) (bd_t *, ulong, ulong, ulong, ulong); struct lmb *lmb = &images->lmb; @@ -96,7 +92,8 @@ int do_bootm_linux(int flag, int argc, char * const argv[], bootm_headers_t *ima * sp+16: Start of command line string * sp+20: End of command line string */ - (*kernel) (kbd, initrd_start, initrd_end, cmd_start, cmd_end); + (*kernel)(kbd, images->initrd_start, images->initrd_end, + images->cmdline_start, images->cmdline_end); /* does not return */ error: return 1; -- cgit v1.2.1