board/svm_sc8xx/flash.c: Fix GCC 4.6 build warning
authorWolfgang Denk <wd@denx.de>
Fri, 4 Nov 2011 15:55:50 +0000 (15:55 +0000)
committerWolfgang Denk <wd@denx.de>
Mon, 7 Nov 2011 21:15:42 +0000 (22:15 +0100)
Fix:
flash.c: In function 'write_word':
flash.c:542:15: warning: variable 'last' set but not used
[-Wunused-but-set-variable]

Signed-off-by: Wolfgang Denk <wd@denx.de>
board/svm_sc8xx/flash.c

index b3893ef5f442476111a877e82b2644a1282b8653..af329b9f55da6eee0665be8e91a33c0210a04ecd 100644 (file)
@@ -539,7 +539,7 @@ int write_buff(flash_info_t *info, uchar *src, ulong addr, ulong cnt)
 static int write_word(flash_info_t *info, ulong dest, ulong data)
 {
        ulong addr = (ulong) (info->start[0]);
-       ulong start, last;
+       ulong start;
        int flag;
        ulong i;
        int data_short[2];
@@ -587,7 +587,6 @@ static int write_word(flash_info_t *info, ulong dest, ulong data)
                                enable_interrupts();
 
                        start = get_timer(0);
-                       last = start;
                        while ((my_in_8((unsigned char *)(dest + i))) !=
                               (data_ch[i])) {
                                if (get_timer(start) >
@@ -612,7 +611,6 @@ static int write_word(flash_info_t *info, ulong dest, ulong data)
                        enable_interrupts();
 
                start = get_timer(0);
-               last = start;
                while ((my_in_be16((unsigned short *)(dest + (i * 2)))) !=
                                                        (data_short[i])) {
                        if (get_timer(start) > CONFIG_SYS_FLASH_WRITE_TOUT)