From 399e637051f0912a625e74cb072cbc8528b054f8 Mon Sep 17 00:00:00 2001 From: marty Date: Sun, 31 Jul 2005 06:47:12 +0000 Subject: [PATCH] If kernel/config.h is included in yportenv.h, then yportenv.h must be always included. Move it outside of ifdef CONFIG_YAFFS_MTD_ENABLED. added in additional configuration conditionals to shut up gcc about defined but not used functions in yaffs_fs.c added in NOTYET around functions that aren't currently used in yaffs_tagscompat.c to shut up gcc about defined but not used function. --- yaffs_fs.c | 6 +++--- yaffs_mtdif.c | 6 +++--- yaffs_mtdif2.c | 6 +++--- yaffs_tagscompat.c | 12 +++++++----- 4 files changed, 16 insertions(+), 14 deletions(-) diff --git a/yaffs_fs.c b/yaffs_fs.c index ca78391..d5ca95b 100644 --- a/yaffs_fs.c +++ b/yaffs_fs.c @@ -30,7 +30,7 @@ */ -const char *yaffs_fs_c_version = "$Id: yaffs_fs.c,v 1.18 2005-07-31 04:09:26 marty Exp $"; +const char *yaffs_fs_c_version = "$Id: yaffs_fs.c,v 1.19 2005-07-31 06:47:12 marty Exp $"; extern const char *yaffs_guts_c_version; @@ -1826,6 +1826,7 @@ static int yaffs_proc_read( return buf-page < count ? buf-page : count; } +#ifdef CONFIG_YAFFS2_RAM_ENABLED static int yaffs_proc_ram_write( char *page, char **start, @@ -1839,8 +1840,7 @@ static int yaffs_proc_ram_write( printk(KERN_DEBUG "yaffs write size %d\n",count); return count; } - - +#endif // Stuff to handle installation of file systems struct file_system_to_install diff --git a/yaffs_mtdif.c b/yaffs_mtdif.c index 69d58fb..eeb0d8a 100644 --- a/yaffs_mtdif.c +++ b/yaffs_mtdif.c @@ -13,12 +13,12 @@ * */ -const char *yaffs_mtdif_c_version = "$Id: yaffs_mtdif.c,v 1.4 2005-07-31 04:08:08 marty Exp $"; - -#ifdef CONFIG_YAFFS_MTD_ENABLED +const char *yaffs_mtdif_c_version = "$Id: yaffs_mtdif.c,v 1.5 2005-07-31 06:47:12 marty Exp $"; #include "yportenv.h" +#ifdef CONFIG_YAFFS_MTD_ENABLED + #include "yaffs_mtdif.h" #include "linux/mtd/mtd.h" diff --git a/yaffs_mtdif2.c b/yaffs_mtdif2.c index c155433..f21b116 100644 --- a/yaffs_mtdif2.c +++ b/yaffs_mtdif2.c @@ -15,12 +15,12 @@ // mtd interface for YAFFS2 -const char *yaffs_mtdif2_c_version = "$Id: yaffs_mtdif2.c,v 1.3 2005-07-20 18:57:05 charles Exp $"; - -#ifdef CONFIG_YAFFS_MTD_ENABLED +const char *yaffs_mtdif2_c_version = "$Id: yaffs_mtdif2.c,v 1.4 2005-07-31 06:47:12 marty Exp $"; #include "yportenv.h" +#ifdef CONFIG_YAFFS_MTD_ENABLED + #include "yaffs_mtdif2.h" #include "linux/mtd/mtd.h" diff --git a/yaffs_tagscompat.c b/yaffs_tagscompat.c index 98b7b04..b9970ed 100644 --- a/yaffs_tagscompat.c +++ b/yaffs_tagscompat.c @@ -10,7 +10,7 @@ * it under the terms of the GNU General Public License version 2 as * published by the Free Software Foundation. * - * $Id: yaffs_tagscompat.c,v 1.2 2005-03-16 04:00:36 charles Exp $ + * $Id: yaffs_tagscompat.c,v 1.3 2005-07-31 06:47:12 marty Exp $ */ #include "yaffs_guts.h" @@ -18,11 +18,12 @@ #include "yaffs_ecc.h" static void yaffs_HandleReadDataError(yaffs_Device *dev,int chunkInNAND); +#ifdef NOTYET static void yaffs_CheckWrittenBlock(yaffs_Device *dev,int chunkInNAND); static void yaffs_HandleWriteChunkOk(yaffs_Device *dev,int chunkInNAND,const __u8 *data, const yaffs_Spare *spare); static void yaffs_HandleUpdateChunk(yaffs_Device *dev,int chunkInNAND, const yaffs_Spare *spare); static void yaffs_HandleWriteChunkError(yaffs_Device *dev,int chunkInNAND); - +#endif static const char yaffs_countBitsTable[256] = @@ -305,8 +306,7 @@ static int yaffs_ReadChunkFromNAND(struct yaffs_DeviceStruct *dev, return retVal; } - - +#ifdef NOTYET static int yaffs_CheckChunkErased(struct yaffs_DeviceStruct *dev,int chunkInNAND) { @@ -331,7 +331,7 @@ static int yaffs_CheckChunkErased(struct yaffs_DeviceStruct *dev,int chunkInNAND return YAFFS_OK; } - +#endif #if 0 int yaffs_EraseBlockInNAND(struct yaffs_DeviceStruct *dev,int blockInNAND) @@ -480,6 +480,7 @@ static void yaffs_HandleReadDataError(yaffs_Device *dev,int chunkInNAND) } +#ifdef NOTYET static void yaffs_CheckWrittenBlock(yaffs_Device *dev,int chunkInNAND) { } @@ -530,6 +531,7 @@ static int yaffs_VerifyCompare(const __u8 *d0, const __u8 * d1, const yaffs_Spar return 1; } +#endif /* NOTYET */ #if 0 typedef struct -- 2.30.2