mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Sascha Hauer <s.hauer@pengutronix.de>
To: Robert Jarzmik <robert.jarzmik@free.fr>
Cc: barebox@lists.infradead.org
Subject: Re: [PATCH V3 3/8] drivers/mtd: transfer NAND notions to MTD core
Date: Wed, 21 Dec 2011 12:25:21 +0100	[thread overview]
Message-ID: <20111221112521.GT27267@pengutronix.de> (raw)
In-Reply-To: <1324303449-30045-4-git-send-email-robert.jarzmik@free.fr>

On Mon, Dec 19, 2011 at 03:04:04PM +0100, Robert Jarzmik wrote:
> Change NAND_WRITE into MTD_WRITE.
> Change "page_shift" references in the core, which are purely
> NAND, into mtd->writesize which is MTD generic.
> Rename all "info" (struct mtd_info) into "mtd".
> 
> Beware, bisection is broken here as driver name changes from
> /dev/nand<N> into /dev/mtd<N>.

Indeed, this patch should be after the next one.

>  	ops.oobbuf = buf;
>  	ops.datbuf = NULL;
> -	ops.len = info->oobsize;
> -
> -	offset /= info->oobsize;
> -	ret = info->read_oob(info, offset << chip->page_shift, &ops);
> +	ops.len = mtd->oobsize;
> +
> +	offset /= mtd->oobsize;
> +	/*
> +	 * This seems suspicious, shouldn't it be :
> +	 *   offset / mtd->oobsize * mtd->writesize
> +	 */
> +	ret = mtd->read_oob(mtd, offset * mtd->writesize, &ops);

directly before this comment we have 'offset /= mtd->oobsize', so in fact
we really have 'offset / mtd->oobsize * mtd->writesize'.

Sascha

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

  reply	other threads:[~2011-12-21 11:25 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-12-19 14:04 [PATCH V3 0/8] mtd framework rework Robert Jarzmik
2011-12-19 14:04 ` [PATCH V3 1/8] drivers/mtd: move nand.c into core.c Robert Jarzmik
2011-12-19 14:04 ` [PATCH V3 2/8] drivers/mtd: cosmetic changes Robert Jarzmik
2011-12-21 11:00   ` Sascha Hauer
2011-12-21 21:27     ` Robert Jarzmik
2011-12-19 14:04 ` [PATCH V3 3/8] drivers/mtd: transfer NAND notions to MTD core Robert Jarzmik
2011-12-21 11:25   ` Sascha Hauer [this message]
2011-12-19 14:04 ` [PATCH V3 4/8] drivers/mtd: recover NAND default device name "nand" Robert Jarzmik
2011-12-19 14:04 ` [PATCH V3 5/8] drivers/mtd: fix core multiple MTD registrations Robert Jarzmik
2011-12-19 14:04 ` [PATCH V3 6/8] drivers/mtd: add mtd core hooks Robert Jarzmik
2011-12-19 14:04 ` [PATCH V3 7/8] drivers/mtd: split mtd mtdoob devices Robert Jarzmik
2011-12-21 11:32   ` Sascha Hauer
2011-12-21 21:28     ` Robert Jarzmik
2011-12-19 14:04 ` [PATCH V3 8/8] drivers/mtd: add the mtdraw device (data+oob) Robert Jarzmik
2011-12-21 10:59 ` [PATCH V3 0/8] mtd framework rework Sascha Hauer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20111221112521.GT27267@pengutronix.de \
    --to=s.hauer@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    --cc=robert.jarzmik@free.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox