[Yaffs] [PATCH YAFFS2 13/15] sparse-fix--make-some-symbol-static

Luc Van Oostenryck luc.vanoostenryck at looxix.net
Thu Jul 28 00:00:27 BST 2005


If possible, declare symbols as "static".




-- Luc Van Oostenryck
-------------- next part --------------
diff --git a/fs/yaffs2/mtdemul/nandemul2k.c b/fs/yaffs2/mtdemul/nandemul2k.c
--- a/fs/yaffs2/mtdemul/nandemul2k.c
+++ b/fs/yaffs2/mtdemul/nandemul2k.c
@@ -253,7 +253,7 @@ int nandemul2k_GetNumberOfBlocks(void) {
 
 
 
-int nandemul2k_ReadId(__u8 *vendorId, __u8 *deviceId)
+static int nandemul2k_ReadId(__u8 *vendorId, __u8 *deviceId)
 {
 	*vendorId = 'Y'; 
 	*deviceId = '2';
@@ -262,7 +262,7 @@ int nandemul2k_ReadId(__u8 *vendorId, __
 }
 
 
-int nandemul2k_ReadStatus(__u8 *status)
+static int nandemul2k_ReadStatus(__u8 *status)
 {
 		*status = 0;
 		return 1;
diff --git a/fs/yaffs2/yaffs_fs.c b/fs/yaffs2/yaffs_fs.c
--- a/fs/yaffs2/yaffs_fs.c
+++ b/fs/yaffs2/yaffs_fs.c
@@ -34,7 +34,6 @@ const char *yaffs_fs_c_version = "$Id: y
 extern const char *yaffs_guts_c_version;
 
 
-
 #include <linux/config.h>
 #include <linux/kernel.h>
 #include <linux/module.h>
@@ -198,7 +197,7 @@ static struct inode_operations yaffs_fil
 };
 
 
-struct inode_operations yaffs_symlink_inode_operations =
+static struct inode_operations yaffs_symlink_inode_operations =
 {	
 	.readlink=	yaffs_readlink,
 	.follow_link=	yaffs_follow_link,
diff --git a/fs/yaffs2/yaffs_mtdif.c b/fs/yaffs2/yaffs_mtdif.c
--- a/fs/yaffs2/yaffs_mtdif.c
+++ b/fs/yaffs2/yaffs_mtdif.c
@@ -28,12 +28,12 @@ const char *yaffs_mtdif_c_version = "$Id
 #include "linux/mtd/nand.h"
 #endif
 
-struct nand_oobinfo yaffs_oobinfo = {
+static struct nand_oobinfo yaffs_oobinfo = {
 	.useecc = 1,
 	.eccpos = {8, 9, 10, 13, 14, 15}
 };
 
-struct nand_oobinfo yaffs_noeccinfo = {
+static struct nand_oobinfo yaffs_noeccinfo = {
 	.useecc = 0,
 };
 
diff --git a/fs/yaffs2/yaffs_ramem.c b/fs/yaffs2/yaffs_ramem.c
--- a/fs/yaffs2/yaffs_ramem.c
+++ b/fs/yaffs2/yaffs_ramem.c
@@ -100,7 +100,7 @@ static void nandemul_ReallyEraseBlock(in
 }
 
 
-int nandemul_CalcNBlocks(void)
+static int nandemul_CalcNBlocks(void)
 {
         switch(sizeInMB)
         {
@@ -259,7 +259,7 @@ int nandemul_ReadChunkFromNAND(yaffs_Dev
 }
 
 
-int nandemul_CheckChunkErased(yaffs_Device *dev,int chunkInNAND)
+static int nandemul_CheckChunkErased(yaffs_Device *dev,int chunkInNAND)
 {
 	int blk;
 	int pg;
diff --git a/fs/yaffs2/yaffs_ramem2k.c b/fs/yaffs2/yaffs_ramem2k.c
--- a/fs/yaffs2/yaffs_ramem2k.c
+++ b/fs/yaffs2/yaffs_ramem2k.c
@@ -262,7 +262,7 @@ int nandemul2k_ReadChunkWithTagsFromNAND
 }
 
 
-int nandemul2k_CheckChunkErased(yaffs_Device *dev,int chunkInNAND)
+static int nandemul2k_CheckChunkErased(yaffs_Device *dev,int chunkInNAND)
 {
 	int blk;
 	int pg;



More information about the yaffs mailing list