summaryrefslogtreecommitdiff
path: root/fs/yaffs2
diff options
context:
space:
mode:
authorMarek Vasut <marek.vasut@gmail.com>2011-10-24 23:41:37 +0000
committerWolfgang Denk <wd@denx.de>2011-10-27 23:54:09 +0200
commit4b41478c6688f539949ea3e8ecada0ab5fcbcf40 (patch)
tree9ff727dc51a916a00ae175017b2436142755be1a /fs/yaffs2
parentdd0598420c9531ae67db551bdaf46f9a3c42fbc1 (diff)
GCC4.6: Drop dead code from yaffs_guts.c
Drop yaffs_DeleteWorker(): yaffs_guts.c:1556:12: warning: 'yaffs_DeleteWorker' defined but not used Drop yaffs_VerifyTnodeWorker(): yaffs_guts.c:600:12: warning: 'yaffs_VerifyTnodeWorker' defined but not used Signed-off-by: Marek Vasut <marek.vasut@gmail.com> Cc: Wolfgang Denk <wd@denx.de> Cc: Simon Glass <sjg@chromium.org> Cc: Mike Frysinger <vapier@gentoo.org>
Diffstat (limited to 'fs/yaffs2')
-rw-r--r--fs/yaffs2/yaffs_guts.c149
1 files changed, 0 insertions, 149 deletions
diff --git a/fs/yaffs2/yaffs_guts.c b/fs/yaffs2/yaffs_guts.c
index c67a08517bc..68422e265bd 100644
--- a/fs/yaffs2/yaffs_guts.c
+++ b/fs/yaffs2/yaffs_guts.c
@@ -78,8 +78,6 @@ static int yaffs_UpdateObjectHeader(yaffs_Object * in, const YCHAR * name,
int force, int isShrink, int shadows);
static void yaffs_RemoveObjectFromDirectory(yaffs_Object * obj);
static int yaffs_CheckStructures(void);
-static int yaffs_DeleteWorker(yaffs_Object * in, yaffs_Tnode * tn, __u32 level,
- int chunkOffset, int *limit);
static int yaffs_DoGenericObjectDeletion(yaffs_Object * in);
static yaffs_BlockInfo *yaffs_GetBlockInfo(yaffs_Device * dev, int blockNo);
@@ -595,55 +593,6 @@ static void yaffs_VerifyObjectHeader(yaffs_Object *obj, yaffs_ObjectHeader *oh,
obj->objectId));
}
-
-
-static int yaffs_VerifyTnodeWorker(yaffs_Object * obj, yaffs_Tnode * tn,
- __u32 level, int chunkOffset)
-{
- int i;
- yaffs_Device *dev = obj->myDev;
- int ok = 1;
-
- if (tn) {
- if (level > 0) {
-
- for (i = 0; i < YAFFS_NTNODES_INTERNAL && ok; i++){
- if (tn->internal[i]) {
- ok = yaffs_VerifyTnodeWorker(obj,
- tn->internal[i],
- level - 1,
- (chunkOffset<<YAFFS_TNODES_INTERNAL_BITS) + i);
- }
- }
- } else if (level == 0) {
- int i;
- yaffs_ExtendedTags tags;
- __u32 objectId = obj->objectId;
-
- chunkOffset <<= YAFFS_TNODES_LEVEL0_BITS;
-
- for(i = 0; i < YAFFS_NTNODES_LEVEL0; i++){
- __u32 theChunk = yaffs_GetChunkGroupBase(dev,tn,i);
-
- if(theChunk > 0){
- /* T(~0,(TSTR("verifying (%d:%d) %d"TENDSTR),tags.objectId,tags.chunkId,theChunk)); */
- yaffs_ReadChunkWithTagsFromNAND(dev,theChunk,NULL, &tags);
- if(tags.objectId != objectId || tags.chunkId != chunkOffset){
- T(~0,(TSTR("Object %d chunkId %d NAND mismatch chunk %d tags (%d:%d)"TENDSTR),
- objectId, chunkOffset, theChunk,
- tags.objectId, tags.chunkId));
- }
- }
- chunkOffset++;
- }
- }
- }
-
- return ok;
-
-}
-
-
static void yaffs_VerifyFile(yaffs_Object *obj)
{
int requiredTallness;
@@ -1546,104 +1495,6 @@ static int yaffs_FindChunkInGroup(yaffs_Device * dev, int theChunk,
return -1;
}
-
-/* DeleteWorker scans backwards through the tnode tree and deletes all the
- * chunks and tnodes in the file
- * Returns 1 if the tree was deleted.
- * Returns 0 if it stopped early due to hitting the limit and the delete is incomplete.
- */
-
-static int yaffs_DeleteWorker(yaffs_Object * in, yaffs_Tnode * tn, __u32 level,
- int chunkOffset, int *limit)
-{
- int i;
- int chunkInInode;
- int theChunk;
- yaffs_ExtendedTags tags;
- int foundChunk;
- yaffs_Device *dev = in->myDev;
-
- int allDone = 1;
-
- if (tn) {
- if (level > 0) {
-
- for (i = YAFFS_NTNODES_INTERNAL - 1; allDone && i >= 0;
- i--) {
- if (tn->internal[i]) {
- if (limit && (*limit) < 0) {
- allDone = 0;
- } else {
- allDone =
- yaffs_DeleteWorker(in,
- tn->
- internal
- [i],
- level -
- 1,
- (chunkOffset
- <<
- YAFFS_TNODES_INTERNAL_BITS)
- + i,
- limit);
- }
- if (allDone) {
- yaffs_FreeTnode(dev,
- tn->
- internal[i]);
- tn->internal[i] = NULL;
- }
- }
-
- }
- return (allDone) ? 1 : 0;
- } else if (level == 0) {
- int hitLimit = 0;
-
- for (i = YAFFS_NTNODES_LEVEL0 - 1; i >= 0 && !hitLimit;
- i--) {
- theChunk = yaffs_GetChunkGroupBase(dev,tn,i);
- if (theChunk) {
-
- chunkInInode =
- (chunkOffset <<
- YAFFS_TNODES_LEVEL0_BITS) + i;
-
- foundChunk =
- yaffs_FindChunkInGroup(dev,
- theChunk,
- &tags,
- in->objectId,
- chunkInInode);
-
- if (foundChunk > 0) {
- yaffs_DeleteChunk(dev,
- foundChunk, 1,
- __LINE__);
- in->nDataChunks--;
- if (limit) {
- *limit = *limit - 1;
- if (*limit <= 0) {
- hitLimit = 1;
- }
- }
-
- }
-
- yaffs_PutLevel0Tnode(dev,tn,i,0);
- }
-
- }
- return (i < 0) ? 1 : 0;
-
- }
-
- }
-
- return 1;
-
-}
-
static void yaffs_SoftDeleteChunk(yaffs_Device * dev, int chunk)
{