If possible, declare symbols from yaffs_guts.c as "static".
-- Luc Van Oostenryck
diff --git a/fs/yaffs2/yaffs_guts.c b/fs/yaffs2/yaffs_guts.c
--- a/fs/yaffs2/yaffs_guts.c
+++ b/fs/yaffs2/yaffs_guts.c
@@ -208,7 +208,7 @@ static Y_INLINE int yaffs_QueryInitialBl
return yaffs_TagsCompatabilityQueryNANDBlock(dev,blockNo,state,sequenceNumber);
}
-int yaffs_EraseBlockInNAND(struct yaffs_DeviceStruct *dev,int blockInNAND)
+static int yaffs_EraseBlockInNAND(struct yaffs_DeviceStruct *dev,int blockInNAND)
{
int result;
@@ -589,7 +589,7 @@ static __u16 yaffs_CalcNameSum(const YCH
return sum;
}
-void yaffs_SetObjectName(yaffs_Object *obj, const YCHAR *name)
+static void yaffs_SetObjectName(yaffs_Object *obj, const YCHAR *name)
{
#ifdef CONFIG_YAFFS_SHORT_NAMES_IN_RAM
if(name && yaffs_strlen(name) <= YAFFS_SHORT_NAME_LENGTH)
@@ -969,7 +969,7 @@ static yaffs_Tnode *yaffs_AddOrFindLevel
}
-int yaffs_FindChunkInGroup(yaffs_Device *dev, int theChunk, yaffs_ExtendedTags *tags, int objectId, int chunkInInode)
+static int yaffs_FindChunkInGroup(yaffs_Device *dev, int theChunk, yaffs_ExtendedTags *tags, int objectId, int chunkInInode)
{
int j;
@@ -1496,7 +1496,7 @@ static void yaffs_InitialiseObjects(yaff
-int yaffs_FindNiceObjectBucket(yaffs_Device *dev)
+static int yaffs_FindNiceObjectBucket(yaffs_Device *dev)
{
static int x = 0;
int i;
@@ -1572,7 +1572,7 @@ static int yaffs_CreateNewObjectNumber(y
return n;
}
-void yaffs_HashObject(yaffs_Object *in)
+static void yaffs_HashObject(yaffs_Object *in)
{
int bucket = yaffs_HashFunction(in->objectId);
yaffs_Device *dev = in->myDev;
@@ -1677,7 +1677,7 @@ yaffs_Object *yaffs_CreateNewObject(yaff
return theObject;
}
-yaffs_Object *yaffs_FindOrCreateObjectByNumber(yaffs_Device *dev, int number,yaffs_ObjectType type)
+static yaffs_Object *yaffs_FindOrCreateObjectByNumber(yaffs_Device *dev, int number,yaffs_ObjectType type)
{
yaffs_Object *theObject = NULL;
@@ -1695,7 +1695,7 @@ yaffs_Object *yaffs_FindOrCreateObjectBy
}
-YCHAR *yaffs_CloneString(const YCHAR *str)
+static YCHAR *yaffs_CloneString(const YCHAR *str)
{
YCHAR *newStr = NULL;
@@ -1714,7 +1714,7 @@ YCHAR *yaffs_CloneString(const YCHAR *st
// equivalentObject only has meaning for a hard link;
// aliasString only has meaning for a sumlink.
// rdev only has meaning for devices (a subset of special objects)
-yaffs_Object *yaffs_MknodObject( yaffs_ObjectType type,
+static yaffs_Object *yaffs_MknodObject( yaffs_ObjectType type,
yaffs_Object *parent,
const YCHAR *name,
__u32 mode,
@@ -2386,7 +2386,7 @@ static int yaffs_GetErasedChunks(yaffs_D
}
-int yaffs_GarbageCollectBlock(yaffs_Device *dev,int block)
+static int yaffs_GarbageCollectBlock(yaffs_Device *dev,int block)
{
int oldChunk;
int newChunk;
@@ -2630,7 +2630,7 @@ static void yaffs_DoUnlinkedFileDeletion
// The idea is to help clear out space in a more spread-out manner.
// Dunno if it really does anything useful.
//
-int yaffs_CheckGarbageCollection(yaffs_Device *dev)
+static int yaffs_CheckGarbageCollection(yaffs_Device *dev)
{
int block;
int aggressive;
@@ -2838,7 +2838,7 @@ static int yaffs_TagsMatch(const yaffs_E
/////////////////////////////////////////////////////////////////////////////////////////////////////////
-int yaffs_FindChunkInFile(yaffs_Object *in,int chunkInInode,yaffs_ExtendedTags *tags)
+static int yaffs_FindChunkInFile(yaffs_Object *in,int chunkInInode,yaffs_ExtendedTags *tags)
{
//Get the Tnode, then get the level 0 offset chunk offset
yaffs_Tnode *tn;
@@ -2866,7 +2866,7 @@ int yaffs_FindChunkInFile(yaffs_Object *
return retVal;
}
-int yaffs_FindAndDeleteChunkInFile(yaffs_Object *in,int chunkInInode,yaffs_ExtendedTags *tags)
+static int yaffs_FindAndDeleteChunkInFile(yaffs_Object *in,int chunkInInode,yaffs_ExtendedTags *tags)
{
//Get the Tnode, then get the level 0 offset chunk offset
yaffs_Tnode *tn;
@@ -3093,7 +3093,7 @@ static int yaffs_PutChunkIntoFile(yaffs_
-int yaffs_ReadChunkDataFromObject(yaffs_Object *in,int chunkInInode, __u8 *buffer)
+static int yaffs_ReadChunkDataFromObject(yaffs_Object *in,int chunkInInode, __u8 *buffer)
{
int chunkInNAND = yaffs_FindChunkInFile(in,chunkInInode,NULL);
@@ -3188,7 +3188,7 @@ void yaffs_DeleteChunk(yaffs_Device *dev
-int yaffs_WriteChunkDataToObject(yaffs_Object *in,int chunkInInode, const __u8 *buffer,int nBytes,int useReserve)
+static int yaffs_WriteChunkDataToObject(yaffs_Object *in,int chunkInInode, const __u8 *buffer,int nBytes,int useReserve)
{
// Find old chunk Need to do this to get serial number
// Write new one and patch into tree.
@@ -5849,7 +5849,7 @@ int yaffs_DumpObject(yaffs_Object *obj)
///////////////////////// Initialisation code ///////////////////////////
-int yaffs_CheckDevFunctions(const yaffs_Device *dev)
+static int yaffs_CheckDevFunctions(const yaffs_Device *dev)
{
// Common functions, gotta have