projects
/
yaffs2.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
yaffs: Remove debugging argument from temp buffer handling
[yaffs2.git]
/
yaffs_mtdif1_multi.c
diff --git
a/yaffs_mtdif1_multi.c
b/yaffs_mtdif1_multi.c
index cf9c54cce23a98aa92a3b130edd21e9b9a6451a1..cbaa326afad17e0e8c3d9341609dd9694af75397 100644
(file)
--- a/
yaffs_mtdif1_multi.c
+++ b/
yaffs_mtdif1_multi.c
@@
-1,7
+1,7
@@
/*
* YAFFS: Yet another FFS. A NAND-flash specific file system.
*
/*
* YAFFS: Yet another FFS. A NAND-flash specific file system.
*
- * Copyright (C) 2002-201
0
Aleph One Ltd.
+ * Copyright (C) 2002-201
1
Aleph One Ltd.
* for Toby Churchill Ltd and Brightstar Engineering
*
* Created by Charles Manning <charles@aleph1.co.uk>
* for Toby Churchill Ltd and Brightstar Engineering
*
* Created by Charles Manning <charles@aleph1.co.uk>
@@
-64,7
+64,7
@@
static struct nand_ecclayout nand_oob_16 = {
.eccbytes = 6,
.eccpos = {8, 9, 10, 13, 14, 15},
.oobavail = 9,
.eccbytes = 6,
.eccpos = {8, 9, 10, 13, 14, 15},
.oobavail = 9,
- .oobfree = {{0, 4}, {6, 2}, {11, 2}, {4, 1}}
+ .oobfree = {{0, 4}, {6, 2}, {11, 2}, {4, 1}
}
};
#endif
};
#endif
@@
-90,7
+90,7
@@
static struct nand_ecclayout nand_oob_16 = {
* Returns YAFFS_OK or YAFFS_FAIL.
*/
int nandmtd1_write_chunk_tags(struct yaffs_dev *dev,
* Returns YAFFS_OK or YAFFS_FAIL.
*/
int nandmtd1_write_chunk_tags(struct yaffs_dev *dev,
- int nand_chunk, const u8 *
data,
+ int nand_chunk, const u8 *data,
const struct yaffs_ext_tags *etags)
{
struct mtd_info *mtd = yaffs_dev_to_mtd(dev);
const struct yaffs_ext_tags *etags)
{
struct mtd_info *mtd = yaffs_dev_to_mtd(dev);
@@
-120,11
+120,11
@@
int nandmtd1_write_chunk_tags(struct yaffs_dev *dev,
pt1.deleted = 0;
}
#else
pt1.deleted = 0;
}
#else
- ((u8 *) &
pt1)[8] = 0xff;
+ ((u8 *) &pt1)[8] = 0xff;
if (etags->is_deleted) {
memset(&pt1, 0xff, 8);
/* zero page_status byte to indicate deleted */
if (etags->is_deleted) {
memset(&pt1, 0xff, 8);
/* zero page_status byte to indicate deleted */
- ((u8 *) &
pt1)[8] = 0;
+ ((u8 *) &pt1)[8] = 0;
}
#endif
}
#endif
@@
-133,7
+133,7
@@
int nandmtd1_write_chunk_tags(struct yaffs_dev *dev,
ops.len = (data) ? chunk_bytes : 0;
ops.ooblen = YTAG1_SIZE;
ops.datbuf = (u8 *) data;
ops.len = (data) ? chunk_bytes : 0;
ops.ooblen = YTAG1_SIZE;
ops.datbuf = (u8 *) data;
- ops.oobbuf = (u8 *) &
pt1;
+ ops.oobbuf = (u8 *) &pt1;
retval = mtd->write_oob(mtd, addr, &ops);
if (retval) {
retval = mtd->write_oob(mtd, addr, &ops);
if (retval) {
@@
-169,7
+169,7
@@
static int rettags(struct yaffs_ext_tags *etags, int ecc_result, int retval)
* Returns YAFFS_OK or YAFFS_FAIL.
*/
int nandmtd1_read_chunk_tags(struct yaffs_dev *dev,
* Returns YAFFS_OK or YAFFS_FAIL.
*/
int nandmtd1_read_chunk_tags(struct yaffs_dev *dev,
- int nand_chunk, u8 *
data,
+ int nand_chunk, u8 *data,
struct yaffs_ext_tags *etags)
{
struct mtd_info *mtd = yaffs_dev_to_mtd(dev);
struct yaffs_ext_tags *etags)
{
struct mtd_info *mtd = yaffs_dev_to_mtd(dev);
@@
-186,7
+186,7
@@
int nandmtd1_read_chunk_tags(struct yaffs_dev *dev,
ops.len = (data) ? chunk_bytes : 0;
ops.ooblen = YTAG1_SIZE;
ops.datbuf = data;
ops.len = (data) ? chunk_bytes : 0;
ops.ooblen = YTAG1_SIZE;
ops.datbuf = data;
- ops.oobbuf = (u8 *) &
pt1;
+ ops.oobbuf = (u8 *) &pt1;
#if (MTD_VERSION_CODE < MTD_VERSION(2, 6, 20))
/* In MTD 2.6.18 to 2.6.19 nand_base.c:nand_do_read_oob() has a bug;
#if (MTD_VERSION_CODE < MTD_VERSION(2, 6, 20))
/* In MTD 2.6.18 to 2.6.19 nand_base.c:nand_do_read_oob() has a bug;
@@
-226,7
+226,7
@@
int nandmtd1_read_chunk_tags(struct yaffs_dev *dev,
/* Check for a blank/erased chunk.
*/
/* Check for a blank/erased chunk.
*/
- if (yaffs_check_ff((u8 *) &
pt1, 8)) {
+ if (yaffs_check_ff((u8 *) &pt1, 8)) {
/* when blank, upper layers want ecc_result to be <= NO_ERROR */
return rettags(etags, YAFFS_ECC_RESULT_NO_ERROR, YAFFS_OK);
}
/* when blank, upper layers want ecc_result to be <= NO_ERROR */
return rettags(etags, YAFFS_ECC_RESULT_NO_ERROR, YAFFS_OK);
}
@@
-238,7
+238,7
@@
int nandmtd1_read_chunk_tags(struct yaffs_dev *dev,
deleted = !pt1.deleted;
pt1.deleted = 1;
#else
deleted = !pt1.deleted;
pt1.deleted = 1;
#else
- deleted = (hweight8(((u8 *) &
pt1)[8]) < 7);
+ deleted = (hweight8(((u8 *) &pt1)[8]) < 7);
#endif
/* Check the packed tags mini-ECC and correct if necessary/possible.
#endif
/* Check the packed tags mini-ECC and correct if necessary/possible.
@@
-263,7
+263,7
@@
int nandmtd1_read_chunk_tags(struct yaffs_dev *dev,
/* Unpack the tags to extended form and set ECC result.
* [set should_be_ff just to keep yaffs_unpack_tags1 happy]
*/
/* Unpack the tags to extended form and set ECC result.
* [set should_be_ff just to keep yaffs_unpack_tags1 happy]
*/
- pt1.should_be_ff = 0x
FFFFFFFF
;
+ pt1.should_be_ff = 0x
ffffffff
;
yaffs_unpack_tags1(etags, &pt1);
etags->ecc_result = eccres;
yaffs_unpack_tags1(etags, &pt1);
etags->ecc_result = eccres;
@@
-314,7
+314,7
@@
static int nandmtd1_test_prerequists(struct mtd_info *mtd)
*
* Examine the tags of the first chunk of the block and return the state:
* - YAFFS_BLOCK_STATE_DEAD, the block is marked bad
*
* Examine the tags of the first chunk of the block and return the state:
* - YAFFS_BLOCK_STATE_DEAD, the block is marked bad
- * - YAFFS_BLOCK_STATE_NEEDS_SCAN
NING
, the block is in use
+ * - YAFFS_BLOCK_STATE_NEEDS_SCAN, the block is in use
* - YAFFS_BLOCK_STATE_EMPTY, the block is clean
*
* Always returns YAFFS_OK.
* - YAFFS_BLOCK_STATE_EMPTY, the block is clean
*
* Always returns YAFFS_OK.
@@
-345,9
+345,9
@@
int nandmtd1_query_block(struct yaffs_dev *dev, int block_no,
state = YAFFS_BLOCK_STATE_DEAD;
} else if (etags.ecc_result != YAFFS_ECC_RESULT_NO_ERROR) {
/* bad tags, need to look more closely */
state = YAFFS_BLOCK_STATE_DEAD;
} else if (etags.ecc_result != YAFFS_ECC_RESULT_NO_ERROR) {
/* bad tags, need to look more closely */
- state = YAFFS_BLOCK_STATE_NEEDS_SCAN
NING
;
+ state = YAFFS_BLOCK_STATE_NEEDS_SCAN;
} else if (etags.chunk_used) {
} else if (etags.chunk_used) {
- state = YAFFS_BLOCK_STATE_NEEDS_SCAN
NING
;
+ state = YAFFS_BLOCK_STATE_NEEDS_SCAN;
seqnum = etags.seq_number;
} else {
state = YAFFS_BLOCK_STATE_EMPTY;
seqnum = etags.seq_number;
} else {
state = YAFFS_BLOCK_STATE_EMPTY;