Make NetBSD a recognized system
[fw/openocd] / src / flash / ocl / at91sam7x / samflash.c
index 6f7bf5f55f005a33d03436862183953e5b6360e5..9922da4e5fdf05cfb2ff334ea9a2fa2ee0dc7f76 100644 (file)
@@ -146,7 +146,7 @@ int flash_erase_plane(int efc_ofs)
                        if ((inr(MC_FSR + efc_ofs)&MC_LOCKE)) return FLASH_STAT_LOCKE;
 
                }
-               if ((page_num += flash_lock_pages)>flash_page_count) break;
+               if ((page_num += flash_lock_pages) > flash_page_count) break;
                lockbits>>=1;
        }
 
@@ -174,11 +174,11 @@ int flash_erase_plane(int efc_ofs)
 int flash_erase_all(void)
 {
        int result;
-       
+
        if ((result = flash_erase_plane(0)) != FLASH_STAT_OK) return result;
 
        /* the second flash controller, if any */
-       if (flash_page_count>1024) result = flash_erase_plane(0x10);
+       if (flash_page_count > 1024) result = flash_erase_plane(0x10);
 
        return result;
 }
@@ -189,7 +189,7 @@ int flash_verify(uint32 adr, unsigned int len, uint8 *src)
        unsigned char *flash_ptr;
 
        flash_ptr = (uint8 *)FLASH_AREA_ADDR + adr;
-       for ( ;len; len--) {
+       for (;len; len--) {
                if (*(flash_ptr++)!=*(src++)) return FLASH_STAT_VERIFE;
        }
        return FLASH_STAT_OK;