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

Top Page
Attachments:
Message as email
+ (text/plain)
+ 04-fix-constness-in-decl-of-writeChunkWithTagsToNAND.diff (text/plain)
Delete this message
Reply to this message
Author: Luc Van Oostenryck
Date:  
To: yaffs
Old-Topics: [Yaffs] [PATCH YAFFS2 0/15] Pending patches.
Subject: [Yaffs] [PATCH YAFFS2 04/15] fix-constness-in-decl-of-writeChunkWithTagsToNAND
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
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);