Patchwork [3/3] mtd: nand: gpmi: [FIXME] need to use {read, write}_oob_raw

login
register
mail settings
Submitter Brian Norris
Date May 11, 2012, 8:30 p.m.
Message ID <1336768235-12658-3-git-send-email-computersforpeace@gmail.com>
Download mbox | patch
Permalink /patch/158590/
State New
Headers show

Comments

Brian Norris - May 11, 2012, 8:30 p.m.
This patch is simply an added warning in the comments. Ideally, this patch
need not be merged, but rather, a developer will write a proper solution
that can use the ecc.read_oob_raw and ecc.write_oob_raw interfaces.

Signed-off-by: Brian Norris <computersforpeace@gmail.com>
Cc: Huang Shijie <b32955@freescale.com>
---
 drivers/mtd/nand/gpmi-nand/gpmi-nand.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
Huang Shijie - May 14, 2012, 2:48 a.m.
Hi Brian :
> This patch is simply an added warning in the comments. Ideally, this patch
> need not be merged, but rather, a developer will write a proper solution
> that can use the ecc.read_oob_raw and ecc.write_oob_raw interfaces.
>
> Signed-off-by: Brian Norris <computersforpeace@gmail.com>
> Cc: Huang Shijie <b32955@freescale.com>
> ---
>  drivers/mtd/nand/gpmi-nand/gpmi-nand.c |    3 +++
>  1 files changed, 3 insertions(+), 0 deletions(-)
>
> diff --git a/drivers/mtd/nand/gpmi-nand/gpmi-nand.c b/drivers/mtd/nand/gpmi-nand/gpmi-nand.c
> index 8250f63..033bd7a 100644
> --- a/drivers/mtd/nand/gpmi-nand/gpmi-nand.c
> +++ b/drivers/mtd/nand/gpmi-nand/gpmi-nand.c
> @@ -1054,6 +1054,9 @@ exit_auxiliary:
>   * ECC-based or raw view of the page is implicit in which function it calls
>   * (there is a similar pair of ECC-based/raw functions for writing).
>   *
> + * FIXME: The following paragraph is incorrect, now that there exist
> + * ecc.read_oob_raw and ecc.write_oob_raw functions.
I think you can just remove the following paragraph(it's out of date now).

Best Regards
Huang Shijie
> + *
>   * Since MTD assumes the OOB is not covered by ECC, there is no pair of
>   * ECC-based/raw functions for reading or or writing the OOB. The fact that the
>   * caller wants an ECC-based or raw view of the page is not propagated down to
Artem Bityutskiy - May 15, 2012, 7:59 a.m.
On Mon, 2012-05-14 at 10:48 +0800, Huang Shijie wrote:
> Hi Brian :
> > This patch is simply an added warning in the comments. Ideally, this patch
> > need not be merged, but rather, a developer will write a proper solution
> > that can use the ecc.read_oob_raw and ecc.write_oob_raw interfaces.
> >
> > Signed-off-by: Brian Norris <computersforpeace@gmail.com>
> > Cc: Huang Shijie <b32955@freescale.com>
> > ---
> >  drivers/mtd/nand/gpmi-nand/gpmi-nand.c |    3 +++
> >  1 files changed, 3 insertions(+), 0 deletions(-)
> >
> > diff --git a/drivers/mtd/nand/gpmi-nand/gpmi-nand.c b/drivers/mtd/nand/gpmi-nand/gpmi-nand.c
> > index 8250f63..033bd7a 100644
> > --- a/drivers/mtd/nand/gpmi-nand/gpmi-nand.c
> > +++ b/drivers/mtd/nand/gpmi-nand/gpmi-nand.c
> > @@ -1054,6 +1054,9 @@ exit_auxiliary:
> >   * ECC-based or raw view of the page is implicit in which function it calls
> >   * (there is a similar pair of ECC-based/raw functions for writing).
> >   *
> > + * FIXME: The following paragraph is incorrect, now that there exist
> > + * ecc.read_oob_raw and ecc.write_oob_raw functions.
> I think you can just remove the following paragraph(it's out of date now).

I've pushed Brian's patch to l2-mtd.git - it is OK in this form and I
think it is better if someone who takes care of gpmi fixes-up the
comments properly instead.

Patch

diff --git a/drivers/mtd/nand/gpmi-nand/gpmi-nand.c b/drivers/mtd/nand/gpmi-nand/gpmi-nand.c
index 8250f63..033bd7a 100644
--- a/drivers/mtd/nand/gpmi-nand/gpmi-nand.c
+++ b/drivers/mtd/nand/gpmi-nand/gpmi-nand.c
@@ -1054,6 +1054,9 @@  exit_auxiliary:
  * ECC-based or raw view of the page is implicit in which function it calls
  * (there is a similar pair of ECC-based/raw functions for writing).
  *
+ * FIXME: The following paragraph is incorrect, now that there exist
+ * ecc.read_oob_raw and ecc.write_oob_raw functions.
+ *
  * Since MTD assumes the OOB is not covered by ECC, there is no pair of
  * ECC-based/raw functions for reading or or writing the OOB. The fact that the
  * caller wants an ECC-based or raw view of the page is not propagated down to