public inbox for linux-mtd@lists.infradead.org
 help / color / mirror / Atom feed
* [PATCH] NAND: fix nand_write_oob_std return value
@ 2006-06-21 11:36 Alexander Belyakov
  2006-06-21 11:43 ` Thomas Gleixner
  2006-06-21 12:03 ` Vitaly Wool
  0 siblings, 2 replies; 3+ messages in thread
From: Alexander Belyakov @ 2006-06-21 11:36 UTC (permalink / raw)
  To: Linux MTD mailing list; +Cc: Thomas Gleixner

It seems nand_write_oob_std should not return just status value

Signed-off-by: Alexander Belyakov <alexander.belyakov@intel.com>

diff --git a/drivers/mtd/nand/nand_base.c b/drivers/mtd/nand/nand_base.c
index 27083ed..79eae5d 100644
--- a/drivers/mtd/nand/nand_base.c
+++ b/drivers/mtd/nand/nand_base.c
@@ -1176,7 +1176,7 @@ static int nand_write_oob_std(struct mtd

 	status = chip->waitfunc(mtd, chip);

-	return status;
+	return status & NAND_STATUS_FAIL ? -EIO : 0;
 }

 /**

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

* Re: [PATCH] NAND: fix nand_write_oob_std return value
  2006-06-21 11:36 [PATCH] NAND: fix nand_write_oob_std return value Alexander Belyakov
@ 2006-06-21 11:43 ` Thomas Gleixner
  2006-06-21 12:03 ` Vitaly Wool
  1 sibling, 0 replies; 3+ messages in thread
From: Thomas Gleixner @ 2006-06-21 11:43 UTC (permalink / raw)
  To: Alexander Belyakov; +Cc: Linux MTD mailing list

On Wed, 2006-06-21 at 15:36 +0400, Alexander Belyakov wrote:
> It seems nand_write_oob_std should not return just status value
> 
> Signed-off-by: Alexander Belyakov <alexander.belyakov@intel.com>
> 
> diff --git a/drivers/mtd/nand/nand_base.c b/drivers/mtd/nand/nand_base.c
> index 27083ed..79eae5d 100644
> --- a/drivers/mtd/nand/nand_base.c
> +++ b/drivers/mtd/nand/nand_base.c
> @@ -1176,7 +1176,7 @@ static int nand_write_oob_std(struct mtd
> 
>  	status = chip->waitfunc(mtd, chip);
> 
> -	return status;
> +	return status & NAND_STATUS_FAIL ? -EIO : 0;
>  }

You are the second one to notice. Already fixed.

Thanks anyway,

	tglx


	

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

* Re: [PATCH] NAND: fix nand_write_oob_std return value
  2006-06-21 11:36 [PATCH] NAND: fix nand_write_oob_std return value Alexander Belyakov
  2006-06-21 11:43 ` Thomas Gleixner
@ 2006-06-21 12:03 ` Vitaly Wool
  1 sibling, 0 replies; 3+ messages in thread
From: Vitaly Wool @ 2006-06-21 12:03 UTC (permalink / raw)
  To: Alexander Belyakov; +Cc: Thomas Gleixner, Linux MTD mailing list

Alexander, Thomas,

Alexander Belyakov wrote:
> It seems nand_write_oob_std should not return just status value
>   
can't help myself noticing that that fix already was in my last patch 
sent to Thomas (I think however that I didn't CC the list). :-)

Vitaly

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

end of thread, other threads:[~2006-06-21 12:02 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-06-21 11:36 [PATCH] NAND: fix nand_write_oob_std return value Alexander Belyakov
2006-06-21 11:43 ` Thomas Gleixner
2006-06-21 12:03 ` Vitaly Wool

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