avr32: Fix printf() format warnings
authorHaavard Skinnemoen <haavard.skinnemoen@atmel.com>
Wed, 23 Jul 2008 08:55:15 +0000 (10:55 +0200)
committerHaavard Skinnemoen <haavard.skinnemoen@atmel.com>
Wed, 23 Jul 2008 14:15:01 +0000 (16:15 +0200)
Signed-off-by: Haavard Skinnemoen <haavard.skinnemoen@atmel.com>
board/atmel/atngw100/atngw100.c
board/atmel/atstk1000/atstk1000.c
board/atmel/atstk1000/flash.c
include/asm-avr32/sysreg.h

index f2c3e79799616ea4cb6c7be67490ae235c14e80e..4ead5336c65350a94d226a8017b9d3bf9a14de3b 100644 (file)
@@ -81,7 +81,7 @@ phys_size_t initdram(int board_type)
        unmap_physmem(sdram_base, EBI_SDRAM_SIZE);
 
        if (expected_size != actual_size)
-               printf("Warning: Only %u of %u MiB SDRAM is working\n",
+               printf("Warning: Only %lu of %lu MiB SDRAM is working\n",
                                actual_size >> 20, expected_size >> 20);
 
        return actual_size;
index 6371e2d4e3acb1f13ecb481d1d88d5eb1bba0bcf..d284fc1438adb9531d1c28222252ef905176d30d 100644 (file)
@@ -104,7 +104,7 @@ phys_size_t initdram(int board_type)
        unmap_physmem(sdram_base, EBI_SDRAM_SIZE);
 
        if (expected_size != actual_size)
-               printf("Warning: Only %u of %u MiB SDRAM is working\n",
+               printf("Warning: Only %lu of %lu MiB SDRAM is working\n",
                                actual_size >> 20, expected_size >> 20);
 
        return actual_size;
index 12537f3142ec4e1d655401c838fb5d8331cd9a52..e2bfd4aff27f79e322206b8d922bfe442497dbef 100644 (file)
@@ -70,7 +70,7 @@ unsigned long flash_init(void)
 
 void flash_print_info(flash_info_t *info)
 {
-       printf("Flash: Vendor ID: 0x%02x, Product ID: 0x%02x\n",
+       printf("Flash: Vendor ID: 0x%02lx, Product ID: 0x%02lx\n",
               info->flash_id >> 16, info->flash_id & 0xffff);
        printf("Size: %ld MB in %d sectors\n",
               info->size >> 10, info->sector_count);
index 72ad49e5e2d8d266f986f3b17bb1b52441a130a1..4f6970448b83a220f0e8fa31e623fd629cd96359 100644 (file)
         | SYSREG_BF(name,value))
 
 /* Register access macros */
-#define sysreg_read(reg)               __builtin_mfsr(SYSREG_##reg)
-#define sysreg_write(reg, value)       __builtin_mtsr(SYSREG_##reg, value)
+#define sysreg_read(reg)                               \
+       ((unsigned long)__builtin_mfsr(SYSREG_##reg))
+#define sysreg_write(reg, value)                       \
+       __builtin_mtsr(SYSREG_##reg, value)
 
 #endif /* __ASM_AVR32_SYSREG_H__ */