All of lore.kernel.org
 help / color / mirror / Atom feed
From: Richard Weinberger <richard@nod.at>
To: dedekind1@gmail.com
Cc: MTD Maling List <linux-mtd@lists.infradead.org>,
	Shmulik Ladkani <shmulik.ladkani@gmail.com>
Subject: Re: [PATCH 1/5] UBI: fastmap: add more TODOs
Date: Thu, 07 Jun 2012 01:46:10 +0200	[thread overview]
Message-ID: <4FCFEBC2.9000009@nod.at> (raw)
In-Reply-To: <1339025892.8066.16.camel@brekeke>

[-- Attachment #1: Type: text/plain, Size: 1088 bytes --]

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


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 490 bytes --]

  reply	other threads:[~2012-06-06 23:46 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-06-05 15:11 [PATCH 0/5] UBI: fastmap: add few todos Artem Bityutskiy
2012-06-05 15:11 ` [PATCH 1/5] UBI: fastmap: add more TODOs Artem Bityutskiy
2012-06-06 21:30   ` Richard Weinberger
2012-06-06 23:38     ` Artem Bityutskiy
2012-06-06 23:46       ` Richard Weinberger [this message]
2012-06-06 23:45         ` Artem Bityutskiy
2012-06-05 15:11 ` [PATCH 2/5] UBI: fastmap: kill junk newlines and add a TODO about that Artem Bityutskiy
2012-06-06 21:30   ` Richard Weinberger
2012-06-06 23:29     ` Artem Bityutskiy
2012-06-05 15:11 ` [PATCH 3/5] UBI: fastmap: more nitpicks Artem Bityutskiy
2012-06-06 21:30   ` Richard Weinberger
2012-06-05 15:11 ` [PATCH 4/5] UBI: fastmap: more annoying TODOs Artem Bityutskiy
2012-06-05 15:11 ` [PATCH 5/5] UBI: fastmap: more tiny TODOs Artem Bityutskiy
2012-06-06 21:30   ` 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=4FCFEBC2.9000009@nod.at \
    --to=richard@nod.at \
    --cc=dedekind1@gmail.com \
    --cc=linux-mtd@lists.infradead.org \
    --cc=shmulik.ladkani@gmail.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.