[PATCH 1/5] UBI: fastmap: add more TODOs
Richard Weinberger
richard at nod.at
Wed Jun 6 19:46:10 EDT 2012
Am 07.06.2012 01:38, schrieb Artem Bityutskiy:
> On Wed, 2012-06-06 at 23:30 +0200, Richard Weinberger wrote:
>> I'm confused to find bad PEBs I'd still need a full scan, right?
>
> If full scan means call mtd_block_isbad() for each PEB, then yes.
>
>>> ret = ubi_io_read(ubi, fmsb, sb_pnum, ubi->leb_start, sizeof(*fmsb));
>>> if (ret && ret != UBI_IO_BITFLIPS) {
>>> + /* TODO: what are the error codes > 0 ? Why is this check? */
>>
>> To catch UBI_IO_BAD_HDR, UBI_IO_BAD_HDR_EBADMSG and friends.
>
> Which are never returned by ubi_io_read().
Also never ever in future?
If so, I'll drop this check.
>> AFAIK ->magic is the only __b32 field where I not use be32_to_cpu() because it's useless here.
>
> Why is it useless?
>
> if we have the following bytes starting from address 0xC0000000:
> 7B 11 D6 9F
>
> then we do:
>
> unsigned int *p = 0xC0000000;
> printk("%#x\n", *p);
>
> we should see:
>
> 0x7B11D69F on BE system (e.g., powerpc)
> and
> 0x9FD6117B on LE system (e.g., x86).
>
Damit, you are right!
Sorry,
//richard
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 490 bytes
Desc: OpenPGP digital signature
URL: <http://lists.infradead.org/pipermail/linux-mtd/attachments/20120607/85887b0c/attachment.sig>
More information about the linux-mtd
mailing list