yaffsfs.c: Fix NULL dereference in yaffs_unmount2_reldev()
[yaffs2.git] / direct / test-framework / yaffs_nor_drv.c
index 7ac108aa2f6323392dacf4a411ea76019b68aca8..c642452daf2bb240cdc117d757eb3a1714f7719c 100644 (file)
@@ -1,8 +1,7 @@
 /*
  * YAFFS: Yet Another Flash File System. A NAND-flash specific file system.
  *
- * Copyright (C) 2002-2011 Aleph One Ltd.
- *   for Toby Churchill Ltd and Brightstar Engineering
+ * Copyright (C) 2002-2018 Aleph One Ltd.
  *
  * Created by Charles Manning <charles@aleph1.co.uk>
  *
@@ -199,6 +198,8 @@ static int nor_drv_ReadChunkFromNAND(struct yaffs_dev *dev,int nand_chunk,
        u32 *dataAddr = Chunk2DataAddr(dev,nand_chunk);
        u32 *spareAddr = Chunk2SpareAddr(dev,nand_chunk);
 
+       (void) data_len;
+
        if (data) {
                nor_drv_FlashRead32(dataAddr,(u32 *)data,dev->param.total_bytes_per_chunk / sizeof(u32));
        }
@@ -278,7 +279,7 @@ static int nor_drv_EraseBlockInNAND(struct yaffs_dev *dev, int blockNumber)
 
 static int nor_drv_InitialiseNAND(struct yaffs_dev *dev)
 {
-       int i;
+       u32 i;
 
        nor_drv_FlashInit();
        /* Go through the blocks formatting them if they are not formatted */