aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/generic-2.6/files/fs/yaffs2/yaffs_ecc.c
diff options
context:
space:
mode:
authorGabor Juhos <juhosg@openwrt.org>2008-05-28 07:31:26 +0000
committerGabor Juhos <juhosg@openwrt.org>2008-05-28 07:31:26 +0000
commit7350e37678789bda8da64bd0f641b00d23c14ff9 (patch)
tree60a5dafbfbdc7610f8ed9e6cb0e2fb65e8c6126c /target/linux/generic-2.6/files/fs/yaffs2/yaffs_ecc.c
parentdd1f013e65c81f90d3d6ba79f3a2784034e21a6b (diff)
downloadmaster-187ad058-7350e37678789bda8da64bd0f641b00d23c14ff9.tar.gz
master-187ad058-7350e37678789bda8da64bd0f641b00d23c14ff9.tar.bz2
master-187ad058-7350e37678789bda8da64bd0f641b00d23c14ff9.zip
[kernel] nuke trailing whitespaces in the yaffs code
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@11277 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux/generic-2.6/files/fs/yaffs2/yaffs_ecc.c')
-rw-r--r--target/linux/generic-2.6/files/fs/yaffs2/yaffs_ecc.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/target/linux/generic-2.6/files/fs/yaffs2/yaffs_ecc.c b/target/linux/generic-2.6/files/fs/yaffs2/yaffs_ecc.c
index be860d01a6..e2860393d3 100644
--- a/target/linux/generic-2.6/files/fs/yaffs2/yaffs_ecc.c
+++ b/target/linux/generic-2.6/files/fs/yaffs2/yaffs_ecc.c
@@ -14,9 +14,9 @@
/*
* This code implements the ECC algorithm used in SmartMedia.
*
- * The ECC comprises 22 bits of parity information and is stuffed into 3 bytes.
+ * The ECC comprises 22 bits of parity information and is stuffed into 3 bytes.
* The two unused bit are set to 1.
- * The ECC can correct single bit errors in a 256-byte page of data. Thus, two such ECC
+ * The ECC can correct single bit errors in a 256-byte page of data. Thus, two such ECC
* blocks are used on a 512-byte NAND page.
*
*/
@@ -228,8 +228,8 @@ int yaffs_ECCCorrect(unsigned char *data, unsigned char *read_ecc,
return 1; /* Corrected the error */
}
- if ((yaffs_CountBits(d0) +
- yaffs_CountBits(d1) +
+ if ((yaffs_CountBits(d0) +
+ yaffs_CountBits(d1) +
yaffs_CountBits(d2)) == 1) {
/* Reccoverable error in ecc */
@@ -239,7 +239,7 @@ int yaffs_ECCCorrect(unsigned char *data, unsigned char *read_ecc,
return 1; /* Corrected the error */
}
-
+
/* Unrecoverable error */
return -1;
@@ -293,7 +293,7 @@ int yaffs_ECCCorrectOther(unsigned char *data, unsigned nBytes,
if ((cDelta | lDelta | lDeltaPrime) == 0)
return 0; /* no error */
- if (lDelta == ~lDeltaPrime &&
+ if (lDelta == ~lDeltaPrime &&
(((cDelta ^ (cDelta >> 1)) & 0x15) == 0x15))
{
/* Single bit (recoverable) error in data */
@@ -309,7 +309,7 @@ int yaffs_ECCCorrectOther(unsigned char *data, unsigned nBytes,
if(lDelta >= nBytes)
return -1;
-
+
data[lDelta] ^= (1 << bit);
return 1; /* corrected */