changeset 274:4c1611b9a4d7

More formatting
author charles <charles>
date Mon, 09 Mar 2009 07:41:10 +0000
parents 5cf3a2a54469
children f66f490d76b6
files yaffs_mtdif1.c yaffs_packedtags1.c yaffs_packedtags2.c yaffs_tagscompat.c
diffstat 4 files changed, 16 insertions(+), 23 deletions(-) [+]
line wrap: on
line diff
--- a/yaffs_mtdif1.c
+++ b/yaffs_mtdif1.c
@@ -36,7 +36,7 @@
 /* Don't compile this module if we don't have MTD's mtd_oob_ops interface */
 #if (MTD_VERSION_CODE > MTD_VERSION(2, 6, 17))
 
-const char *yaffs_mtdif1_c_version = "$Id: yaffs_mtdif1.c,v 1.9 2009-03-06 17:20:52 wookey Exp $";
+const char *yaffs_mtdif1_c_version = "$Id: yaffs_mtdif1.c,v 1.10 2009-03-09 07:41:10 charles Exp $";
 
 #ifndef CONFIG_YAFFS_9BYTE_TAGS
 # define YTAG1_SIZE 8
@@ -336,9 +336,8 @@ int nandmtd1_QueryNANDBlock(struct yaffs
 	/* We don't yet have a good place to test for MTD config prerequists.
 	 * Do it here as we are called during the initial scan.
 	 */
-	if (nandmtd1_TestPrerequists(mtd) != YAFFS_OK) {
+	if (nandmtd1_TestPrerequists(mtd) != YAFFS_OK)
 		return YAFFS_FAIL;
-	}
 
 	retval = nandmtd1_ReadChunkWithTagsFromNAND(dev, chunkNo, NULL, &etags);
 	etags.blockBad = (mtd->block_isbad)(mtd, addr);
--- a/yaffs_packedtags1.c
+++ b/yaffs_packedtags1.c
@@ -35,9 +35,8 @@ 0xff };
 
 	if (memcmp(allFF, pt, sizeof(yaffs_PackedTags1))) {
 		t->blockBad = 0;
-		if (pt->shouldBeFF != 0xFFFFFFFF) {
+		if (pt->shouldBeFF != 0xFFFFFFFF)
 			t->blockBad = 1;
-		}
 		t->chunkUsed = 1;
 		t->objectId = pt->objectId;
 		t->chunkId = pt->chunkId;
--- a/yaffs_packedtags2.c
+++ b/yaffs_packedtags2.c
@@ -74,24 +74,21 @@ void yaffs_PackTags2TagsPart(yaffs_Packe
 		/* We save the parent object in the chunkId */
 		ptt->chunkId = EXTRA_HEADER_INFO_FLAG
 			| t->extraParentObjectId;
-		if (t->extraIsShrinkHeader) {
+		if (t->extraIsShrinkHeader)
 			ptt->chunkId |= EXTRA_SHRINK_FLAG;
-		}
-		if (t->extraShadows) {
+		if (t->extraShadows)
 			ptt->chunkId |= EXTRA_SHADOWS_FLAG;
-		}
 
 		ptt->objectId &= ~EXTRA_OBJECT_TYPE_MASK;
 		ptt->objectId |=
 		    (t->extraObjectType << EXTRA_OBJECT_TYPE_SHIFT);
 
-		if (t->extraObjectType == YAFFS_OBJECT_TYPE_HARDLINK) {
+		if (t->extraObjectType == YAFFS_OBJECT_TYPE_HARDLINK)
 			ptt->byteCount = t->extraEquivalentObjectId;
-		} else if (t->extraObjectType == YAFFS_OBJECT_TYPE_FILE) {
+		else if (t->extraObjectType == YAFFS_OBJECT_TYPE_FILE)
 			ptt->byteCount = t->extraFileLength;
-		} else {
+		else
 			ptt->byteCount = 0;
-		}
 	}
 
 	yaffs_DumpPackedTags2TagsPart(ptt);
@@ -148,11 +145,10 @@ void yaffs_UnpackTags2TagsPart(yaffs_Ext
 			    ptt->objectId >> EXTRA_OBJECT_TYPE_SHIFT;
 			t->objectId &= ~EXTRA_OBJECT_TYPE_MASK;
 
-			if (t->extraObjectType == YAFFS_OBJECT_TYPE_HARDLINK) {
+			if (t->extraObjectType == YAFFS_OBJECT_TYPE_HARDLINK)
 				t->extraEquivalentObjectId = ptt->byteCount;
-			} else {
+			else
 				t->extraFileLength = ptt->byteCount;
-			}
 		}
 	}
 
--- a/yaffs_tagscompat.c
+++ b/yaffs_tagscompat.c
@@ -408,26 +408,25 @@ int yaffs_TagsCompatabilityWriteChunkWit
 
 	yaffs_SpareInitialise(&spare);
 
-	if (eTags->chunkDeleted) {
+	if (eTags->chunkDeleted)
 		spare.pageStatus = 0;
-	} else {
+	else {
 		tags.objectId = eTags->objectId;
 		tags.chunkId = eTags->chunkId;
 
 		tags.byteCountLSB = eTags->byteCount & 0x3ff;
 
-		if (dev->nDataBytesPerChunk >= 1024) {
+		if (dev->nDataBytesPerChunk >= 1024)
 			tags.byteCountMSB = (eTags->byteCount >> 10) & 3;
-		} else {
+		else
 			tags.byteCountMSB = 3;
-		}
 
 
 		tags.serialNumber = eTags->serialNumber;
 
-		if (!dev->useNANDECC && data) {
+		if (!dev->useNANDECC && data)
 			yaffs_CalcECC(data, &spare);
-		}
+
 		yaffs_LoadTagsIntoSpare(&spare, &tags);
 
 	}