All of lore.kernel.org
 help / color / mirror / Atom feed
From: Artem Bityutskiy <dedekind1@gmail.com>
To: Brian Norris <norris@broadcom.com>
Cc: linux-mtd@lists.infradead.org
Subject: Re: [PATCH 2] mtd/nand, BB detect: factory marker in page 1, 2, last and byte 1 or 6
Date: Tue, 13 Jul 2010 11:21:32 +0300	[thread overview]
Message-ID: <1279009292.30765.10.camel@localhost> (raw)
In-Reply-To: <1277501791-3146-1-git-send-email-norris@broadcom.com>

On Fri, 2010-06-25 at 14:36 -0700, Brian Norris wrote:
> @@ -2920,9 +2920,13 @@ static struct nand_flash_dev *nand_get_flash_type(struct mtd_info *mtd,
>  		chip->chip_shift = ffs((unsigned)(chip->chipsize >> 32)) + 32 - 1;
>  
>  	/* Set the bad block position */
> -	chip->badblockpos = mtd->writesize > 512 ?
> -		NAND_LARGE_BADBLOCK_POS : NAND_SMALL_BADBLOCK_POS;
> -	chip->badblockbits = 8;
> +	chip->badblockpos = (!(busw & NAND_BUSWIDTH_16) &&
> +			(*maf_id == NAND_MFR_STMICRO ||
> +			 (*maf_id == NAND_MFR_SAMSUNG &&
> +			  mtd->writesize == 512) ||
> +			 *maf_id == NAND_MFR_AMD))
> +		? NAND_SMALL_BADBLOCK_POS : NAND_LARGE_BADBLOCK_POS;

I'd prefer if () else, ? : is not appropriate for such huge conditions.

Nevertheless, you patch looks indeed like a step in the right direction,
but I cannot really test it and do not have time to review.

But could you please re-send it without trailing white-spaces - I'll put
it to my l2 tree then? You can do a 'git am' to your own patches - it'll
check for trailing white-spaces for you.

-- 
Best Regards,
Artem Bityutskiy (Артём Битюцкий)

  reply	other threads:[~2010-07-13  8:26 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-06-23 20:36 [PATCH] mtd/nand: Edit macro flag for BBT scan of last page in block Brian Norris
2010-06-25 21:36 ` [PATCH 2] mtd/nand, BB detect: factory marker in page 1, 2, last and byte 1 or 6 Brian Norris
2010-07-13  8:21   ` Artem Bityutskiy [this message]
2010-07-13 22:12     ` [PATCH v2 0/2] Improved BB Scanning Brian Norris
2010-07-13 22:13       ` [PATCH v2 1/2] mtd/nand, BB detect: factory marker in page 1, 2, last and byte 1 or 6 Brian Norris
2010-07-13 22:13       ` [PATCH v2 2/2] mtd/nand: More BB Detection, dynamic scan options Brian Norris
2010-07-13 23:56         ` Brian Norris
2010-07-15 19:15           ` [PATCH v3 " Brian Norris
2010-07-18 16:38       ` [PATCH v2 0/2] Improved BB Scanning Artem Bityutskiy
2010-07-19 19:32         ` Brian Norris
2010-07-21  9:49           ` Artem Bityutskiy
2010-07-22 19:44             ` Karl Beldan
2010-07-21 23:53       ` [PATCH] mtd/nand: Update nand_default_block_markbad() Brian Norris
2010-07-26  4:30         ` Artem Bityutskiy
2010-07-08  9:15 ` [PATCH] mtd/nand: Edit macro flag for BBT scan of last page in block Artem Bityutskiy
2010-07-13  8:01 ` Artem Bityutskiy

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=1279009292.30765.10.camel@localhost \
    --to=dedekind1@gmail.com \
    --cc=linux-mtd@lists.infradead.org \
    --cc=norris@broadcom.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 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.