yaffs Remove obsolete list debugging code
authorCharles Manning <cdhmanning@gmail.com>
Sat, 25 Sep 2010 02:48:37 +0000 (14:48 +1200)
committerCharles Manning <cdhmanning@gmail.com>
Sat, 25 Sep 2010 02:48:37 +0000 (14:48 +1200)
This code does not work any more so may as well delete it.

Signed-off-by: Charles Manning <cdhmanning@gmail.com>
yaffs_allocator.c
yaffs_guts.c
yaffs_guts.h

index 3807fc91e5e109d503c239cb4c52ba3ad3bc420c..ab44bc7d42a04e0fb33d74b891951c06c82307f9 100644 (file)
@@ -168,21 +168,6 @@ static int yaffs_CreateTnodes(yaffs_Device *dev, int nTnodes)
                return YAFFS_FAIL;
        }
 
                return YAFFS_FAIL;
        }
 
-       /* Hook them into the free list */
-#if 0
-       for (i = 0; i < nTnodes - 1; i++) {
-               newTnodes[i].internal[0] = &newTnodes[i + 1];
-#ifdef CONFIG_YAFFS_TNODE_LIST_DEBUG
-               newTnodes[i].internal[YAFFS_NTNODES_INTERNAL] = (void *)1;
-#endif
-       }
-
-       newTnodes[nTnodes - 1].internal[0] = allocator->freeTnodes;
-#ifdef CONFIG_YAFFS_TNODE_LIST_DEBUG
-       newTnodes[nTnodes - 1].internal[YAFFS_NTNODES_INTERNAL] = (void *)1;
-#endif
-       allocator->freeTnodes = newTnodes;
-#else
        /* New hookup for wide tnodes */
        for (i = 0; i < nTnodes - 1; i++) {
                curr = (yaffs_Tnode *) &mem[i * dev->tnodeSize];
        /* New hookup for wide tnodes */
        for (i = 0; i < nTnodes - 1; i++) {
                curr = (yaffs_Tnode *) &mem[i * dev->tnodeSize];
@@ -194,9 +179,6 @@ static int yaffs_CreateTnodes(yaffs_Device *dev, int nTnodes)
        curr->internal[0] = allocator->freeTnodes;
        allocator->freeTnodes = (yaffs_Tnode *)mem;
 
        curr->internal[0] = allocator->freeTnodes;
        allocator->freeTnodes = (yaffs_Tnode *)mem;
 
-#endif
-
-
        allocator->nFreeTnodes += nTnodes;
        allocator->nTnodesCreated += nTnodes;
 
        allocator->nFreeTnodes += nTnodes;
        allocator->nTnodesCreated += nTnodes;
 
@@ -239,13 +221,6 @@ yaffs_Tnode *yaffs_AllocateRawTnode(yaffs_Device *dev)
 
        if (allocator->freeTnodes) {
                tn = allocator->freeTnodes;
 
        if (allocator->freeTnodes) {
                tn = allocator->freeTnodes;
-#ifdef CONFIG_YAFFS_TNODE_LIST_DEBUG
-               if (tn->internal[YAFFS_NTNODES_INTERNAL] != (void *)1) {
-                       /* Hoosterman, this thing looks like it isn't in the list */
-                       T(YAFFS_TRACE_ALWAYS,
-                         (TSTR("yaffs: Tnode list bug 1" TENDSTR)));
-               }
-#endif
                allocator->freeTnodes = allocator->freeTnodes->internal[0];
                allocator->nFreeTnodes--;
        }
                allocator->freeTnodes = allocator->freeTnodes->internal[0];
                allocator->nFreeTnodes--;
        }
@@ -264,14 +239,6 @@ void yaffs_FreeRawTnode(yaffs_Device *dev, yaffs_Tnode *tn)
        }
 
        if (tn) {
        }
 
        if (tn) {
-#ifdef CONFIG_YAFFS_TNODE_LIST_DEBUG
-               if (tn->internal[YAFFS_NTNODES_INTERNAL] != 0) {
-                       /* Hoosterman, this thing looks like it is already in the list */
-                       T(YAFFS_TRACE_ALWAYS,
-                         (TSTR("yaffs: Tnode list bug 2" TENDSTR)));
-               }
-               tn->internal[YAFFS_NTNODES_INTERNAL] = (void *)1;
-#endif
                tn->internal[0] = allocator->freeTnodes;
                allocator->freeTnodes = tn;
                allocator->nFreeTnodes++;
                tn->internal[0] = allocator->freeTnodes;
                allocator->freeTnodes = tn;
                allocator->nFreeTnodes++;
index 5db3da643403b6b9a9ad2aa4452ef1089cc73495..f910f386dfdb5a33d86a19b4069ee951d887e804 100644 (file)
@@ -5535,9 +5535,8 @@ static int yaffs_CheckStructures(void)
 /*      yaffs_CheckStruct(yaffs_Tags,8,"yaffs_Tags"); */
 /*      yaffs_CheckStruct(yaffs_TagsUnion,8,"yaffs_TagsUnion"); */
 /*      yaffs_CheckStruct(yaffs_Spare,16,"yaffs_Spare"); */
 /*      yaffs_CheckStruct(yaffs_Tags,8,"yaffs_Tags"); */
 /*      yaffs_CheckStruct(yaffs_TagsUnion,8,"yaffs_TagsUnion"); */
 /*      yaffs_CheckStruct(yaffs_Spare,16,"yaffs_Spare"); */
-#ifndef CONFIG_YAFFS_TNODE_LIST_DEBUG
 /*     yaffs_CheckStruct(yaffs_Tnode, 2 * YAFFS_NTNODES_LEVEL0, "yaffs_Tnode"); */
 /*     yaffs_CheckStruct(yaffs_Tnode, 2 * YAFFS_NTNODES_LEVEL0, "yaffs_Tnode"); */
-#endif
+
 #ifndef CONFIG_YAFFS_WINCE
        yaffs_CheckStruct(yaffs_ObjectHeader, 512, "yaffs_ObjectHeader");
 #endif
 #ifndef CONFIG_YAFFS_WINCE
        yaffs_CheckStruct(yaffs_ObjectHeader, 512, "yaffs_ObjectHeader");
 #endif
index a2244d968ef653192b9db3a72d1b2f76f45a03cf..f7e9a0c7a92812184c667541782b46fec1913956 100644 (file)
@@ -351,12 +351,7 @@ typedef struct {
 /*--------------------------- Tnode -------------------------- */
 
 union yaffs_Tnode_union {
 /*--------------------------- Tnode -------------------------- */
 
 union yaffs_Tnode_union {
-#ifdef CONFIG_YAFFS_TNODE_LIST_DEBUG
-       union yaffs_Tnode_union *internal[YAFFS_NTNODES_INTERNAL + 1];
-#else
        union yaffs_Tnode_union *internal[YAFFS_NTNODES_INTERNAL];
        union yaffs_Tnode_union *internal[YAFFS_NTNODES_INTERNAL];
-#endif
-/*     __u16 level0[YAFFS_NTNODES_LEVEL0]; */
 
 };
 
 
 };