From d7b697d4ad0f4b5132e76af3f67680dc5d26e806 Mon Sep 17 00:00:00 2001
From: Gabor Juhos <juhosg@openwrt.org>
Date: Fri, 6 Jun 2008 13:14:59 +0000
Subject: [PATCH] generic-2.6: yaffs cleanup * reduce compiler warnings, *
 renumber/rename patches

SVN-Revision: 11379
---
 ...10-Yaffs.patch => 510-yaffs_support.patch} |  0
 .../511-yaffs_reduce_compiler_warnings.patch  | 80 +++++++++++++++++++
 ...10-Yaffs.patch => 510-yaffs_support.patch} |  0
 .../511-yaffs_reduce_compiler_warnings.patch  | 80 +++++++++++++++++++
 ...10-Yaffs.patch => 510-yaffs_support.patch} |  0
 .../511-yaffs_reduce_compiler_warnings.patch  | 80 +++++++++++++++++++
 ...10-Yaffs.patch => 510-yaffs_support.patch} |  0
 .../511-yaffs_reduce_compiler_warnings.patch  | 80 +++++++++++++++++++
 ...5_fix.patch => 512-yaffs_2.6.25_fix.patch} |  0
 ...10-Yaffs.patch => 510-yaffs_support.patch} |  0
 .../511-yaffs_reduce_compiler_warnings.patch  | 80 +++++++++++++++++++
 ...5_fix.patch => 512-yaffs_2.6.25_fix.patch} |  0
 ...10-Yaffs.patch => 510-yaffs_support.patch} |  0
 .../511-yaffs_reduce_compiler_warnings.patch  | 80 +++++++++++++++++++
 14 files changed, 480 insertions(+)
 rename target/linux/generic-2.6/patches-2.6.22/{510-Yaffs.patch => 510-yaffs_support.patch} (100%)
 create mode 100644 target/linux/generic-2.6/patches-2.6.22/511-yaffs_reduce_compiler_warnings.patch
 rename target/linux/generic-2.6/patches-2.6.23/{510-Yaffs.patch => 510-yaffs_support.patch} (100%)
 create mode 100644 target/linux/generic-2.6/patches-2.6.23/511-yaffs_reduce_compiler_warnings.patch
 rename target/linux/generic-2.6/patches-2.6.24/{510-Yaffs.patch => 510-yaffs_support.patch} (100%)
 create mode 100644 target/linux/generic-2.6/patches-2.6.24/511-yaffs_reduce_compiler_warnings.patch
 rename target/linux/generic-2.6/patches-2.6.25/{510-Yaffs.patch => 510-yaffs_support.patch} (100%)
 create mode 100644 target/linux/generic-2.6/patches-2.6.25/511-yaffs_reduce_compiler_warnings.patch
 rename target/linux/generic-2.6/patches-2.6.25/{511-yaffs_2.6.25_fix.patch => 512-yaffs_2.6.25_fix.patch} (100%)
 rename target/linux/generic-2.6/patches-2.6.26/{510-Yaffs.patch => 510-yaffs_support.patch} (100%)
 create mode 100644 target/linux/generic-2.6/patches-2.6.26/511-yaffs_reduce_compiler_warnings.patch
 rename target/linux/generic-2.6/patches-2.6.26/{511-yaffs_2.6.25_fix.patch => 512-yaffs_2.6.25_fix.patch} (100%)
 rename target/linux/generic-2.6/patches/{510-Yaffs.patch => 510-yaffs_support.patch} (100%)
 create mode 100644 target/linux/generic-2.6/patches/511-yaffs_reduce_compiler_warnings.patch

diff --git a/target/linux/generic-2.6/patches-2.6.22/510-Yaffs.patch b/target/linux/generic-2.6/patches-2.6.22/510-yaffs_support.patch
similarity index 100%
rename from target/linux/generic-2.6/patches-2.6.22/510-Yaffs.patch
rename to target/linux/generic-2.6/patches-2.6.22/510-yaffs_support.patch
diff --git a/target/linux/generic-2.6/patches-2.6.22/511-yaffs_reduce_compiler_warnings.patch b/target/linux/generic-2.6/patches-2.6.22/511-yaffs_reduce_compiler_warnings.patch
new file mode 100644
index 0000000000..61d0a7552c
--- /dev/null
+++ b/target/linux/generic-2.6/patches-2.6.22/511-yaffs_reduce_compiler_warnings.patch
@@ -0,0 +1,80 @@
+--- a/fs/yaffs2/yaffs_fs.c
++++ b/fs/yaffs2/yaffs_fs.c
+@@ -969,7 +970,7 @@
+ 		f->f_version = inode->i_version;
+ 	}
+ 
+-	list_for_each(i, &obj->variant.directoryVariant.children) {
++	list_for_each(i, (struct list_head *)&obj->variant.directoryVariant.children) {
+ 		curoffs++;
+ 		if (curoffs >= offset) {
+ 			l = list_entry(i, yaffs_Object, siblings);
+@@ -1273,7 +1275,7 @@
+ 
+ 	if (target &&
+ 	    target->variantType == YAFFS_OBJECT_TYPE_DIRECTORY &&
+-	    !list_empty(&target->variant.directoryVariant.children)) {
++	    !list_empty((struct list_head *)&target->variant.directoryVariant.children)) {
+ 
+ 	        T(YAFFS_TRACE_OS, (KERN_DEBUG "target is non-empty dir\n"));
+ 
+@@ -1529,7 +1531,7 @@
+ 	yaffs_GrossUnlock(dev);
+ 
+ 	/* we assume this is protected by lock_kernel() in mount/umount */
+-	list_del(&dev->devList);
++	list_del((struct list_head *)&dev->devList);
+ 
+ 	if(dev->spareBuffer){
+ 		YFREE(dev->spareBuffer);
+@@ -1864,7 +1866,7 @@
+ 	dev->skipCheckpointWrite = options.skip_checkpoint_write;
+ 
+ 	/* we assume this is protected by lock_kernel() in mount/umount */
+-	list_add_tail(&dev->devList, &yaffs_dev_list);
++	list_add_tail((struct list_head *)&dev->devList, &yaffs_dev_list);
+ 
+ 	init_MUTEX(&dev->grossLock);
+ 
+--- a/fs/yaffs2/yaffs_mtdif1.c
++++ b/fs/yaffs2/yaffs_mtdif1.c
+@@ -323,7 +323,7 @@
+  * Always returns YAFFS_OK.
+  */
+ int nandmtd1_QueryNANDBlock(struct yaffs_DeviceStruct *dev, int blockNo,
+-	yaffs_BlockState * pState, int *pSequenceNumber)
++	yaffs_BlockState * pState, __u32 *pSequenceNumber)
+ {
+ 	struct mtd_info * mtd = dev->genericDevice;
+ 	int chunkNo = blockNo * dev->nChunksPerBlock;
+--- a/fs/yaffs2/yaffs_mtdif1.h
++++ b/fs/yaffs2/yaffs_mtdif1.h
+@@ -23,6 +23,6 @@
+ int nandmtd1_MarkNANDBlockBad(struct yaffs_DeviceStruct *dev, int blockNo);
+ 
+ int nandmtd1_QueryNANDBlock(struct yaffs_DeviceStruct *dev, int blockNo,
+-	yaffs_BlockState * state, int *sequenceNumber);
++	yaffs_BlockState * state, __u32 *sequenceNumber);
+ 
+ #endif
+--- a/fs/yaffs2/yaffs_mtdif2.c
++++ b/fs/yaffs2/yaffs_mtdif2.c
+@@ -204,7 +204,7 @@
+ }
+ 
+ int nandmtd2_QueryNANDBlock(struct yaffs_DeviceStruct *dev, int blockNo,
+-			    yaffs_BlockState * state, int *sequenceNumber)
++			    yaffs_BlockState * state, __u32 *sequenceNumber)
+ {
+ 	struct mtd_info *mtd = (struct mtd_info *)(dev->genericDevice);
+ 	int retval;
+--- a/fs/yaffs2/yaffs_mtdif2.h
++++ b/fs/yaffs2/yaffs_mtdif2.h
+@@ -24,6 +24,6 @@
+ 				       __u8 * data, yaffs_ExtendedTags * tags);
+ int nandmtd2_MarkNANDBlockBad(struct yaffs_DeviceStruct *dev, int blockNo);
+ int nandmtd2_QueryNANDBlock(struct yaffs_DeviceStruct *dev, int blockNo,
+-			    yaffs_BlockState * state, int *sequenceNumber);
++			    yaffs_BlockState * state, __u32 *sequenceNumber);
+ 
+ #endif
diff --git a/target/linux/generic-2.6/patches-2.6.23/510-Yaffs.patch b/target/linux/generic-2.6/patches-2.6.23/510-yaffs_support.patch
similarity index 100%
rename from target/linux/generic-2.6/patches-2.6.23/510-Yaffs.patch
rename to target/linux/generic-2.6/patches-2.6.23/510-yaffs_support.patch
diff --git a/target/linux/generic-2.6/patches-2.6.23/511-yaffs_reduce_compiler_warnings.patch b/target/linux/generic-2.6/patches-2.6.23/511-yaffs_reduce_compiler_warnings.patch
new file mode 100644
index 0000000000..61d0a7552c
--- /dev/null
+++ b/target/linux/generic-2.6/patches-2.6.23/511-yaffs_reduce_compiler_warnings.patch
@@ -0,0 +1,80 @@
+--- a/fs/yaffs2/yaffs_fs.c
++++ b/fs/yaffs2/yaffs_fs.c
+@@ -969,7 +970,7 @@
+ 		f->f_version = inode->i_version;
+ 	}
+ 
+-	list_for_each(i, &obj->variant.directoryVariant.children) {
++	list_for_each(i, (struct list_head *)&obj->variant.directoryVariant.children) {
+ 		curoffs++;
+ 		if (curoffs >= offset) {
+ 			l = list_entry(i, yaffs_Object, siblings);
+@@ -1273,7 +1275,7 @@
+ 
+ 	if (target &&
+ 	    target->variantType == YAFFS_OBJECT_TYPE_DIRECTORY &&
+-	    !list_empty(&target->variant.directoryVariant.children)) {
++	    !list_empty((struct list_head *)&target->variant.directoryVariant.children)) {
+ 
+ 	        T(YAFFS_TRACE_OS, (KERN_DEBUG "target is non-empty dir\n"));
+ 
+@@ -1529,7 +1531,7 @@
+ 	yaffs_GrossUnlock(dev);
+ 
+ 	/* we assume this is protected by lock_kernel() in mount/umount */
+-	list_del(&dev->devList);
++	list_del((struct list_head *)&dev->devList);
+ 
+ 	if(dev->spareBuffer){
+ 		YFREE(dev->spareBuffer);
+@@ -1864,7 +1866,7 @@
+ 	dev->skipCheckpointWrite = options.skip_checkpoint_write;
+ 
+ 	/* we assume this is protected by lock_kernel() in mount/umount */
+-	list_add_tail(&dev->devList, &yaffs_dev_list);
++	list_add_tail((struct list_head *)&dev->devList, &yaffs_dev_list);
+ 
+ 	init_MUTEX(&dev->grossLock);
+ 
+--- a/fs/yaffs2/yaffs_mtdif1.c
++++ b/fs/yaffs2/yaffs_mtdif1.c
+@@ -323,7 +323,7 @@
+  * Always returns YAFFS_OK.
+  */
+ int nandmtd1_QueryNANDBlock(struct yaffs_DeviceStruct *dev, int blockNo,
+-	yaffs_BlockState * pState, int *pSequenceNumber)
++	yaffs_BlockState * pState, __u32 *pSequenceNumber)
+ {
+ 	struct mtd_info * mtd = dev->genericDevice;
+ 	int chunkNo = blockNo * dev->nChunksPerBlock;
+--- a/fs/yaffs2/yaffs_mtdif1.h
++++ b/fs/yaffs2/yaffs_mtdif1.h
+@@ -23,6 +23,6 @@
+ int nandmtd1_MarkNANDBlockBad(struct yaffs_DeviceStruct *dev, int blockNo);
+ 
+ int nandmtd1_QueryNANDBlock(struct yaffs_DeviceStruct *dev, int blockNo,
+-	yaffs_BlockState * state, int *sequenceNumber);
++	yaffs_BlockState * state, __u32 *sequenceNumber);
+ 
+ #endif
+--- a/fs/yaffs2/yaffs_mtdif2.c
++++ b/fs/yaffs2/yaffs_mtdif2.c
+@@ -204,7 +204,7 @@
+ }
+ 
+ int nandmtd2_QueryNANDBlock(struct yaffs_DeviceStruct *dev, int blockNo,
+-			    yaffs_BlockState * state, int *sequenceNumber)
++			    yaffs_BlockState * state, __u32 *sequenceNumber)
+ {
+ 	struct mtd_info *mtd = (struct mtd_info *)(dev->genericDevice);
+ 	int retval;
+--- a/fs/yaffs2/yaffs_mtdif2.h
++++ b/fs/yaffs2/yaffs_mtdif2.h
+@@ -24,6 +24,6 @@
+ 				       __u8 * data, yaffs_ExtendedTags * tags);
+ int nandmtd2_MarkNANDBlockBad(struct yaffs_DeviceStruct *dev, int blockNo);
+ int nandmtd2_QueryNANDBlock(struct yaffs_DeviceStruct *dev, int blockNo,
+-			    yaffs_BlockState * state, int *sequenceNumber);
++			    yaffs_BlockState * state, __u32 *sequenceNumber);
+ 
+ #endif
diff --git a/target/linux/generic-2.6/patches-2.6.24/510-Yaffs.patch b/target/linux/generic-2.6/patches-2.6.24/510-yaffs_support.patch
similarity index 100%
rename from target/linux/generic-2.6/patches-2.6.24/510-Yaffs.patch
rename to target/linux/generic-2.6/patches-2.6.24/510-yaffs_support.patch
diff --git a/target/linux/generic-2.6/patches-2.6.24/511-yaffs_reduce_compiler_warnings.patch b/target/linux/generic-2.6/patches-2.6.24/511-yaffs_reduce_compiler_warnings.patch
new file mode 100644
index 0000000000..118cb67c37
--- /dev/null
+++ b/target/linux/generic-2.6/patches-2.6.24/511-yaffs_reduce_compiler_warnings.patch
@@ -0,0 +1,80 @@
+--- a/fs/yaffs2/yaffs_fs.c
++++ b/fs/yaffs2/yaffs_fs.c
+@@ -969,7 +969,7 @@
+ 		f->f_version = inode->i_version;
+ 	}
+ 
+-	list_for_each(i, &obj->variant.directoryVariant.children) {
++	list_for_each(i, (struct list_head *)&obj->variant.directoryVariant.children) {
+ 		curoffs++;
+ 		if (curoffs >= offset) {
+ 			l = list_entry(i, yaffs_Object, siblings);
+@@ -1273,7 +1273,7 @@
+ 
+ 	if (target &&
+ 	    target->variantType == YAFFS_OBJECT_TYPE_DIRECTORY &&
+-	    !list_empty(&target->variant.directoryVariant.children)) {
++	    !list_empty((struct list_head *)&target->variant.directoryVariant.children)) {
+ 
+ 	        T(YAFFS_TRACE_OS, (KERN_DEBUG "target is non-empty dir\n"));
+ 
+@@ -1529,7 +1529,7 @@
+ 	yaffs_GrossUnlock(dev);
+ 
+ 	/* we assume this is protected by lock_kernel() in mount/umount */
+-	list_del(&dev->devList);
++	list_del((struct list_head *)&dev->devList);
+ 
+ 	if(dev->spareBuffer){
+ 		YFREE(dev->spareBuffer);
+@@ -1864,7 +1864,7 @@
+ 	dev->skipCheckpointWrite = options.skip_checkpoint_write;
+ 
+ 	/* we assume this is protected by lock_kernel() in mount/umount */
+-	list_add_tail(&dev->devList, &yaffs_dev_list);
++	list_add_tail((struct list_head *)&dev->devList, &yaffs_dev_list);
+ 
+ 	init_MUTEX(&dev->grossLock);
+ 
+--- a/fs/yaffs2/yaffs_mtdif1.c
++++ b/fs/yaffs2/yaffs_mtdif1.c
+@@ -323,7 +323,7 @@
+  * Always returns YAFFS_OK.
+  */
+ int nandmtd1_QueryNANDBlock(struct yaffs_DeviceStruct *dev, int blockNo,
+-	yaffs_BlockState * pState, int *pSequenceNumber)
++	yaffs_BlockState * pState, __u32 *pSequenceNumber)
+ {
+ 	struct mtd_info * mtd = dev->genericDevice;
+ 	int chunkNo = blockNo * dev->nChunksPerBlock;
+--- a/fs/yaffs2/yaffs_mtdif1.h
++++ b/fs/yaffs2/yaffs_mtdif1.h
+@@ -23,6 +23,6 @@
+ int nandmtd1_MarkNANDBlockBad(struct yaffs_DeviceStruct *dev, int blockNo);
+ 
+ int nandmtd1_QueryNANDBlock(struct yaffs_DeviceStruct *dev, int blockNo,
+-	yaffs_BlockState * state, int *sequenceNumber);
++	yaffs_BlockState * state, __u32 *sequenceNumber);
+ 
+ #endif
+--- a/fs/yaffs2/yaffs_mtdif2.c
++++ b/fs/yaffs2/yaffs_mtdif2.c
+@@ -204,7 +204,7 @@
+ }
+ 
+ int nandmtd2_QueryNANDBlock(struct yaffs_DeviceStruct *dev, int blockNo,
+-			    yaffs_BlockState * state, int *sequenceNumber)
++			    yaffs_BlockState * state, __u32 *sequenceNumber)
+ {
+ 	struct mtd_info *mtd = (struct mtd_info *)(dev->genericDevice);
+ 	int retval;
+--- a/fs/yaffs2/yaffs_mtdif2.h
++++ b/fs/yaffs2/yaffs_mtdif2.h
+@@ -24,6 +24,6 @@
+ 				       __u8 * data, yaffs_ExtendedTags * tags);
+ int nandmtd2_MarkNANDBlockBad(struct yaffs_DeviceStruct *dev, int blockNo);
+ int nandmtd2_QueryNANDBlock(struct yaffs_DeviceStruct *dev, int blockNo,
+-			    yaffs_BlockState * state, int *sequenceNumber);
++			    yaffs_BlockState * state, __u32 *sequenceNumber);
+ 
+ #endif
diff --git a/target/linux/generic-2.6/patches-2.6.25/510-Yaffs.patch b/target/linux/generic-2.6/patches-2.6.25/510-yaffs_support.patch
similarity index 100%
rename from target/linux/generic-2.6/patches-2.6.25/510-Yaffs.patch
rename to target/linux/generic-2.6/patches-2.6.25/510-yaffs_support.patch
diff --git a/target/linux/generic-2.6/patches-2.6.25/511-yaffs_reduce_compiler_warnings.patch b/target/linux/generic-2.6/patches-2.6.25/511-yaffs_reduce_compiler_warnings.patch
new file mode 100644
index 0000000000..61d0a7552c
--- /dev/null
+++ b/target/linux/generic-2.6/patches-2.6.25/511-yaffs_reduce_compiler_warnings.patch
@@ -0,0 +1,80 @@
+--- a/fs/yaffs2/yaffs_fs.c
++++ b/fs/yaffs2/yaffs_fs.c
+@@ -969,7 +970,7 @@
+ 		f->f_version = inode->i_version;
+ 	}
+ 
+-	list_for_each(i, &obj->variant.directoryVariant.children) {
++	list_for_each(i, (struct list_head *)&obj->variant.directoryVariant.children) {
+ 		curoffs++;
+ 		if (curoffs >= offset) {
+ 			l = list_entry(i, yaffs_Object, siblings);
+@@ -1273,7 +1275,7 @@
+ 
+ 	if (target &&
+ 	    target->variantType == YAFFS_OBJECT_TYPE_DIRECTORY &&
+-	    !list_empty(&target->variant.directoryVariant.children)) {
++	    !list_empty((struct list_head *)&target->variant.directoryVariant.children)) {
+ 
+ 	        T(YAFFS_TRACE_OS, (KERN_DEBUG "target is non-empty dir\n"));
+ 
+@@ -1529,7 +1531,7 @@
+ 	yaffs_GrossUnlock(dev);
+ 
+ 	/* we assume this is protected by lock_kernel() in mount/umount */
+-	list_del(&dev->devList);
++	list_del((struct list_head *)&dev->devList);
+ 
+ 	if(dev->spareBuffer){
+ 		YFREE(dev->spareBuffer);
+@@ -1864,7 +1866,7 @@
+ 	dev->skipCheckpointWrite = options.skip_checkpoint_write;
+ 
+ 	/* we assume this is protected by lock_kernel() in mount/umount */
+-	list_add_tail(&dev->devList, &yaffs_dev_list);
++	list_add_tail((struct list_head *)&dev->devList, &yaffs_dev_list);
+ 
+ 	init_MUTEX(&dev->grossLock);
+ 
+--- a/fs/yaffs2/yaffs_mtdif1.c
++++ b/fs/yaffs2/yaffs_mtdif1.c
+@@ -323,7 +323,7 @@
+  * Always returns YAFFS_OK.
+  */
+ int nandmtd1_QueryNANDBlock(struct yaffs_DeviceStruct *dev, int blockNo,
+-	yaffs_BlockState * pState, int *pSequenceNumber)
++	yaffs_BlockState * pState, __u32 *pSequenceNumber)
+ {
+ 	struct mtd_info * mtd = dev->genericDevice;
+ 	int chunkNo = blockNo * dev->nChunksPerBlock;
+--- a/fs/yaffs2/yaffs_mtdif1.h
++++ b/fs/yaffs2/yaffs_mtdif1.h
+@@ -23,6 +23,6 @@
+ int nandmtd1_MarkNANDBlockBad(struct yaffs_DeviceStruct *dev, int blockNo);
+ 
+ int nandmtd1_QueryNANDBlock(struct yaffs_DeviceStruct *dev, int blockNo,
+-	yaffs_BlockState * state, int *sequenceNumber);
++	yaffs_BlockState * state, __u32 *sequenceNumber);
+ 
+ #endif
+--- a/fs/yaffs2/yaffs_mtdif2.c
++++ b/fs/yaffs2/yaffs_mtdif2.c
+@@ -204,7 +204,7 @@
+ }
+ 
+ int nandmtd2_QueryNANDBlock(struct yaffs_DeviceStruct *dev, int blockNo,
+-			    yaffs_BlockState * state, int *sequenceNumber)
++			    yaffs_BlockState * state, __u32 *sequenceNumber)
+ {
+ 	struct mtd_info *mtd = (struct mtd_info *)(dev->genericDevice);
+ 	int retval;
+--- a/fs/yaffs2/yaffs_mtdif2.h
++++ b/fs/yaffs2/yaffs_mtdif2.h
+@@ -24,6 +24,6 @@
+ 				       __u8 * data, yaffs_ExtendedTags * tags);
+ int nandmtd2_MarkNANDBlockBad(struct yaffs_DeviceStruct *dev, int blockNo);
+ int nandmtd2_QueryNANDBlock(struct yaffs_DeviceStruct *dev, int blockNo,
+-			    yaffs_BlockState * state, int *sequenceNumber);
++			    yaffs_BlockState * state, __u32 *sequenceNumber);
+ 
+ #endif
diff --git a/target/linux/generic-2.6/patches-2.6.25/511-yaffs_2.6.25_fix.patch b/target/linux/generic-2.6/patches-2.6.25/512-yaffs_2.6.25_fix.patch
similarity index 100%
rename from target/linux/generic-2.6/patches-2.6.25/511-yaffs_2.6.25_fix.patch
rename to target/linux/generic-2.6/patches-2.6.25/512-yaffs_2.6.25_fix.patch
diff --git a/target/linux/generic-2.6/patches-2.6.26/510-Yaffs.patch b/target/linux/generic-2.6/patches-2.6.26/510-yaffs_support.patch
similarity index 100%
rename from target/linux/generic-2.6/patches-2.6.26/510-Yaffs.patch
rename to target/linux/generic-2.6/patches-2.6.26/510-yaffs_support.patch
diff --git a/target/linux/generic-2.6/patches-2.6.26/511-yaffs_reduce_compiler_warnings.patch b/target/linux/generic-2.6/patches-2.6.26/511-yaffs_reduce_compiler_warnings.patch
new file mode 100644
index 0000000000..61d0a7552c
--- /dev/null
+++ b/target/linux/generic-2.6/patches-2.6.26/511-yaffs_reduce_compiler_warnings.patch
@@ -0,0 +1,80 @@
+--- a/fs/yaffs2/yaffs_fs.c
++++ b/fs/yaffs2/yaffs_fs.c
+@@ -969,7 +970,7 @@
+ 		f->f_version = inode->i_version;
+ 	}
+ 
+-	list_for_each(i, &obj->variant.directoryVariant.children) {
++	list_for_each(i, (struct list_head *)&obj->variant.directoryVariant.children) {
+ 		curoffs++;
+ 		if (curoffs >= offset) {
+ 			l = list_entry(i, yaffs_Object, siblings);
+@@ -1273,7 +1275,7 @@
+ 
+ 	if (target &&
+ 	    target->variantType == YAFFS_OBJECT_TYPE_DIRECTORY &&
+-	    !list_empty(&target->variant.directoryVariant.children)) {
++	    !list_empty((struct list_head *)&target->variant.directoryVariant.children)) {
+ 
+ 	        T(YAFFS_TRACE_OS, (KERN_DEBUG "target is non-empty dir\n"));
+ 
+@@ -1529,7 +1531,7 @@
+ 	yaffs_GrossUnlock(dev);
+ 
+ 	/* we assume this is protected by lock_kernel() in mount/umount */
+-	list_del(&dev->devList);
++	list_del((struct list_head *)&dev->devList);
+ 
+ 	if(dev->spareBuffer){
+ 		YFREE(dev->spareBuffer);
+@@ -1864,7 +1866,7 @@
+ 	dev->skipCheckpointWrite = options.skip_checkpoint_write;
+ 
+ 	/* we assume this is protected by lock_kernel() in mount/umount */
+-	list_add_tail(&dev->devList, &yaffs_dev_list);
++	list_add_tail((struct list_head *)&dev->devList, &yaffs_dev_list);
+ 
+ 	init_MUTEX(&dev->grossLock);
+ 
+--- a/fs/yaffs2/yaffs_mtdif1.c
++++ b/fs/yaffs2/yaffs_mtdif1.c
+@@ -323,7 +323,7 @@
+  * Always returns YAFFS_OK.
+  */
+ int nandmtd1_QueryNANDBlock(struct yaffs_DeviceStruct *dev, int blockNo,
+-	yaffs_BlockState * pState, int *pSequenceNumber)
++	yaffs_BlockState * pState, __u32 *pSequenceNumber)
+ {
+ 	struct mtd_info * mtd = dev->genericDevice;
+ 	int chunkNo = blockNo * dev->nChunksPerBlock;
+--- a/fs/yaffs2/yaffs_mtdif1.h
++++ b/fs/yaffs2/yaffs_mtdif1.h
+@@ -23,6 +23,6 @@
+ int nandmtd1_MarkNANDBlockBad(struct yaffs_DeviceStruct *dev, int blockNo);
+ 
+ int nandmtd1_QueryNANDBlock(struct yaffs_DeviceStruct *dev, int blockNo,
+-	yaffs_BlockState * state, int *sequenceNumber);
++	yaffs_BlockState * state, __u32 *sequenceNumber);
+ 
+ #endif
+--- a/fs/yaffs2/yaffs_mtdif2.c
++++ b/fs/yaffs2/yaffs_mtdif2.c
+@@ -204,7 +204,7 @@
+ }
+ 
+ int nandmtd2_QueryNANDBlock(struct yaffs_DeviceStruct *dev, int blockNo,
+-			    yaffs_BlockState * state, int *sequenceNumber)
++			    yaffs_BlockState * state, __u32 *sequenceNumber)
+ {
+ 	struct mtd_info *mtd = (struct mtd_info *)(dev->genericDevice);
+ 	int retval;
+--- a/fs/yaffs2/yaffs_mtdif2.h
++++ b/fs/yaffs2/yaffs_mtdif2.h
+@@ -24,6 +24,6 @@
+ 				       __u8 * data, yaffs_ExtendedTags * tags);
+ int nandmtd2_MarkNANDBlockBad(struct yaffs_DeviceStruct *dev, int blockNo);
+ int nandmtd2_QueryNANDBlock(struct yaffs_DeviceStruct *dev, int blockNo,
+-			    yaffs_BlockState * state, int *sequenceNumber);
++			    yaffs_BlockState * state, __u32 *sequenceNumber);
+ 
+ #endif
diff --git a/target/linux/generic-2.6/patches-2.6.26/511-yaffs_2.6.25_fix.patch b/target/linux/generic-2.6/patches-2.6.26/512-yaffs_2.6.25_fix.patch
similarity index 100%
rename from target/linux/generic-2.6/patches-2.6.26/511-yaffs_2.6.25_fix.patch
rename to target/linux/generic-2.6/patches-2.6.26/512-yaffs_2.6.25_fix.patch
diff --git a/target/linux/generic-2.6/patches/510-Yaffs.patch b/target/linux/generic-2.6/patches/510-yaffs_support.patch
similarity index 100%
rename from target/linux/generic-2.6/patches/510-Yaffs.patch
rename to target/linux/generic-2.6/patches/510-yaffs_support.patch
diff --git a/target/linux/generic-2.6/patches/511-yaffs_reduce_compiler_warnings.patch b/target/linux/generic-2.6/patches/511-yaffs_reduce_compiler_warnings.patch
new file mode 100644
index 0000000000..61d0a7552c
--- /dev/null
+++ b/target/linux/generic-2.6/patches/511-yaffs_reduce_compiler_warnings.patch
@@ -0,0 +1,80 @@
+--- a/fs/yaffs2/yaffs_fs.c
++++ b/fs/yaffs2/yaffs_fs.c
+@@ -969,7 +970,7 @@
+ 		f->f_version = inode->i_version;
+ 	}
+ 
+-	list_for_each(i, &obj->variant.directoryVariant.children) {
++	list_for_each(i, (struct list_head *)&obj->variant.directoryVariant.children) {
+ 		curoffs++;
+ 		if (curoffs >= offset) {
+ 			l = list_entry(i, yaffs_Object, siblings);
+@@ -1273,7 +1275,7 @@
+ 
+ 	if (target &&
+ 	    target->variantType == YAFFS_OBJECT_TYPE_DIRECTORY &&
+-	    !list_empty(&target->variant.directoryVariant.children)) {
++	    !list_empty((struct list_head *)&target->variant.directoryVariant.children)) {
+ 
+ 	        T(YAFFS_TRACE_OS, (KERN_DEBUG "target is non-empty dir\n"));
+ 
+@@ -1529,7 +1531,7 @@
+ 	yaffs_GrossUnlock(dev);
+ 
+ 	/* we assume this is protected by lock_kernel() in mount/umount */
+-	list_del(&dev->devList);
++	list_del((struct list_head *)&dev->devList);
+ 
+ 	if(dev->spareBuffer){
+ 		YFREE(dev->spareBuffer);
+@@ -1864,7 +1866,7 @@
+ 	dev->skipCheckpointWrite = options.skip_checkpoint_write;
+ 
+ 	/* we assume this is protected by lock_kernel() in mount/umount */
+-	list_add_tail(&dev->devList, &yaffs_dev_list);
++	list_add_tail((struct list_head *)&dev->devList, &yaffs_dev_list);
+ 
+ 	init_MUTEX(&dev->grossLock);
+ 
+--- a/fs/yaffs2/yaffs_mtdif1.c
++++ b/fs/yaffs2/yaffs_mtdif1.c
+@@ -323,7 +323,7 @@
+  * Always returns YAFFS_OK.
+  */
+ int nandmtd1_QueryNANDBlock(struct yaffs_DeviceStruct *dev, int blockNo,
+-	yaffs_BlockState * pState, int *pSequenceNumber)
++	yaffs_BlockState * pState, __u32 *pSequenceNumber)
+ {
+ 	struct mtd_info * mtd = dev->genericDevice;
+ 	int chunkNo = blockNo * dev->nChunksPerBlock;
+--- a/fs/yaffs2/yaffs_mtdif1.h
++++ b/fs/yaffs2/yaffs_mtdif1.h
+@@ -23,6 +23,6 @@
+ int nandmtd1_MarkNANDBlockBad(struct yaffs_DeviceStruct *dev, int blockNo);
+ 
+ int nandmtd1_QueryNANDBlock(struct yaffs_DeviceStruct *dev, int blockNo,
+-	yaffs_BlockState * state, int *sequenceNumber);
++	yaffs_BlockState * state, __u32 *sequenceNumber);
+ 
+ #endif
+--- a/fs/yaffs2/yaffs_mtdif2.c
++++ b/fs/yaffs2/yaffs_mtdif2.c
+@@ -204,7 +204,7 @@
+ }
+ 
+ int nandmtd2_QueryNANDBlock(struct yaffs_DeviceStruct *dev, int blockNo,
+-			    yaffs_BlockState * state, int *sequenceNumber)
++			    yaffs_BlockState * state, __u32 *sequenceNumber)
+ {
+ 	struct mtd_info *mtd = (struct mtd_info *)(dev->genericDevice);
+ 	int retval;
+--- a/fs/yaffs2/yaffs_mtdif2.h
++++ b/fs/yaffs2/yaffs_mtdif2.h
+@@ -24,6 +24,6 @@
+ 				       __u8 * data, yaffs_ExtendedTags * tags);
+ int nandmtd2_MarkNANDBlockBad(struct yaffs_DeviceStruct *dev, int blockNo);
+ int nandmtd2_QueryNANDBlock(struct yaffs_DeviceStruct *dev, int blockNo,
+-			    yaffs_BlockState * state, int *sequenceNumber);
++			    yaffs_BlockState * state, __u32 *sequenceNumber);
+ 
+ #endif
-- 
2.30.2