All of lore.kernel.org
 help / color / mirror / Atom feed
* mtd: remove duplicate assignment of chip->state
@ 2011-05-19  7:17 Tadashi Abe
  2011-05-19 16:35 ` Joakim Tjernlund
  0 siblings, 1 reply; 2+ messages in thread
From: Tadashi Abe @ 2011-05-19  7:17 UTC (permalink / raw)
  To: linux-mtd, dwmw2; +Cc: Tadashi Abe

This is a trivial patch which removes unnecessary assignment of chip->state
in put_chip(). It's duplicated.

Signed-off-by: Tadashi Abe <tabe@mvista.com>

---
 drivers/mtd/chips/cfi_cmdset_0001.c |    1 -
 drivers/mtd/chips/cfi_cmdset_0002.c |    1 -
 drivers/mtd/lpddr/lpddr_cmds.c      |    1 -
 3 files changed, 0 insertions(+), 3 deletions(-)

diff --git a/drivers/mtd/chips/cfi_cmdset_0001.c b/drivers/mtd/chips/cfi_cmdset_0001.c
index 09cb7c8..308709a 100644
--- a/drivers/mtd/chips/cfi_cmdset_0001.c
+++ b/drivers/mtd/chips/cfi_cmdset_0001.c
@@ -997,7 +997,6 @@ static void put_chip(struct map_info *map, struct flchip *chip, unsigned long ad
 
 	switch(chip->oldstate) {
 	case FL_ERASING:
-		chip->state = chip->oldstate;
 		/* What if one interleaved chip has finished and the
 		   other hasn't? The old code would leave the finished
 		   one in READY mode. That's bad, and caused -EROFS
diff --git a/drivers/mtd/chips/cfi_cmdset_0002.c b/drivers/mtd/chips/cfi_cmdset_0002.c
index 0b49266..6d55281 100644
--- a/drivers/mtd/chips/cfi_cmdset_0002.c
+++ b/drivers/mtd/chips/cfi_cmdset_0002.c
@@ -762,7 +762,6 @@ static void put_chip(struct map_info *map, struct flchip *chip, unsigned long ad
 
 	switch(chip->oldstate) {
 	case FL_ERASING:
-		chip->state = chip->oldstate;
 		map_write(map, cfi->sector_erase_cmd, chip->in_progress_block_addr);
 		chip->oldstate = FL_READY;
 		chip->state = FL_ERASING;
diff --git a/drivers/mtd/lpddr/lpddr_cmds.c b/drivers/mtd/lpddr/lpddr_cmds.c
index 1267992..c8f79c7 100644
--- a/drivers/mtd/lpddr/lpddr_cmds.c
+++ b/drivers/mtd/lpddr/lpddr_cmds.c
@@ -383,7 +383,6 @@ static void put_chip(struct map_info *map, struct flchip *chip)
 
 	switch (chip->oldstate) {
 	case FL_ERASING:
-		chip->state = chip->oldstate;
 		map_write(map, CMD(LPDDR_RESUME),
 				map->pfow_base + PFOW_COMMAND_CODE);
 		map_write(map, CMD(LPDDR_START_EXECUTION),
-- 
1.7.4.4

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

* Re: mtd: remove duplicate assignment of chip->state
  2011-05-19  7:17 mtd: remove duplicate assignment of chip->state Tadashi Abe
@ 2011-05-19 16:35 ` Joakim Tjernlund
  0 siblings, 0 replies; 2+ messages in thread
From: Joakim Tjernlund @ 2011-05-19 16:35 UTC (permalink / raw)
  To: Tadashi Abe; +Cc: linux-mtd, dwmw2

> From: Tadashi Abe <tabe@mvista.com>
>
> This is a trivial patch which removes unnecessary assignment of chip->state
> in put_chip(). It's duplicated.
>
> Signed-off-by: Tadashi Abe <tabe@mvista.com>

Looks good for cfi_cmdset_0001.c:

Acked-by: Joakim Tjernlund <joakim.tjernlund@transmode.se>

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

end of thread, other threads:[~2011-05-19 16:35 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-05-19  7:17 mtd: remove duplicate assignment of chip->state Tadashi Abe
2011-05-19 16:35 ` Joakim Tjernlund

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.