More formatting
authorcharles <charles>
Mon, 9 Mar 2009 07:41:10 +0000 (07:41 +0000)
committercharles <charles>
Mon, 9 Mar 2009 07:41:10 +0000 (07:41 +0000)
yaffs_mtdif1.c
yaffs_packedtags1.c
yaffs_packedtags2.c
yaffs_tagscompat.c

index f4d35fc5a659900f62f191d3b0f366fb4c88329a..c069dfac79813685c675d7879d6c265c058c62a2 100644 (file)
@@ -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_DeviceStruct *dev, int blockNo,
        /* 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);
index c910f22ea4d78d22b8241d73f2f85e67f8a6a2db..3e67e69166663feeb76871b6307b01bf80e9773f 100644 (file)
@@ -35,9 +35,8 @@ void yaffs_UnpackTags1(yaffs_ExtendedTags *t, const yaffs_PackedTags1 *pt)
 
        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;
index da1621fa81963c82feb9585c657a8b7afc233e6f..a78c03c9d6ce368b3c8447d482c76252b32143e3 100644 (file)
@@ -74,24 +74,21 @@ void yaffs_PackTags2TagsPart(yaffs_PackedTags2TagsPart *ptt,
                /* 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_ExtendedTags *t,
                            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;
-                       }
                }
        }
 
index 1e0a1a1b195d583316b8e414e9642e80c2e779cb..402537fb4ee1387132075c4247161bda4ab0d438 100644 (file)
@@ -408,26 +408,25 @@ int yaffs_TagsCompatabilityWriteChunkWithTagsToNAND(yaffs_Device *dev,
 
        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);
 
        }