[PATCH v6 2/5] mtd: cfi_cmdset_0002: Change definition naming to retry write operation

smtpuser smtpuser at allied-telesis.co.jp
Tue May 15 10:11:17 PDT 2018


From: Tokunori Ikegami <ikegami at allied-telesis.co.jp>

The definition can be used for other program and erase operations also.
So change the naming to MAX_RETRIES from MAX_WORD_RETRIES.

Signed-off-by: Tokunori Ikegami <ikegami at allied-telesis.co.jp>
Cc: Joakim Tjernlund <Joakim.Tjernlund at infinera.com>
Cc: Chris Packham <chris.packham at alliedtelesis.co.nz>
Cc: Brian Norris <computersforpeace at gmail.com>
Cc: David Woodhouse <dwmw2 at infradead.org>
Cc: Boris Brezillon <boris.brezillon at free-electrons.com>
Cc: Marek Vasut <marek.vasut at gmail.com>
Cc: Richard Weinberger <richard at nod.at>
Cc: Cyrille Pitchen <cyrille.pitchen at wedev4u.fr>
Cc: linux-mtd at lists.infradead.org
---
Changes since v5:
- No change for this patch.

Changes since v4:
- No change for this patch.

Changes since v3:
- The patch series are just rebased since the coding style fix has been applied.

Changes since v2:
- Change the definition naming to MAX_RETRIES from MAX_WRITE_RETRIES.

Changes since v1:
- Just split the change from the v1 patch.

 drivers/mtd/chips/cfi_cmdset_0002.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/mtd/chips/cfi_cmdset_0002.c b/drivers/mtd/chips/cfi_cmdset_0002.c
index 1d6be8c63d39..0b67f90415fd 100644
--- a/drivers/mtd/chips/cfi_cmdset_0002.c
+++ b/drivers/mtd/chips/cfi_cmdset_0002.c
@@ -42,7 +42,7 @@
 #define AMD_BOOTLOC_BUG
 #define FORCE_WORD_WRITE 0
 
-#define MAX_WORD_RETRIES 3
+#define MAX_RETRIES 3
 
 #define SST49LF004B		0x0060
 #define SST49LF040B		0x0050
@@ -1646,7 +1646,7 @@ static int __xipram do_write_oneword(struct map_info *map, struct flchip *chip,
 		map_write(map, CMD(0xF0), chip->start);
 		/* FIXME - should have reset delay before continuing */
 
-		if (++retry_cnt <= MAX_WORD_RETRIES)
+		if (++retry_cnt <= MAX_RETRIES)
 			goto retry;
 
 		ret = -EIO;
@@ -2105,7 +2105,7 @@ static int do_panic_write_oneword(struct map_info *map, struct flchip *chip,
 		map_write(map, CMD(0xF0), chip->start);
 		/* FIXME - should have reset delay before continuing */
 
-		if (++retry_cnt <= MAX_WORD_RETRIES)
+		if (++retry_cnt <= MAX_RETRIES)
 			goto retry;
 
 		ret = -EIO;
-- 
2.16.1




More information about the linux-mtd mailing list