[Yaffs] [PATCH YAFFS2 04/15] fix-constness-in-decl-of-writeChunkWithTagsToNAND

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


Fix constness mixup in the declaration of writeChunkWithTagsToNAND.

In yaffs_guts.h the i4th arg of the writeChunkWithTagsToNAND method is
declared as "yaffs_ExtendedTags *" but in the correspondig implementation:
nandmtd2_WriteChunkWithTagsToNAND() & nandemul2k_WriteChunkWithTagsToNAND()
the same argument is declared as an const pointer of the same type.

Change the declaration of writeChunkWithTagsToNAND to also use the const.


-- Luc Van Oostenryck
-------------- next part --------------
diff --git a/fs/yaffs2/yaffs_guts.h b/fs/yaffs2/yaffs_guts.h
--- a/fs/yaffs2/yaffs_guts.h
+++ b/fs/yaffs2/yaffs_guts.h
@@ -537,7 +537,7 @@ struct yaffs_DeviceStruct
 	int (*initialiseNAND)(struct yaffs_DeviceStruct *dev);
 
 #ifdef CONFIG_YAFFS_YAFFS2
-	int (*writeChunkWithTagsToNAND)(struct yaffs_DeviceStruct *dev,int chunkInNAND, const __u8 *data, yaffs_ExtendedTags *tags);
+	int (*writeChunkWithTagsToNAND)(struct yaffs_DeviceStruct *dev,int chunkInNAND, const __u8 *data, const yaffs_ExtendedTags *tags);
 	int (*readChunkWithTagsFromNAND)(struct yaffs_DeviceStruct *dev,int chunkInNAND, __u8 *data, yaffs_ExtendedTags *tags);
 	int (*markNANDBlockBad)(struct yaffs_DeviceStruct *dev, int blockNo);
 	int (*queryNANDBlock)(struct yaffs_DeviceStruct *dev, int blockNo, yaffs_BlockState *state, int *sequenceNumber);



More information about the yaffs mailing list