flash: Fix spelling of "ERR_TIMOUT"
authorMario Six <mario.six@gdsys.cc>
Fri, 26 Jan 2018 13:43:52 +0000 (14:43 +0100)
committerStefan Roese <sr@denx.de>
Mon, 29 Jan 2018 06:48:59 +0000 (07:48 +0100)
checkpatch.pl complains about the spelling of ERR_TIMOUT. Since the
error is only used in a handful of files, we rename the error to
ERR_TIMEOUT.

Signed-off-by: Mario Six <mario.six@gdsys.cc>
Signed-off-by: Stefan Roese <sr@denx.de>
board/cobra5272/flash.c
common/flash.c
drivers/mtd/cfi_flash.c
drivers/mtd/pic32_flash.c
include/flash.h

index 4fac6880f16508ffb537668253a4f9725a51fa09..ca27b49a3b7de831d228333ec4f763819ebf6bd8 100644 (file)
@@ -216,7 +216,7 @@ int flash_erase (flash_info_t * info, int s_first, int s_last)
                                goto outahere;
                        }
                        if (chip1 == TMO) {
-                               rc = ERR_TIMOUT;
+                               rc = ERR_TIMEOUT;
                                goto outahere;
                        }
 
index 587ef601585ced8c63e1cc29680cb5021c59c813..876677493f51f0e5d821193c17dacb5eedb98166 100644 (file)
@@ -112,7 +112,7 @@ addr2info (ulong addr)
  * and no protected sectors are hit.
  * Returns:
  * ERR_OK          0 - OK
- * ERR_TIMOUT      1 - write timeout
+ * ERR_TIMEOUT     1 - write timeout
  * ERR_NOT_ERASED  2 - Flash not erased
  * ERR_PROTECTED   4 - target range includes protected sectors
  * ERR_INVAL       8 - target address not in Flash memory
@@ -185,7 +185,7 @@ void flash_perror (int err)
        switch (err) {
        case ERR_OK:
                break;
-       case ERR_TIMOUT:
+       case ERR_TIMEOUT:
                puts ("Timeout writing to Flash\n");
                break;
        case ERR_NOT_ERASED:
index e94a7269e1b0e834e545da2b4e44a95c53f073fa..5ba0c5fdecbba2e7525b909e2a74e36ac718045f 100644 (file)
@@ -588,7 +588,7 @@ static int flash_status_check(flash_info_t *info, flash_sect_t sector,
                                flash_read_long(info, sector, 0));
                        flash_write_cmd(info, sector, 0, info->cmd_reset);
                        udelay(1);
-                       return ERR_TIMOUT;
+                       return ERR_TIMEOUT;
                }
                udelay(1);              /* also triggers watchdog */
        }
@@ -696,7 +696,7 @@ static int flash_status_poll(flash_info_t *info, void *src, void *dst,
                if (get_timer(start) > tout) {
                        printf("Flash %s timeout at address %lx data %lx\n",
                               prompt, (ulong)dst, (ulong)flash_read8(dst));
-                       return ERR_TIMOUT;
+                       return ERR_TIMEOUT;
                }
                udelay(1);              /* also triggers watchdog */
        }
index 8bbf2fa9a2b2b5dfaa26a37d4270c4043db2d38c..d90838786629baaf476901cdfa81c61d79c22bdf 100644 (file)
@@ -69,7 +69,7 @@ static int flash_wait_till_busy(const char *func, ulong timeout)
        int ret = wait_for_bit_le32(&nvm_regs_p->ctrl.raw,
                                    NVM_WR, false, timeout, false);
 
-       return ret ? ERR_TIMOUT : ERR_OK;
+       return ret ? ERR_TIMEOUT : ERR_OK;
 }
 
 static inline int flash_complete_operation(void)
@@ -99,7 +99,7 @@ static inline int flash_complete_operation(void)
  * Erase flash sectors, returns:
  * ERR_OK - OK
  * ERR_INVAL - invalid sector arguments
- * ERR_TIMOUT - write timeout
+ * ERR_TIMEOUT - write timeout
  * ERR_NOT_ERASED - Flash not erased
  * ERR_UNKNOWN_FLASH_VENDOR - incorrect flash
  */
@@ -217,7 +217,7 @@ static int write_word(flash_info_t *info, ulong dest, ulong word)
 /*
  * Copy memory to flash, returns:
  * ERR_OK - OK
- * ERR_TIMOUT - write timeout
+ * ERR_TIMEOUT - write timeout
  * ERR_NOT_ERASED - Flash not erased
  */
 int write_buff(flash_info_t *info, uchar *src, ulong addr, ulong cnt)
index dc67cb2df61672272f2fec51a77c3a888c0c633e..1a4e87900996d4f0a8ce3cd62a6798106bdcbff5 100644 (file)
@@ -122,7 +122,7 @@ extern int jedec_flash_match(flash_info_t *info, ulong base);
  * return codes from flash_write():
  */
 #define ERR_OK                         0
-#define ERR_TIMOUT                     1
+#define ERR_TIMEOUT                    1
 #define ERR_NOT_ERASED                 2
 #define ERR_PROTECTED                  4
 #define ERR_INVAL                      8