From: Brian Norris <computersforpeace@gmail.com>
To: Wang YanQing <udknight@gmail.com>,
dwmw2@infradead.org, linux-mtd@lists.infradead.org,
fransmeulenbroeks@gmail.com, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] Documentation: mtd: improve nand_ecc.txt for readability and correctness
Date: Tue, 17 Nov 2015 17:05:53 -0800 [thread overview]
Message-ID: <20151118010553.GA140706@google.com> (raw)
In-Reply-To: <20151029163632.GA2175@udknight>
On Fri, Oct 30, 2015 at 12:36:33AM +0800, Wang YanQing wrote:
> This patch correct some representation errors, add a little
> clarification in some places, and fix indentation problems
> for pseudo code.
>
> It also delete one more white space for one place.
>
> Signed-off-by: Wang YanQing <udknight@gmail.com>
Applied to l2-mtd.git, with the following diff squashed in.
I don't believe these particular phrases have anything to do with
endianness, although the algorithm does swap a few things differently
depending on the host CPU endianness.
diff --git a/Documentation/mtd/nand_ecc.txt b/Documentation/mtd/nand_ecc.txt
index ccb1f260828c..f8c3284bf6a7 100644
--- a/Documentation/mtd/nand_ecc.txt
+++ b/Documentation/mtd/nand_ecc.txt
@@ -273,9 +273,9 @@ byte. A quick analysis:
for the column parity we use the par variable. When extending to 32 bits
we can in the end easily calculate rp0 and rp1 from it.
(because par now consists of 4 bytes, contributing to rp1, rp0, rp1, rp0
-respectively, from MSB to LSB in little endian mode)
+respectively, from MSB to LSB)
also rp2 and rp3 can be easily retrieved from par as rp3 covers the
-first two MSBs and rp2 covers the last two LSBs in little endian mode.
+first two MSBs and rp2 covers the last two LSBs.
Note that of course now the loop is executed only 64 times (256/4).
And note that care must taken wrt byte ordering. The way bytes are
@@ -387,7 +387,7 @@ Analysis 2
The code (of course) works, and hurray: we are a little bit faster than
the linux driver code (about 15%). But wait, don't cheer too quickly.
-THere is more to be gained.
+There is more to be gained.
If we look at e.g. rp14 and rp15 we see that we either xor our data with
rp14 or with rp15. However we also have par which goes over all data.
This means there is no need to calculate rp14 as it can be calculated from
prev parent reply other threads:[~2015-11-18 1:06 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-10-29 16:36 [PATCH] Documentation: mtd: improve nand_ecc.txt for readability and correctness Wang YanQing
2015-11-18 1:05 ` Brian Norris [this message]
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=20151118010553.GA140706@google.com \
--to=computersforpeace@gmail.com \
--cc=dwmw2@infradead.org \
--cc=fransmeulenbroeks@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mtd@lists.infradead.org \
--cc=udknight@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox