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: Anatolij Gustschin <agust@denx.de>
int flash_erase (flash_info_t * info, int s_first, int s_last)
{
- int flag, prot, sect;
+ int prot, sect;
ulong type;
int rcode = 0;
ulong start;
printf ("\n");
/* Disable interrupts which might cause a timeout here */
- flag = disable_interrupts ();
+ disable_interrupts();
/* Start erase on unprotected sectors */
for (sect = s_first; sect <= s_last; sect++) {
{
volatile unsigned char *addr = (volatile unsigned char *) dest;
ulong status;
- int flag;
ulong start;
/* Check if Flash is (sufficiently) erased */
return (2);
}
/* Disable interrupts which might cause a timeout here */
- flag = disable_interrupts ();
+ disable_interrupts();
*addr = 0x40; /* write setup */
*addr = data;