public inbox for linux-mtd@lists.infradead.org
 help / color / mirror / Atom feed
From: "Jörn Engel" <joern@logfs.org>
To: Alexey Korolev <akorolev@infradead.org>
Cc: linux-mtd@lists.infradead.org, tglx@linutronix.de,
	dwmw2@infradead.org, vasiliy.leonenko@gmail.com
Subject: Re: [RFC/PATCH 1/3] NAND multiple plane feature
Date: Tue, 3 Jun 2008 19:25:56 +0200	[thread overview]
Message-ID: <20080603172556.GB1224@logfs.org> (raw)
In-Reply-To: <alpine.LFD.1.10.0805281332280.23606@pentafluge.infradead.org>

On Wed, 28 May 2008 13:41:46 +0100, Alexey Korolev wrote:
> diff -Nurp linux-2.6.24.3/drivers/mtd/nand/nand_base.c linux-2.6.24.3-dp/drivers/mtd/nand/nand_base.c
> --- linux-2.6.24.3/drivers/mtd/nand/nand_base.c	2008-02-26 03:20:20.000000000 +0300
> +++ linux-2.6.24.3-dp/drivers/mtd/nand/nand_base.c	2008-05-28 02:06:01.000000000 +0400
> @@ -2259,10 +2367,15 @@ static struct nand_flash_dev *nand_get_f
>  	/* Newer devices have all the information in additional id bytes */
>  	if (!type->pagesize) {
>  		int extid;
> +		int planeid;
>  		/* The 3rd id byte holds MLC / multichip data */
>  		chip->cellinfo = chip->read_byte(mtd);
>  		/* The 4th id byte is the important one */
>  		extid = chip->read_byte(mtd);
> +		/* The 5th id byte contains number of planes */
> +		planeid = chip->read_byte(mtd);
> +		/* Number of planes*/

This comment seems redundant.  And it fooled me for a few seconds.
Remove it?

> +		chip->numplanes = 1 << ((planeid >> 2) & 0x03);
>  		/* Calc pagesize */
>  		mtd->writesize = 1024 << (extid & 0x3);
>  		extid >>= 2;

Jörn

-- 
Fools ignore complexity.  Pragmatists suffer it.
Some can avoid it.  Geniuses remove it.
-- Perlis's Programming Proverb #58, SIGPLAN Notices, Sept.  1982

  reply	other threads:[~2008-06-03 17:26 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-05-28 12:41 [RFC/PATCH 1/3] NAND multiple plane feature Alexey Korolev
2008-06-03 17:25 ` Jörn Engel [this message]
2008-06-05 16:24   ` Alexey Korolev

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=20080603172556.GB1224@logfs.org \
    --to=joern@logfs.org \
    --cc=akorolev@infradead.org \
    --cc=dwmw2@infradead.org \
    --cc=linux-mtd@lists.infradead.org \
    --cc=tglx@linutronix.de \
    --cc=vasiliy.leonenko@gmail.com \
    /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