Commit 49adbe81 authored by Anatolij Gustschin's avatar Anatolij Gustschin Committed by Wolfgang Denk
Browse files

board/cm41xx/flash.c: Fix GCC 4.6 warnings



Fix:
flash.c: In function 'flash_erase':
flash.c:209:6: warning: variable 'flag' set but not used
[-Wunused-but-set-variable]
flash.c: In function 'write_data':
flash.c:373:6: warning: variable 'flag' set but not used
[-Wunused-but-set-variable]

Signed-off-by: default avatarAnatolij Gustschin <agust@denx.de>
parent da540665
...@@ -206,7 +206,7 @@ static ulong flash_get_size (unsigned char * addr, flash_info_t * info) ...@@ -206,7 +206,7 @@ static ulong flash_get_size (unsigned char * addr, flash_info_t * info)
int flash_erase (flash_info_t * info, int s_first, int s_last) int flash_erase (flash_info_t * info, int s_first, int s_last)
{ {
int flag, prot, sect; int prot, sect;
ulong type; ulong type;
int rcode = 0; int rcode = 0;
ulong start; ulong start;
...@@ -240,7 +240,7 @@ int flash_erase (flash_info_t * info, int s_first, int s_last) ...@@ -240,7 +240,7 @@ int flash_erase (flash_info_t * info, int s_first, int s_last)
printf ("\n"); printf ("\n");
/* Disable interrupts which might cause a timeout here */ /* Disable interrupts which might cause a timeout here */
flag = disable_interrupts (); disable_interrupts();
/* Start erase on unprotected sectors */ /* Start erase on unprotected sectors */
for (sect = s_first; sect <= s_last; sect++) { for (sect = s_first; sect <= s_last; sect++) {
...@@ -370,7 +370,6 @@ static int write_data (flash_info_t * info, ulong dest, unsigned char data) ...@@ -370,7 +370,6 @@ static int write_data (flash_info_t * info, ulong dest, unsigned char data)
{ {
volatile unsigned char *addr = (volatile unsigned char *) dest; volatile unsigned char *addr = (volatile unsigned char *) dest;
ulong status; ulong status;
int flag;
ulong start; ulong start;
/* Check if Flash is (sufficiently) erased */ /* Check if Flash is (sufficiently) erased */
...@@ -380,7 +379,7 @@ static int write_data (flash_info_t * info, ulong dest, unsigned char data) ...@@ -380,7 +379,7 @@ static int write_data (flash_info_t * info, ulong dest, unsigned char data)
return (2); return (2);
} }
/* Disable interrupts which might cause a timeout here */ /* Disable interrupts which might cause a timeout here */
flag = disable_interrupts (); disable_interrupts();
*addr = 0x40; /* write setup */ *addr = 0x40; /* write setup */
*addr = data; *addr = data;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment