public inbox for linux-mtd@lists.infradead.org
 help / color / mirror / Atom feed
* [PATCH] mtd: cfi_cmdset_0002: Change definition naming to retry write operation
@ 2018-05-08 15:58 IKEGAMI Tokunori
  2018-05-08 17:03 ` Boris Brezillon
  0 siblings, 1 reply; 3+ messages in thread
From: IKEGAMI Tokunori @ 2018-05-08 15:58 UTC (permalink / raw)
  To: Boris Brezillon
  Cc: Brian Norris, Boris Brezillon, Richard Weinberger, Marek Vasut,
	PACKHAM Chris, linux-mtd@lists.infradead.org, Cyrille Pitchen,
	David Woodhouse

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

The definition can be used for other write operations also.
So change the naming to MAX_WRITE_RETRIES from MAX_WORD_RETRIES.

Signed-off-by: Tokunori Ikegami <ikegami@allied-telesis.co.jp>
Cc: Chris Packham <chris.packham@alliedtelesis.co.nz>
Cc: Brian Norris <computersforpeace@gmail.com>
Cc: David Woodhouse <dwmw2@infradead.org>
Cc: Boris Brezillon <boris.brezillon@free-electrons.com>
Cc: Marek Vasut <marek.vasut@gmail.com>
Cc: Richard Weinberger <richard@nod.at>
Cc: Cyrille Pitchen <cyrille.pitchen@wedev4u.fr>
Cc: linux-mtd@lists.infradead.org
---
 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 56aa6b75213d..28b07336bda3 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_WRITE_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_WRITE_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_WRITE_RETRIES)
 			goto retry;
 
 		ret = -EIO;
-- 
2.16.1

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2018-05-08 17:16 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-05-08 15:58 [PATCH] mtd: cfi_cmdset_0002: Change definition naming to retry write operation IKEGAMI Tokunori
2018-05-08 17:03 ` Boris Brezillon
2018-05-08 17:09   ` IKEGAMI Tokunori

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox