From mboxrd@z Thu Jan 1 00:00:00 1970 From: Heiko Schocher Date: Tue, 30 Sep 2014 06:49:22 +0200 Subject: [U-Boot] [patch 2/2] spl: Lightweight UBI and UBI fastmap support In-Reply-To: <5429DB5C.3010306@nod.at> References: <20140705092042.528529053@linutronix.de> <20140705094729.982129666@linutronix.de> <5429DB5C.3010306@nod.at> Message-ID: <542A3652.2060208@denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Hello Richard, Am 30.09.2014 00:21, schrieb Richard Weinberger: > 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! I must admit, I did not found yet time to look deeper in this patchset, but I have them on my list ... bye, Heiko -- DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany