[Yaffs] [PATCH] Fix constness of writeChunkWithTagsToNAND

Luc Van Oostenryck lkml at looxix.net
Wed Jul 20 01:44: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.
-------------- 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
@@ -534,7 +534,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