public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Richard Weinberger <richard@nod.at>
To: u-boot@lists.denx.de
Subject: [U-Boot] [patch 2/2] spl: Lightweight UBI and UBI fastmap support
Date: Tue, 30 Sep 2014 00:21:16 +0200	[thread overview]
Message-ID: <5429DB5C.3010306@nod.at> (raw)
In-Reply-To: <20140705094729.982129666@linutronix.de>

Am 05.07.2014 11:48, schrieb Thomas Gleixner:
> +/**
> + * ubi_calc_fm_size - calculates the fastmap size in bytes for an UBI device.
> + * @ubi: UBI device description object
> + */
> +static size_t ubi_calc_fm_size(struct ubi_scan_info *ubi)
> +{
> +	size_t size;
> +
> +	size = sizeof(struct ubi_fm_hdr) + \
> +		sizeof(struct ubi_fm_scan_pool) + \
> +		sizeof(struct ubi_fm_scan_pool) + \
> +		(ubi->peb_count * sizeof(struct ubi_fm_ec)) + \
> +		(sizeof(struct ubi_fm_eba) + \
> +		(ubi->peb_count * sizeof(__be32))) + \
> +		sizeof(struct ubi_fm_volhdr) * UBI_MAX_VOLUMES;
> +	return roundup(size, ubi->leb_size);
> +}

The size calculation misses sizeof(struct ubi_fm_sb).
I've found this issue while working on Linux fastmap support.

Thanks,
//richard

  parent reply	other threads:[~2014-09-29 22:21 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-07-05  9:48 [U-Boot] [patch 0/2] SPL: Lightweight UBI and UBI fastmap support Thomas Gleixner
2014-07-05  9:48 ` [U-Boot] [patch 1/2] nand_spl_simple: Add a simple flash read function Thomas Gleixner
2014-07-05  9:48 ` [U-Boot] [patch 2/2] spl: Lightweight UBI and UBI fastmap support Thomas Gleixner
2014-08-08 18:56   ` Tom Rini
2014-09-01  7:44     ` Thomas Gleixner
2014-09-29 22:21   ` Richard Weinberger [this message]
2014-09-30  4:49     ` Heiko Schocher
2014-07-12  4:54 ` [U-Boot] [patch 0/2] SPL: " Heiko Schocher

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=5429DB5C.3010306@nod.at \
    --to=richard@nod.at \
    --cc=u-boot@lists.denx.de \
    /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