mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Richard Weinberger <richard@nod.at>
To: linux-mtd@lists.infradead.org
Cc: linux-kernel@vger.kernel.org, adrian.hunter@intel.com,
	Heinz.Egger@linutronix.de, thomas.wucher@linutronix.de,
	shmulik.ladkani@gmail.com, tglx@linutronix.de,
	tim.bird@am.sony.com, Marius.Mazarel@ugal.ro,
	artem.bityutskiy@linux.intel.com, nyoushchenko@mvista.com,
	Richard Weinberger <richard@nod.at>
Subject: [PATCH 2/7] UBI: Fastmap: Fix WARN_ON()
Date: Sat, 23 Jun 2012 15:03:17 +0200	[thread overview]
Message-ID: <1340456602-46050-3-git-send-email-richard@nod.at> (raw)
In-Reply-To: <1340456602-46050-1-git-send-email-richard@nod.at>

ubi->bad_peb_count is not jet valid, use ai->

Signed-off-by: Richard Weinberger <richard@nod.at>
---
 drivers/mtd/ubi/fastmap.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/mtd/ubi/fastmap.c b/drivers/mtd/ubi/fastmap.c
index 4793ba8..2ff0681 100644
--- a/drivers/mtd/ubi/fastmap.c
+++ b/drivers/mtd/ubi/fastmap.c
@@ -1005,7 +1005,7 @@ int ubi_scan_fastmap(struct ubi_device *ubi, struct ubi_attach_info *ai)
 	 * and we cannot fall back to scanning.
 	 */
 	if (WARN_ON(self_check_fastmap(ai) != ubi->peb_count -
-		    ubi->bad_peb_count - used_blocks)) {
+		    ai->bad_peb_count - used_blocks)) {
 		ret = UBI_BAD_FASTMAP;
 		kfree(fm);
 		goto free_hdr;
-- 
1.7.6.5


  parent reply	other threads:[~2012-06-23 13:03 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-06-23 13:03 UBI fastmap updates Richard Weinberger
2012-06-23 13:03 ` [PATCH 1/7] UBI: Fastmap: Modify the WL sub-system to prodcue a free anchor PEB Richard Weinberger
2012-06-23 13:03 ` Richard Weinberger [this message]
2012-06-23 13:03 ` [PATCH 3/7] UBI: Fastmap: Ensure that not all anchor PEBs go into a pool Richard Weinberger
2012-06-23 13:03 ` [PATCH 4/7] UBI: Fastmap: Fix ubi_assert() Richard Weinberger
2012-06-23 13:03 ` [PATCH 5/7] UBI: Fastmap: Kill max_pnum logic Richard Weinberger
2012-06-23 13:03 ` [PATCH 6/7] UBI: Fastmap: Reuse all fastmap PEB if no free PEBs are available Richard Weinberger
2012-06-23 13:03 ` [PATCH 7/7] UBI: Fastmap: Get rid of fm_pool_mutex Richard Weinberger
2012-06-27  4:20 ` UBI fastmap updates Namjae Jeon
2012-06-27  6:48   ` Nikita V. Youshchenko
2012-06-27  7:17     ` Richard Weinberger

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=1340456602-46050-3-git-send-email-richard@nod.at \
    --to=richard@nod.at \
    --cc=Heinz.Egger@linutronix.de \
    --cc=Marius.Mazarel@ugal.ro \
    --cc=adrian.hunter@intel.com \
    --cc=artem.bityutskiy@linux.intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mtd@lists.infradead.org \
    --cc=nyoushchenko@mvista.com \
    --cc=shmulik.ladkani@gmail.com \
    --cc=tglx@linutronix.de \
    --cc=thomas.wucher@linutronix.de \
    --cc=tim.bird@am.sony.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

all inboxes | Powered by JetHome®