]> git.ipfire.org Git - people/ms/u-boot.git/commitdiff
Fix warnings from gcc-4.3.0 build on a ppc host
authorKumar Gala <galak@kernel.crashing.org>
Thu, 15 May 2008 20:13:08 +0000 (15:13 -0500)
committerWolfgang Denk <wd@denx.de>
Tue, 3 Jun 2008 17:52:52 +0000 (19:52 +0200)
* The cfi_flash.c memset fix actual allows the board to boot so there is
  a bit more going on here than just resolving warnings associated with
  uninitialized variables.

* include/asm/bitops.h:302: warning: '__swab32p' is static but used in
  inline function 'ext2_find_next_zero_bit' which is not static

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
drivers/mtd/cfi_flash.c
include/asm-ppc/bitops.h

index 68ab55f8a5fdf97aa6b3332337d8375d598750cf..d84f0fc55e23106129a066878a7ce9d428556687 100644 (file)
@@ -1720,6 +1720,8 @@ ulong flash_get_size (ulong base, int banknum)
        int erase_region_count;
        struct cfi_qry qry;
 
+       memset(&qry, 0, sizeof(qry));
+
        info->ext_addr = 0;
        info->cfi_version = 0;
 #ifdef CFG_FLASH_PROTECTION
index 3264915d89674160c5c9f008af86b3749c1c80c3..4e9c608341eb11a12a6a9ff268e34173855e4910 100644 (file)
@@ -287,7 +287,7 @@ extern __inline__ int ext2_test_bit(int nr, __const__ void * addr)
 #define ext2_find_first_zero_bit(addr, size) \
        ext2_find_next_zero_bit((addr), (size), 0)
 
-extern __inline__ unsigned long ext2_find_next_zero_bit(void *addr,
+static __inline__ unsigned long ext2_find_next_zero_bit(void *addr,
        unsigned long size, unsigned long offset)
 {
        unsigned int *p = ((unsigned int *) addr) + (offset >> 5);