yaffs: Change __uxx types to uxx
authorCharles Manning <cdhmanning@gmail.com>
Mon, 1 Nov 2010 19:04:32 +0000 (08:04 +1300)
committerCharles Manning <cdhmanning@gmail.com>
Mon, 1 Nov 2010 19:04:32 +0000 (08:04 +1300)
__u32 -> u32 and such.

Signed-off-by: Charles Manning <cdhmanning@gmail.com>
51 files changed:
devextras.h
direct/basic-test/dtest.c
direct/basic-test/yaffs_fileem.c
direct/basic-test/yaffs_fileem2k.c
direct/basic-test/yaffs_norif1.c
direct/basic-test/yaffs_norif1.h
direct/basic-test/yaffs_ramdisk.c
direct/basic-test/yaffs_ramdisk.h
direct/basic-test/yaffs_ramem2k.c
direct/basic-test/yaffscfg.c
direct/basic-test/yaffscfg2k.c
direct/basic-test/yaffsnewcfg.c
direct/basic-test/ynorsim.c
direct/basic-test/ynorsim.h
direct/basic-test/yramsim.c
direct/basic-test/yramsim.h
direct/yaffs_flashif.c
direct/yaffs_flashif.h
direct/yaffs_flashif2.h
direct/yaffs_nandemul2k.h
direct/yaffs_nandif.c
direct/yaffs_nandif.h
direct/yaffscfg.h
direct/yaffsfs.c
mtdemul/nandemul2k.c
patches/yaffs_mtdif2.c
utils/mkyaffs2image.c
utils/mkyaffsimage.c
yaffs_allocator.c
yaffs_bitmap.c
yaffs_checkptrw.c
yaffs_checkptrw.h
yaffs_guts.c
yaffs_guts.h
yaffs_linux.h
yaffs_mtd1f1_single.c
yaffs_mtd1f2_single.c
yaffs_mtdif.c
yaffs_mtdif1.h
yaffs_mtdif2.h
yaffs_nand.c
yaffs_nand.h
yaffs_packedtags1.c
yaffs_tagscompat.c
yaffs_tagscompat.h
yaffs_verify.c
yaffs_vfs_multi.c
yaffs_vfs_single.c
yaffs_yaffs1.c
yaffs_yaffs2.c
yaffs_yaffs2.h

index ce30c820d938818ccce765fbe7cfe517dabc84cc..baadeffa049094a717ba635d996918db7d091e5f 100644 (file)
@@ -29,9 +29,9 @@
 #if !(defined __KERNEL__)
 
 /* Definition of types */
-typedef unsigned char __u8;
-typedef unsigned short __u16;
-typedef unsigned __u32;
+typedef unsigned char u8;
+typedef unsigned short u16;
+typedef unsigned u32;
 
 #endif
 
index 691ffe2921842d8b764a4ae584ab21959fc517f3..a0106a9887a1a469dc75b5e9b3e4f2a8c6817a7d 100644 (file)
@@ -2516,7 +2516,7 @@ static void print_xattrib_val(const char *path, const char *name)
 
        n = yaffs_getxattr(path,name,buffer,sizeof(buffer));
        if(n >= 0){
-               __u8 *b = (__u8 *)buffer;
+               u8 *b = (u8 *)buffer;
 
                printf("%d bytes:",n);
                if(n > 10)
index 419b16f756c1558a937c08a78e4335f613fd1850..330e0dcadb47db7068b4d90dd9f494b6e6b2a99a 100644 (file)
@@ -43,7 +43,7 @@ const char *yaffs_flashif_c_version = "$Id: yaffs_fileem.c,v 1.7 2010-02-18 01:1
 
 typedef struct 
 {
-       __u8 data[528]; // Data + spare
+       u8 data[528]; // Data + spare
 } yflash_Page;
 
 typedef struct
@@ -118,7 +118,7 @@ static int  CheckInit(yaffs_dev_t *dev)
        return 1;
 }
 
-int yflash_WriteChunkToNAND(yaffs_dev_t *dev,int nand_chunk,const __u8 *data, const yaffs_spare *spare)
+int yflash_WriteChunkToNAND(yaffs_dev_t *dev,int nand_chunk,const u8 *data, const yaffs_spare *spare)
 {
        int written;
 
@@ -148,7 +148,7 @@ int yflash_WriteChunkToNAND(yaffs_dev_t *dev,int nand_chunk,const __u8 *data, co
 }
 
 
-int yflash_ReadChunkFromNAND(yaffs_dev_t *dev,int nand_chunk, __u8 *data, yaffs_spare *spare)
+int yflash_ReadChunkFromNAND(yaffs_dev_t *dev,int nand_chunk, u8 *data, yaffs_spare *spare)
 {
        int nread;
 
index 367003e48df7e60cc2a76100bbd16bad891e1231..44a1e874a0eff879f9b443fcaf19d41e7e569b1f 100644 (file)
@@ -40,7 +40,7 @@ const char *yaffs_flashif2_c_version = "$Id: yaffs_fileem2k.c,v 1.24 2010-02-18
 
 typedef struct 
 {
-       __u8 data[PAGE_SIZE]; // Data + spare
+       u8 data[PAGE_SIZE]; // Data + spare
 } yflash_Page;
 
 typedef struct
@@ -93,7 +93,7 @@ static void yflash2_MaybePowerFail(unsigned int nand_chunk, int failPoint)
 
 
 
-static __u8 localBuffer[PAGE_SIZE];
+static u8 localBuffer[PAGE_SIZE];
 
 static char *NToName(char *buf,int n)
 {
@@ -171,7 +171,7 @@ int yflash2_GetNumberOfBlocks(void)
        return filedisk.nBlocks;
 }
 
-int yflash2_WriteChunkWithTagsToNAND(yaffs_dev_t *dev,int nand_chunk,const __u8 *data, const yaffs_ext_tags *tags)
+int yflash2_WriteChunkWithTagsToNAND(yaffs_dev_t *dev,int nand_chunk,const u8 *data, const yaffs_ext_tags *tags)
 {
        int written;
        int pos;
@@ -262,7 +262,7 @@ int yflash2_WriteChunkWithTagsToNAND(yaffs_dev_t *dev,int nand_chunk,const __u8
                        {
                                yaffs_packed_tags2 pt;
                                yaffs_pack_tags2(&pt,tags, !dev->param.no_tags_ecc);
-                               __u8 * ptab = (__u8 *)&pt;
+                               u8 * ptab = (u8 *)&pt;
 
                                nRead = read(h,localBuffer,sizeof(pt));
                                for(i = error = 0; REPORT_ERROR && i < sizeof(pt) && !error; i++){
@@ -340,7 +340,7 @@ int yflash2_WriteChunkWithTagsToNAND(yaffs_dev_t *dev,int nand_chunk,const __u8
                        {
                                yaffs_packed_tags2 pt;
                                yaffs_pack_tags2(&pt,tags,!dev->param.no_tags_ecc);
-                               __u8 * ptab = (__u8 *)&pt;
+                               u8 * ptab = (u8 *)&pt;
 
                                nRead = read(h,localBuffer,sizeof(pt));
                                for(i = error = 0; REPORT_ERROR && i < sizeof(pt) && !error; i++){
@@ -371,7 +371,7 @@ int yflash2_WriteChunkWithTagsToNAND(yaffs_dev_t *dev,int nand_chunk,const __u8
 
 }
 
-int yaffs_check_all_ff(const __u8 *ptr, int n)
+int yaffs_check_all_ff(const u8 *ptr, int n)
 {
        while(n)
        {
@@ -388,7 +388,7 @@ static int fail320 = 1;
 
 static int failRead10 = 2;
 
-int yflash2_ReadChunkWithTagsFromNAND(yaffs_dev_t *dev,int nand_chunk, __u8 *data, yaffs_ext_tags *tags)
+int yflash2_ReadChunkWithTagsFromNAND(yaffs_dev_t *dev,int nand_chunk, u8 *data, yaffs_ext_tags *tags)
 {
        int nread;
        int pos;
@@ -461,7 +461,7 @@ int yflash2_ReadChunkWithTagsFromNAND(yaffs_dev_t *dev,int nand_chunk, __u8 *dat
                                nread= read(h,tags,sizeof(yaffs_ext_tags));
                                if(nread != sizeof(yaffs_ext_tags))
                                         retval =  YAFFS_FAIL;
-                               if(yaffs_check_all_ff((__u8 *)tags,sizeof(yaffs_ext_tags)))
+                               if(yaffs_check_all_ff((u8 *)tags,sizeof(yaffs_ext_tags)))
                                {
                                        yaffs_init_tags(tags);
                                }
@@ -550,7 +550,7 @@ int yflash2_EraseBlockInNAND(yaffs_dev_t *dev, int blockNumber)
        else
        {
        
-               __u8 pg[PAGE_SIZE];
+               u8 pg[PAGE_SIZE];
                int syz = PAGE_SIZE;
                int pos;
                
@@ -580,7 +580,7 @@ int yflash2_InitialiseNAND(yaffs_dev_t *dev)
 
 
 
-int yflash2_QueryNANDBlock(struct yaffs_dev_s *dev, int block_no, yaffs_block_state_t *state, __u32 *seq_number)
+int yflash2_QueryNANDBlock(struct yaffs_dev_s *dev, int block_no, yaffs_block_state_t *state, u32 *seq_number)
 {
        yaffs_ext_tags tags;
        int chunkNo;
index 5657c002f1ac891251f9caf9f84691b939faa2a4..cde36a9acfe18601c30b896e4f204506ed0f0203 100644 (file)
@@ -88,58 +88,58 @@ const char *yaffs_norif1_c_version = "$Id: yaffs_norif1.c,v 1.6 2010-02-18 01:18
 #define DEVICE_BASE     (32 * 1024 * 1024)
 #endif
 
-__u32 *Block2Addr(yaffs_dev_t *dev, int blockNumber)
+u32 *Block2Addr(yaffs_dev_t *dev, int blockNumber)
 {
-       __u32 addr;
+       u32 addr;
        dev=dev;
        
-       addr = (__u32) DEVICE_BASE;
+       addr = (u32) DEVICE_BASE;
        addr += blockNumber * BLOCK_SIZE_IN_BYTES;
        
-       return (__u32 *) addr;
+       return (u32 *) addr;
 }
 
-__u32 *Block2FormatAddr(yaffs_dev_t *dev,int blockNumber)
+u32 *Block2FormatAddr(yaffs_dev_t *dev,int blockNumber)
 {
-       __u32 addr;
+       u32 addr;
 
-       addr = (__u32) Block2Addr(dev,blockNumber);
+       addr = (u32) Block2Addr(dev,blockNumber);
        addr += FORMAT_OFFSET;
        
-       return (__u32 *)addr;
+       return (u32 *)addr;
 }
-__u32 *Chunk2DataAddr(yaffs_dev_t *dev,int chunk_id)
+u32 *Chunk2DataAddr(yaffs_dev_t *dev,int chunk_id)
 {
        unsigned block;
        unsigned chunkInBlock;
-       __u32  addr;
+       u32  addr;
        
        block = chunk_id/dev->param.chunks_per_block;
        chunkInBlock = chunk_id % dev->param.chunks_per_block;
        
-       addr = (__u32) Block2Addr(dev,block);
+       addr = (u32) Block2Addr(dev,block);
        addr += chunkInBlock * DATA_BYTES_PER_CHUNK;
        
-       return (__u32 *)addr;
+       return (u32 *)addr;
 }
 
-__u32 *Chunk2SpareAddr(yaffs_dev_t *dev,int chunk_id)
+u32 *Chunk2SpareAddr(yaffs_dev_t *dev,int chunk_id)
 {
        unsigned block;
        unsigned chunkInBlock;
-       __u32 addr;
+       u32 addr;
        
        block = chunk_id/dev->param.chunks_per_block;
        chunkInBlock = chunk_id % dev->param.chunks_per_block;
        
-       addr = (__u32) Block2Addr(dev,block);
+       addr = (u32) Block2Addr(dev,block);
        addr += SPARE_AREA_OFFSET;
        addr += chunkInBlock * (SPARE_BYTES_PER_CHUNK + M18_SKIP);
-       return (__u32 *)addr;
+       return (u32 *)addr;
 }
 
 
-void ynorif1_AndBytes(__u8*target, const __u8   *src, int nbytes)
+void ynorif1_AndBytes(u8*target, const u8   *src, int nbytes)
 {
         while(nbytes > 0){
                 *target &= *src;
@@ -149,10 +149,10 @@ void ynorif1_AndBytes(__u8*target, const __u8   *src, int nbytes)
         }
 }
 
-int ynorif1_WriteChunkToNAND(yaffs_dev_t *dev,int nand_chunk,const __u8 *data, const yaffs_spare *spare)
+int ynorif1_WriteChunkToNAND(yaffs_dev_t *dev,int nand_chunk,const u8 *data, const yaffs_spare *spare)
 {
-        __u32 *dataAddr = Chunk2DataAddr(dev,nand_chunk);
-        __u32 *spareAddr = Chunk2SpareAddr(dev,nand_chunk);
+        u32 *dataAddr = Chunk2DataAddr(dev,nand_chunk);
+        u32 *spareAddr = Chunk2SpareAddr(dev,nand_chunk);
         
         yaffs_spare tmpSpare;
         
@@ -172,30 +172,30 @@ int ynorif1_WriteChunkToNAND(yaffs_dev_t *dev,int nand_chunk,const __u8 *data, c
                 /* Write a pre-marker */
                 memset(&tmpSpare,0xff,sizeof(tmpSpare));
                 tmpSpare.page_status = YNOR_PREMARKER;
-                ynorif1_FlashWrite32(spareAddr,(__u32 *)&tmpSpare,sizeof(yaffs_spare)/4);
+                ynorif1_FlashWrite32(spareAddr,(u32 *)&tmpSpare,sizeof(yaffs_spare)/4);
 
                 /* Write the data */            
-                ynorif1_FlashWrite32(dataAddr,(__u32 *)data,dev->param.total_bytes_per_chunk / 4);
+                ynorif1_FlashWrite32(dataAddr,(u32 *)data,dev->param.total_bytes_per_chunk / 4);
                 
                 
                 memcpy(&tmpSpare,spare,sizeof(yaffs_spare));
                 
                 /* Write the real tags, but override the premarker*/
                 tmpSpare.page_status = YNOR_PREMARKER;
-                ynorif1_FlashWrite32(spareAddr,(__u32 *)&tmpSpare,sizeof(yaffs_spare)/4);
+                ynorif1_FlashWrite32(spareAddr,(u32 *)&tmpSpare,sizeof(yaffs_spare)/4);
                 
                 /* Write a post-marker */
                 tmpSpare.page_status = YNOR_POSTMARKER;
-                ynorif1_FlashWrite32(spareAddr,(__u32 *)&tmpSpare,sizeof(tmpSpare)/4);  
+                ynorif1_FlashWrite32(spareAddr,(u32 *)&tmpSpare,sizeof(tmpSpare)/4);  
 
         } else if(spare){
                 /* This has to be a read-modify-write operation to handle NOR-ness */
 
-                ynorif1_FlashRead32(spareAddr,(__u32 *)&tmpSpare,16/ 4);
+                ynorif1_FlashRead32(spareAddr,(u32 *)&tmpSpare,16/ 4);
                 
-                ynorif1_AndBytes((__u8 *)&tmpSpare,(__u8 *)spare,sizeof(yaffs_spare));
+                ynorif1_AndBytes((u8 *)&tmpSpare,(u8 *)spare,sizeof(yaffs_spare));
                 
-                ynorif1_FlashWrite32(spareAddr,(__u32 *)&tmpSpare,16/ 4);
+                ynorif1_FlashWrite32(spareAddr,(u32 *)&tmpSpare,16/ 4);
         }
         else {
                 YBUG();
@@ -206,20 +206,20 @@ int ynorif1_WriteChunkToNAND(yaffs_dev_t *dev,int nand_chunk,const __u8 *data, c
 
 }
 
-int ynorif1_ReadChunkFromNAND(yaffs_dev_t *dev,int nand_chunk, __u8 *data, yaffs_spare *spare)
+int ynorif1_ReadChunkFromNAND(yaffs_dev_t *dev,int nand_chunk, u8 *data, yaffs_spare *spare)
 {
 
-       __u32 *dataAddr = Chunk2DataAddr(dev,nand_chunk);
-       __u32 *spareAddr = Chunk2SpareAddr(dev,nand_chunk);
+       u32 *dataAddr = Chunk2DataAddr(dev,nand_chunk);
+       u32 *spareAddr = Chunk2SpareAddr(dev,nand_chunk);
        
        if(data)
        {
-               ynorif1_FlashRead32(dataAddr,(__u32 *)data,dev->param.total_bytes_per_chunk / 4);
+               ynorif1_FlashRead32(dataAddr,(u32 *)data,dev->param.total_bytes_per_chunk / 4);
        }
        
         if(spare)
         {
-                ynorif1_FlashRead32(spareAddr,(__u32 *)spare,16/ 4);
+                ynorif1_FlashRead32(spareAddr,(u32 *)spare,16/ 4);
                 
                 /* If the page status is YNOR_POSTMARKER then it was written properly
                  * so change that to 0xFF so that the rest of yaffs is happy.
@@ -238,9 +238,9 @@ int ynorif1_ReadChunkFromNAND(yaffs_dev_t *dev,int nand_chunk, __u8 *data, yaffs
 
 static int ynorif1_FormatBlock(yaffs_dev_t *dev, int blockNumber)
 {
-       __u32 *blockAddr = Block2Addr(dev,blockNumber);
-       __u32 *formatAddr = Block2FormatAddr(dev,blockNumber);
-       __u32 formatValue = FORMAT_VALUE;
+       u32 *blockAddr = Block2Addr(dev,blockNumber);
+       u32 *formatAddr = Block2FormatAddr(dev,blockNumber);
+       u32 formatValue = FORMAT_VALUE;
        
        ynorif1_FlashEraseBlock(blockAddr);
        ynorif1_FlashWrite32(formatAddr,&formatValue,1);
@@ -250,8 +250,8 @@ static int ynorif1_FormatBlock(yaffs_dev_t *dev, int blockNumber)
 
 static int ynorif1_UnformatBlock(yaffs_dev_t *dev, int blockNumber)
 {
-       __u32 *formatAddr = Block2FormatAddr(dev,blockNumber);
-       __u32 formatValue = 0;
+       u32 *formatAddr = Block2FormatAddr(dev,blockNumber);
+       u32 formatValue = 0;
        
        ynorif1_FlashWrite32(formatAddr,&formatValue,1);
        
@@ -260,8 +260,8 @@ static int ynorif1_UnformatBlock(yaffs_dev_t *dev, int blockNumber)
 
 static int ynorif1_IsBlockFormatted(yaffs_dev_t *dev, int blockNumber)
 {
-       __u32 *formatAddr = Block2FormatAddr(dev,blockNumber);
-       __u32 formatValue;
+       u32 *formatAddr = Block2FormatAddr(dev,blockNumber);
+       u32 formatValue;
        
        
        ynorif1_FlashRead32(formatAddr,&formatValue,1);
index ac78423461232ce028eb4bd64d1de0512210e4ed..780b2d36e327c4e066754bd4301830d1aac4b590 100644 (file)
@@ -19,8 +19,8 @@
 
 #include "yaffs_guts.h"
 
-int ynorif1_WriteChunkToNAND(yaffs_dev_t *dev,int nand_chunk,const __u8 *data, const yaffs_spare *spare);
-int ynorif1_ReadChunkFromNAND(yaffs_dev_t *dev,int nand_chunk, __u8 *data, yaffs_spare *spare);
+int ynorif1_WriteChunkToNAND(yaffs_dev_t *dev,int nand_chunk,const u8 *data, const yaffs_spare *spare);
+int ynorif1_ReadChunkFromNAND(yaffs_dev_t *dev,int nand_chunk, u8 *data, yaffs_spare *spare);
 int ynorif1_EraseBlockInNAND(yaffs_dev_t *dev, int blockNumber);
 int ynorif1_InitialiseNAND(yaffs_dev_t *dev);
 int ynorif1_Deinitialise_flash_fn(yaffs_dev_t *dev);
index 9834bb20893f6241d8b7a971ee2f77b977010bdf..a65dcc82523f6778ca679bcde0a0efe51754b93e 100644 (file)
@@ -42,7 +42,7 @@ const char *yaffs_ramdisk_c_version = "$Id: yaffs_ramdisk.c,v 1.6 2010-01-11 04:
 
 typedef struct 
 {
-       __u8 data[528]; // Data + spare
+       u8 data[528]; // Data + spare
 } yramdisk_page;
 
 typedef struct
@@ -119,7 +119,7 @@ static int  CheckInit(yaffs_dev_t *dev)
        return 1;
 }
 
-int yramdisk_wr_chunk(yaffs_dev_t *dev,int nand_chunk,const __u8 *data, const yaffs_ext_tags *tags)
+int yramdisk_wr_chunk(yaffs_dev_t *dev,int nand_chunk,const u8 *data, const yaffs_ext_tags *tags)
 {
        int blk;
        int pg;
@@ -150,7 +150,7 @@ int yramdisk_wr_chunk(yaffs_dev_t *dev,int nand_chunk,const __u8 *data, const ya
 }
 
 
-int yramdisk_rd_chunk(yaffs_dev_t *dev,int nand_chunk, __u8 *data, yaffs_ext_tags *tags)
+int yramdisk_rd_chunk(yaffs_dev_t *dev,int nand_chunk, u8 *data, yaffs_ext_tags *tags)
 {
        int blk;
        int pg;
index c250bcca33e4d942360f0cd63d8488ce566f3040..88134f649ded2cbd1b7a2427ba01634f5945579f 100644 (file)
@@ -23,8 +23,8 @@
 
 #include "yaffs_guts.h"
 int yramdisk_erase(yaffs_dev_t *dev, int blockNumber);
-int yramdisk_wr_chunk(yaffs_dev_t *dev,int nand_chunk,const __u8 *data, const yaffs_ext_tags *tags);
-int yramdisk_rd_chunk(yaffs_dev_t *dev,int nand_chunk, __u8 *data, yaffs_ext_tags *tags);
+int yramdisk_wr_chunk(yaffs_dev_t *dev,int nand_chunk,const u8 *data, const yaffs_ext_tags *tags);
+int yramdisk_rd_chunk(yaffs_dev_t *dev,int nand_chunk, u8 *data, yaffs_ext_tags *tags);
 int yramdisk_initialise(yaffs_dev_t *dev);
 int yramdisk_mark_block_bad(yaffs_dev_t *dev,int blockNumber);
 int yramdisk_query_block(yaffs_dev_t *dev, int block_no, yaffs_block_state_t *state, int *seq_number);
index 1a9765dbadd2261da36da54e5751e85196ad4b14..7028a829a9bc1bedbc85bf58f81087140917c962 100644 (file)
@@ -54,7 +54,7 @@ const char *yaffs_ramem2k_c_version = "$Id: yaffs_ramem2k.c,v 1.8 2010-02-18 01:
 
 typedef struct 
 {
-       __u8 data[PAGE_TOTAL_SIZE]; // Data + spare
+       u8 data[PAGE_TOTAL_SIZE]; // Data + spare
        int empty;      // is this empty?
 } nandemul_Page;
 
@@ -190,13 +190,13 @@ static int  CheckInit(void)
        return 1;
 }
 
-int nandemul2k_WriteChunkWithTagsToNAND(yaffs_dev_t *dev,int nand_chunk,const __u8 *data, const yaffs_ext_tags *tags)
+int nandemul2k_WriteChunkWithTagsToNAND(yaffs_dev_t *dev,int nand_chunk,const u8 *data, const yaffs_ext_tags *tags)
 {
        int blk;
        int pg;
        int i;
        
-       __u8 *x;
+       u8 *x;
 
        
        blk = nand_chunk/PAGES_PER_BLOCK;
@@ -233,12 +233,12 @@ int nandemul2k_WriteChunkWithTagsToNAND(yaffs_dev_t *dev,int nand_chunk,const __
 }
 
 
-int nandemul2k_ReadChunkWithTagsFromNAND(yaffs_dev_t *dev,int nand_chunk, __u8 *data, yaffs_ext_tags *tags)
+int nandemul2k_ReadChunkWithTagsFromNAND(yaffs_dev_t *dev,int nand_chunk, u8 *data, yaffs_ext_tags *tags)
 {
        int blk;
        int pg;
        
-       __u8 *x;
+       u8 *x;
 
        
        
@@ -316,7 +316,7 @@ int nandemul2k_InitialiseNAND(yaffs_dev_t *dev)
 int nandemul2k_MarkNANDBlockBad(struct yaffs_dev_s *dev, int block_no)
 {
        
-       __u8 *x;
+       u8 *x;
        
        x = &ned.block[block_no]->page[0]->data[PAGE_DATA_SIZE];
        
@@ -327,7 +327,7 @@ int nandemul2k_MarkNANDBlockBad(struct yaffs_dev_s *dev, int block_no)
        
 }
 
-int nandemul2k_QueryNANDBlock(struct yaffs_dev_s *dev, int block_no, yaffs_block_state_t *state, __u32  *seq_number)
+int nandemul2k_QueryNANDBlock(struct yaffs_dev_s *dev, int block_no, yaffs_block_state_t *state, u32  *seq_number)
 {
        yaffs_ext_tags tags;
        int chunkNo;
index 590cb871d282772aacaf462ceca5dfb298bae1ca..250a11375078012b48a039418ab077d910beb022 100644 (file)
@@ -42,7 +42,7 @@ void yaffsfs_Unlock(void)
 {
 }
 
-__u32 yaffsfs_CurrentTime(void)
+u32 yaffsfs_CurrentTime(void)
 {
        return 0;
 }
index de8953e1a3f9efae084f11bcbfbd04dea8a6a862..b05952f1998dd9d8636dca67a99f15367ebd60fd 100644 (file)
@@ -65,7 +65,7 @@ void yaffsfs_Unlock(void)
 {
 }
 
-__u32 yaffsfs_CurrentTime(void)
+u32 yaffsfs_CurrentTime(void)
 {
        return 0;
 }
index a3548ef94e8f1bdfcbe131d69bf64e4e132133b1..60dcf022de6d682c0a242501ad46566896615c3a 100644 (file)
@@ -59,7 +59,7 @@ void yaffsfs_Unlock(void)
 {
 }
 
-__u32 yaffsfs_CurrentTime(void)
+u32 yaffsfs_CurrentTime(void)
 {
        return 0;
 }
index ab72d2860cb27fe1900ed720d07cc835035ab4b4..39651011f175638eb35e768015b92537ade6530b 100644 (file)
@@ -48,7 +48,7 @@
 #define YNORSIM_DEV_SIZE_U32   (8*1024 * 1024/4)
 #endif
 
-static __u32 word[YNORSIM_DEV_SIZE_U32];
+static u32 word[YNORSIM_DEV_SIZE_U32];
 
 extern int random_seed;
 extern int simulate_power_failure;
@@ -111,7 +111,7 @@ static void ynorsim_ready(void)
   ynorsim_restore_image();
 }
 
-void ynorsim_rd32(__u32 *addr,__u32 *buf, int nwords)
+void ynorsim_rd32(u32 *addr,u32 *buf, int nwords)
 { 
    while(nwords > 0){
      *buf = *addr;
@@ -121,10 +121,10 @@ void ynorsim_rd32(__u32 *addr,__u32 *buf, int nwords)
    }
 }
 
-void ynorsim_wr_one_word32(__u32 *addr,__u32 val)
+void ynorsim_wr_one_word32(u32 *addr,u32 val)
 {
-  __u32 tmp;
-  __u32 m;
+  u32 tmp;
+  u32 m;
   int i;
 
   tmp = *addr;
@@ -148,7 +148,7 @@ void ynorsim_wr_one_word32(__u32 *addr,__u32 val)
   ynorsim_maybe_power_fail();
 }
 
-void ynorsim_wr32(__u32 *addr, __u32 *buf, int nwords)
+void ynorsim_wr32(u32 *addr, u32 *buf, int nwords)
 {
   while(nwords >0){
     ynorsim_wr_one_word32(addr,*buf);
@@ -158,7 +158,7 @@ void ynorsim_wr32(__u32 *addr, __u32 *buf, int nwords)
   }
 }
 
-void ynorsim_erase(__u32 *addr)
+void ynorsim_erase(u32 *addr)
 {
   /* Todo... bit flipping */
   memset(addr,0xFF,YNORSIM_BLOCK_SIZE_U32 * 4);
@@ -175,7 +175,7 @@ void ynorsim_shutdown(void)
   initialised=0;
 }
 
-__u32 *ynorsim_get_base(void)
+u32 *ynorsim_get_base(void)
 {
   return word;
 }
index e0e92b15d842d65a1efa2d68365930ac6889dd8a..ca5bdf17f3b0c27dafc86d1e06ac9befc09b2ae2 100644 (file)
 
 #include "yaffs_guts.h"
 
-void ynorsim_rd32(__u32 *addr, __u32 *data, int nwords);
-void ynorsim_wr32(__u32 *addr, __u32 *data, int nwords);
-void ynorsim_erase(__u32 *addr);
+void ynorsim_rd32(u32 *addr, u32 *data, int nwords);
+void ynorsim_wr32(u32 *addr, u32 *data, int nwords);
+void ynorsim_erase(u32 *addr);
 void ynorsim_shutdown(void);
 void ynorsim_initialise(void);
-__u32 * ynorsim_get_base(void);
+u32 * ynorsim_get_base(void);
 
 #endif
index 74d5f734ac3a2db21a8d7a4c4a1b2bb69e803567..05437ff9c04bf11f7895bc08b3f250ef5f63f551 100644 (file)
@@ -190,14 +190,14 @@ static int yramsim_mark_block_bad(yaffs_dev_t *dev,unsigned blockId)
 }
 
 
-static SimData *yramsim_alloc_sim_data(__u32 devId, __u32 nBlocks)
+static SimData *yramsim_alloc_sim_data(u32 devId, u32 nBlocks)
 {
        int ok = 1;
 
        Block **blockList;
        SimData *sim;
        Block *b;
-       __u32 i;
+       u32 i;
 
        if(devId >= N_RAM_SIM_DEVS)
                return NULL;
@@ -252,8 +252,8 @@ static SimData *yramsim_alloc_sim_data(__u32 devId, __u32 nBlocks)
 
 
 struct yaffs_dev_s *yramsim_CreateRamSim(const YCHAR *name,
-                               __u32 devId, __u32 nBlocks,
-                               __u32 start_block, __u32 end_block)
+                               u32 devId, u32 nBlocks,
+                               u32 start_block, u32 end_block)
 {
        SimData *sim;
        ynandif_Geometry *g;
index 4f2036431f7b78073d6273630bb825a235de9642..d4e142fa53dff08a88f11d7b7af78fd302fabc63 100644 (file)
@@ -24,8 +24,8 @@
 #define N_RAM_SIM_DEVS  2
 
 struct yaffs_dev_s *yramsim_CreateRamSim(const YCHAR *name,
-                                               __u32 devId, __u32 nBlocks,
-                                               __u32 start_block, __u32 end_block);
+                                               u32 devId, u32 nBlocks,
+                                               u32 start_block, u32 end_block);
 
 #endif
 
index 79732a1f435e018df33dfed2e0b0c85da3c31c41..6747bfcc58227bf94105f9b956ea990f6b0d31a1 100644 (file)
@@ -31,7 +31,7 @@ const char *yaffs_flashif_c_version = "$Id: yaffs_flashif.c,v 1.3 2007-02-14 01:
 
 typedef struct 
 {
-       __u8 data[528]; // Data + spare
+       u8 data[528]; // Data + spare
 } yflash_Page;
 
 typedef struct
@@ -108,7 +108,7 @@ static int  CheckInit(yaffs_dev_t *dev)
        return 1;
 }
 
-int yflash_WriteChunkWithTagsToNAND(yaffs_dev_t *dev,int nand_chunk,const __u8 *data, yaffs_ext_tags *tags)
+int yflash_WriteChunkWithTagsToNAND(yaffs_dev_t *dev,int nand_chunk,const u8 *data, yaffs_ext_tags *tags)
 {
        int blk;
        int pg;
@@ -138,7 +138,7 @@ int yflash_WriteChunkWithTagsToNAND(yaffs_dev_t *dev,int nand_chunk,const __u8 *
 }
 
 
-int yflash_ReadChunkWithTagsFromNAND(yaffs_dev_t *dev,int nand_chunk, __u8 *data, yaffs_tags_t *tags)
+int yflash_ReadChunkWithTagsFromNAND(yaffs_dev_t *dev,int nand_chunk, u8 *data, yaffs_tags_t *tags)
 {
        int blk;
        int pg;
index bc3ed70736ab820ff41f0c520bae66b813566aa9..ce7d9689cd55f36365bb3e6fcdb15dba2fd39591 100644 (file)
 
 #include "yaffs_guts.h"
 int yflash_EraseBlockInNAND(yaffs_dev_t *dev, int blockNumber);
-int yflash_WriteChunkToNAND(yaffs_dev_t *dev,int nand_chunk,const __u8 *data, const yaffs_spare *spare);
-int yflash_WriteChunkWithTagsToNAND(yaffs_dev_t *dev,int nand_chunk,const __u8 *data, const yaffs_ext_tags *tags);
-int yflash_ReadChunkFromNAND(yaffs_dev_t *dev,int nand_chunk, __u8 *data, yaffs_spare *spare);
-int yflash_ReadChunkWithTagsFromNAND(yaffs_dev_t *dev,int nand_chunk, __u8 *data, yaffs_ext_tags *tags);
+int yflash_WriteChunkToNAND(yaffs_dev_t *dev,int nand_chunk,const u8 *data, const yaffs_spare *spare);
+int yflash_WriteChunkWithTagsToNAND(yaffs_dev_t *dev,int nand_chunk,const u8 *data, const yaffs_ext_tags *tags);
+int yflash_ReadChunkFromNAND(yaffs_dev_t *dev,int nand_chunk, u8 *data, yaffs_spare *spare);
+int yflash_ReadChunkWithTagsFromNAND(yaffs_dev_t *dev,int nand_chunk, u8 *data, yaffs_ext_tags *tags);
 int yflash_InitialiseNAND(yaffs_dev_t *dev);
 int yflash_MarkNANDBlockBad(struct yaffs_dev_s *dev, int block_no);
-int yflash_QueryNANDBlock(struct yaffs_dev_s *dev, int block_no, yaffs_block_state_t *state, __u32 *seq_number);
+int yflash_QueryNANDBlock(struct yaffs_dev_s *dev, int block_no, yaffs_block_state_t *state, u32 *seq_number);
 
 #endif
index de820859a19973881aabeb055ef1a19b5b499441..3b704afdcc41ae13e72c6d5f00c01df377c83ef8 100644 (file)
 
 #include "yaffs_guts.h"
 int yflash2_EraseBlockInNAND(yaffs_dev_t *dev, int blockNumber);
-int yflash2_WriteChunkToNAND(yaffs_dev_t *dev,int nand_chunk,const __u8 *data, const yaffs_spare *spare);
-int yflash2_WriteChunkWithTagsToNAND(yaffs_dev_t *dev,int nand_chunk,const __u8 *data, const yaffs_ext_tags *tags);
-int yflash2_ReadChunkFromNAND(yaffs_dev_t *dev,int nand_chunk, __u8 *data, yaffs_spare *spare);
-int yflash2_ReadChunkWithTagsFromNAND(yaffs_dev_t *dev,int nand_chunk, __u8 *data, yaffs_ext_tags *tags);
+int yflash2_WriteChunkToNAND(yaffs_dev_t *dev,int nand_chunk,const u8 *data, const yaffs_spare *spare);
+int yflash2_WriteChunkWithTagsToNAND(yaffs_dev_t *dev,int nand_chunk,const u8 *data, const yaffs_ext_tags *tags);
+int yflash2_ReadChunkFromNAND(yaffs_dev_t *dev,int nand_chunk, u8 *data, yaffs_spare *spare);
+int yflash2_ReadChunkWithTagsFromNAND(yaffs_dev_t *dev,int nand_chunk, u8 *data, yaffs_ext_tags *tags);
 int yflash2_EraseBlockInNAND(yaffs_dev_t *dev, int blockNumber);
 int yflash2_InitialiseNAND(yaffs_dev_t *dev);
 int yflash2_MarkNANDBlockBad(struct yaffs_dev_s *dev, int block_no);
-int yflash2_QueryNANDBlock(struct yaffs_dev_s *dev, int block_no, yaffs_block_state_t *state, __u32 *seq_number);
+int yflash2_QueryNANDBlock(struct yaffs_dev_s *dev, int block_no, yaffs_block_state_t *state, u32 *seq_number);
 
 #endif
index 30b7cbdcf4b4326aa00ab4887e3d9ee1eadb7001..23d876b3904213a53f514ba29f84728cee43c880 100644 (file)
 #include "yaffs_guts.h"
 
 int nandemul2k_WriteChunkWithTagsToNAND(struct yaffs_dev_s *dev,
-                                       int nand_chunk, const __u8 *data,
+                                       int nand_chunk, const u8 *data,
                                        const yaffs_ext_tags *tags);
 int nandemul2k_ReadChunkWithTagsFromNAND(struct yaffs_dev_s *dev,
-                                        int nand_chunk, __u8 *data,
+                                        int nand_chunk, u8 *data,
                                         yaffs_ext_tags *tags);
 int nandemul2k_MarkNANDBlockBad(struct yaffs_dev_s *dev, int block_no);
 int nandemul2k_QueryNANDBlock(struct yaffs_dev_s *dev, int block_no,
-                             yaffs_block_state_t *state, __u32 *seq_number);
+                             yaffs_block_state_t *state, u32 *seq_number);
 int nandemul2k_EraseBlockInNAND(struct yaffs_dev_s *dev,
                                int flash_block);
 int nandemul2k_InitialiseNAND(struct yaffs_dev_s *dev);
index 135e89457c0b5963419976835199032cf785848d..032017ce1ddd3bf089d82a4428217cd78eb1ebf7 100644 (file)
@@ -30,7 +30,7 @@
  * use it to load the tags.
  */
 int ynandif_WriteChunkWithTagsToNAND(yaffs_dev_t * dev, int nand_chunk,
-                                     const __u8 * data,
+                                     const u8 * data,
                                      const yaffs_ext_tags * tags)
 {
 
@@ -71,7 +71,7 @@ int ynandif_WriteChunkWithTagsToNAND(yaffs_dev_t * dev, int nand_chunk,
 }
 
 int ynandif_ReadChunkWithTagsFromNAND(yaffs_dev_t * dev, int nand_chunk,
-                                      __u8 * data, yaffs_ext_tags * tags)
+                                      u8 * data, yaffs_ext_tags * tags)
 {
        yaffs_packed_tags2 pt;
        int localData = 0;
@@ -162,7 +162,7 @@ static int ynandif_IsBlockOk(struct yaffs_dev_s *dev, int blockId)
        return geometry->checkBlockOk(dev,blockId);
 }
 
-int ynandif_QueryNANDBlock(struct yaffs_dev_s *dev, int blockId, yaffs_block_state_t *state, __u32 *seq_number)
+int ynandif_QueryNANDBlock(struct yaffs_dev_s *dev, int blockId, yaffs_block_state_t *state, u32 *seq_number)
 {
        unsigned chunkNo;
        yaffs_ext_tags tags;
index b8e3ba00643a1fb4c41800e02705dcd40440a777..e7153aaea62353a07ddd05fb73bd0a95cb093f21 100644 (file)
@@ -60,12 +60,12 @@ struct yaffs_dev_s *
 
 #if 0
 
-int ynandif_WriteChunkWithTagsToNAND(yaffs_dev_t *dev,int nand_chunk,const __u8 *data, const yaffs_ext_tags *tags);
-int ynandif_ReadChunkWithTagsFromNAND(yaffs_dev_t *dev,int nand_chunk, __u8 *data, yaffs_ext_tags *tags);
+int ynandif_WriteChunkWithTagsToNAND(yaffs_dev_t *dev,int nand_chunk,const u8 *data, const yaffs_ext_tags *tags);
+int ynandif_ReadChunkWithTagsFromNAND(yaffs_dev_t *dev,int nand_chunk, u8 *data, yaffs_ext_tags *tags);
 int ynandif_EraseBlockInNAND(yaffs_dev_t *dev, int blockNumber);
 int ynandif_InitialiseNAND(yaffs_dev_t *dev);
 int ynandif_MarkNANDBlockBad(yaffs_dev_t *dev,int blockNumber);
-int ynandif_QueryNANDBlock(yaffs_dev_t *dev, int block_no, yaffs_block_state_t *state, __u32 *seq_number);
+int ynandif_QueryNANDBlock(yaffs_dev_t *dev, int block_no, yaffs_block_state_t *state, u32 *seq_number);
 int ynandif_GetGeometry(yaffs_dev_t *dev, ynandif_Geometry *geometry);
 #endif
 
index c4cd48b1a190a2cc0a2f96e9b8fb29b8696b0f0e..72687e2ef93fe4d0e379894228b954028d9918b5 100644 (file)
@@ -38,7 +38,7 @@ typedef struct yaffsfs_DeviceConfigurationStruct {
 void yaffsfs_Lock(void);
 void yaffsfs_Unlock(void);
 
-__u32 yaffsfs_CurrentTime(void);
+u32 yaffsfs_CurrentTime(void);
 
 void yaffsfs_SetError(int err);
 
index 455e6ddd94a2b05f271f998b0a8ee2ee4475874d..c7b5ed2c8b9f09d75b2ab1cce1ba70191be4b0fa 100644 (file)
@@ -53,14 +53,14 @@ typedef struct {
 } yaffsfs_Inode;
 
 typedef struct{
-       __u8    reading:1;
-       __u8    writing:1;
-       __u8    append:1;
-       __u8    shareRead:1;
-       __u8    shareWrite:1;
+       u8      reading:1;
+       u8      writing:1;
+       u8      append:1;
+       u8      shareRead:1;
+       u8      shareWrite:1;
        int     inodeId:12;     /* Index to corresponding yaffsfs_Inode */
        int     useCount:10;    /* Use count for this handle */
-       __u32 position;         /* current position in file */
+       u32 position;           /* current position in file */
 }yaffsfs_Handle;
 
 static yaffsfs_Inode yaffsfs_inode[YAFFSFS_N_HANDLES];
@@ -584,14 +584,14 @@ int yaffs_open_sharing(const YCHAR *path, int oflag, int mode, int sharing)
        int symDepth = 0;
        int errorReported = 0;
        int rwflags = oflag & ( O_RDWR | O_RDONLY | O_WRONLY);
-       __u8 shareRead = (sharing & YAFFS_SHARE_READ) ?  1 : 0;
-       __u8 shareWrite = (sharing & YAFFS_SHARE_WRITE) ? 1 : 0;
-       __u8 sharedReadAllowed;
-       __u8 sharedWriteAllowed;
-       __u8 alreadyReading;
-       __u8 alreadyWriting;
-       __u8 readRequested;
-       __u8 writeRequested;
+       u8 shareRead = (sharing & YAFFS_SHARE_READ) ?  1 : 0;
+       u8 shareWrite = (sharing & YAFFS_SHARE_WRITE) ? 1 : 0;
+       u8 sharedReadAllowed;
+       u8 sharedWriteAllowed;
+       u8 alreadyReading;
+       u8 alreadyWriting;
+       u8 readRequested;
+       u8 writeRequested;
 
        /* O_EXCL only has meaning if O_CREAT is specified */
        if(!(oflag & O_CREAT))
@@ -824,7 +824,7 @@ int yaffsfs_do_read(int fd, void *vbuf, unsigned int nbyte, int isPread, int off
        int nToRead = 0;
        int totalRead = 0;
        unsigned int maxRead;
-       __u8 *buf = (__u8 *)vbuf;
+       u8 *buf = (u8 *)vbuf;
 
        yaffsfs_Lock();
        h = yaffsfs_GetHandlePointer(fd);
@@ -920,7 +920,7 @@ int yaffsfs_do_write(int fd, const void *vbuf, unsigned int nbyte, int isPwrite,
        int totalWritten = 0;
        int write_trhrough = 0;
        int nToWrite = 0;
-       const __u8 *buf = (const __u8 *)vbuf;
+       const u8 *buf = (const u8 *)vbuf;
 
        yaffsfs_Lock();
        h = yaffsfs_GetHandlePointer(fd);
@@ -2049,7 +2049,7 @@ void yaffs_remove_device(yaffs_dev_t *dev)
 
 typedef struct
 {
-       __u32 magic;
+       u32 magic;
        yaffs_dirent de;                /* directory entry being used by this dsc */
        YCHAR name[NAME_MAX+1];         /* name of directory being searched */
         yaffs_obj_t *dirObj;           /* ptr to directory being searched */
index 862b244a4232580634167ff0ee1c39a75e34090d..4cba57b536dedc5c879807e674470d14dbbbab84 100644 (file)
@@ -66,7 +66,7 @@ static struct mtd_info nandemul2k_mtd;
 
 typedef struct 
 {
-       __u8 data[PAGE_TOTAL_SIZE]; // Data + spare
+       u8 data[PAGE_TOTAL_SIZE]; // Data + spare
        int empty;      // is this empty?
 } nandemul_Page;
 
@@ -114,8 +114,8 @@ static void nandemul2k_Program(const void *buffer, int page, int start, int n_by
 {
        int pg = page%PAGES_PER_BLOCK;
        int blk = page/PAGES_PER_BLOCK;
-       __u8 *p;
-       __u8 *b = (__u8 *)buffer;
+       u8 *p;
+       u8 *b = (u8 *)buffer;
 
        p = &ned.block[blk]->page[pg]->data[start];
        
@@ -255,7 +255,7 @@ int nandemul2k_GetNumberOfBlocks(void) {return nandemul2k_CalcNBlocks();}
 
 
 
-static int nandemul2k_ReadId(__u8 *vendorId, __u8 *deviceId)
+static int nandemul2k_ReadId(u8 *vendorId, u8 *deviceId)
 {
        *vendorId = 'Y'; 
        *deviceId = '2';
@@ -264,7 +264,7 @@ static int nandemul2k_ReadId(__u8 *vendorId, __u8 *deviceId)
 }
 
 
-static int nandemul2k_ReadStatus(__u8 *status)
+static int nandemul2k_ReadStatus(u8 *status)
 {
                *status = 0;
                return 1;
index c105e450fbeb1f3a65adaaa7a0fbfb679cbf24fd..019142b4e1e475f952825dcd315050946ee4bde3 100644 (file)
@@ -31,7 +31,7 @@ const char *yaffs_mtdif2_c_version =
 void nandmtd2_pt2buf(yaffs_dev_t *dev, yaffs_PackedTags2 *pt, int is_raw)
 {
        struct mtd_info *mtd = (struct mtd_info *)(dev->genericDevice);
-       __u8 *ptab = (__u8 *)pt; /* packed tags as bytes */
+       u8 *ptab = (u8 *)pt; /* packed tags as bytes */
        
        int     i, j = 0, k, n;
 
@@ -73,7 +73,7 @@ void nandmtd2_buf2pt(yaffs_dev_t *dev, yaffs_PackedTags2 *pt, int is_raw)
 {
        struct mtd_info *mtd = (struct mtd_info *)(dev->genericDevice);
        int     i, j = 0, k, n;
-       __u8 *ptab = (__u8 *)pt; /* packed tags as bytes */
+       u8 *ptab = (u8 *)pt; /* packed tags as bytes */
 
 
        if (!is_raw) {
@@ -108,7 +108,7 @@ void nandmtd2_buf2pt(yaffs_dev_t *dev, yaffs_PackedTags2 *pt, int is_raw)
 }
 
 int nandmtd2_WriteChunkWithTagsToNAND(yaffs_dev_t * dev, int nand_chunk,
-                                     const __u8 * data,
+                                     const u8 * data,
                                      const yaffs_ext_tags * tags)
 {
        struct mtd_info *mtd = (struct mtd_info *)(dev->genericDevice);
@@ -150,7 +150,7 @@ int nandmtd2_WriteChunkWithTagsToNAND(yaffs_dev_t * dev, int nand_chunk,
 }
 
 int nandmtd2_ReadChunkWithTagsFromNAND(yaffs_dev_t * dev, int nand_chunk,
-                                      __u8 * data, yaffs_ext_tags * tags)
+                                      u8 * data, yaffs_ext_tags * tags)
 {
        struct mtd_info *mtd = (struct mtd_info *)(dev->genericDevice);
        size_t dummy;
index 2d639089da80e2672d2277008ad93d8e6b66281d..1890427e95524261ef1fe58656026b0941e1f488 100644 (file)
@@ -179,7 +179,7 @@ static void shuffle_oob(char *spareData, yaffs_packed_tags2 *pt)
        memcpy(spareData, pt, sizeof(*pt));
 }
 
-static int write_chunk(__u8 *data, __u32 id, __u32 chunk_id, __u32 n_bytes)
+static int write_chunk(u8 *data, u32 id, u32 chunk_id, u32 n_bytes)
 {
        yaffs_ext_tags t;
        yaffs_packed_tags2 pt;
@@ -233,7 +233,7 @@ static void object_header_little_to_big_endian(yaffs_obj_header* oh)
     int i;    
     oh->type = SWAP32(oh->type); // GCC makes enums 32 bits.
     oh->parent_obj_id = SWAP32(oh->parent_obj_id); // int
-    oh->sum_no_longer_used = SWAP16(oh->sum_no_longer_used); // __u16 - Not used, but done for completeness.
+    oh->sum_no_longer_used = SWAP16(oh->sum_no_longer_used); // u16 - Not used, but done for completeness.
     // name = skip. Char array. Not swapped.
     oh->yst_mode = SWAP32(oh->yst_mode);
 #ifdef CONFIG_YAFFS_WINCE // WinCE doesn't implement this, but we need to just in case. 
@@ -278,7 +278,7 @@ static void object_header_little_to_big_endian(yaffs_obj_header* oh)
 
 static int write_object_header(int id, yaffs_obj_type t, struct stat *s, int parent, const char *name, int equivalentObj, const char * alias)
 {
-       __u8 bytes[chunkSize];
+       u8 bytes[chunkSize];
        
        
        yaffs_obj_header *oh = (yaffs_obj_header *)bytes;
@@ -342,7 +342,7 @@ static int write_object_header(int id, yaffs_obj_type t, struct stat *s, int par
 
 static void pad_image(void)
 {
-       __u8 data[chunkSize + spareSize];
+       u8 data[chunkSize + spareSize];
        int padPages = (nPages % pagesPerBlock);
 
        if (padPages)
@@ -444,7 +444,7 @@ static int process_directory(int parent, const char *path)
                                                        if(write_object_header(newObj, YAFFS_OBJECT_TYPE_FILE, &stats, parent, entry->d_name, -1, NULL) == 0)
                                                        {
                                                                int h;
-                                                               __u8 bytes[chunkSize];
+                                                               u8 bytes[chunkSize];
                                                                int n_bytes;
                                                                int chunk = 0;
                                                                
index 94b02985599fa3470f541f3fc0c6044f99d02301..5d749401c0eda882afc524dfd170ec1d87fc12fe 100644 (file)
@@ -113,12 +113,12 @@ static int find_obj_in_list(dev_t dev, ino_t ino)
 }
 
 // NCB added 10/9/2002
-static __u16 yaffs_calc_name_sum(const char *name)
+static u16 yaffs_calc_name_sum(const char *name)
 {
-       __u16 sum = 0;
-       __u16 i = 1;
+       u16 sum = 0;
+       u16 i = 1;
        
-       __u8 *bname = (__u8 *)name;
+       u8 *bname = (u8 *)name;
        
        while (*bname)
        {
@@ -130,7 +130,7 @@ static __u16 yaffs_calc_name_sum(const char *name)
 }
 
 
-static void yaffs_calc_ecc(const __u8 *data, yaffs_spare *spare)
+static void yaffs_calc_ecc(const u8 *data, yaffs_spare *spare)
 {
        yaffs_ecc_cacl(data , spare->ecc1);
        yaffs_ecc_cacl(&data[256] , spare->ecc2);
@@ -228,7 +228,7 @@ static void little_to_big_endian(yaffs_tags_t *tagsPtr)
     tags->as_bytes[7] = temp.as_bytes[7];
 }
 
-static int write_chunk(__u8 *data, __u32 obj_id, __u32 chunk_id, __u32 n_bytes)
+static int write_chunk(u8 *data, u32 obj_id, u32 chunk_id, u32 n_bytes)
 {
        yaffs_tags_t t;
        yaffs_spare s;
@@ -272,7 +272,7 @@ static void object_header_little_to_big_endian(yaffs_obj_header* oh)
 {
     oh->type = SWAP32(oh->type); // GCC makes enums 32 bits.
     oh->parent_obj_id = SWAP32(oh->parent_obj_id); // int
-    oh->sum_no_longer_used = SWAP16(oh->sum_no_longer_used); // __u16 - Not used, but done for completeness.
+    oh->sum_no_longer_used = SWAP16(oh->sum_no_longer_used); // u16 - Not used, but done for completeness.
     // name = skip. Char array. Not swapped.
     oh->yst_mode = SWAP32(oh->yst_mode);
 #ifdef CONFIG_YAFFS_WINCE // WinCE doesn't implement this, but we need to just in case. 
@@ -327,7 +327,7 @@ static void object_header_little_to_big_endian(yaffs_obj_header* oh)
 
 static int write_object_header(int obj_id, yaffs_obj_type t, struct stat *s, int parent, const char *name, int equivalentObj, const char * alias)
 {
-       __u8 bytes[512];
+       u8 bytes[512];
        
        
        yaffs_obj_header *oh = (yaffs_obj_header *)bytes;
@@ -453,7 +453,7 @@ static int process_directory(int parent, const char *path)
                                                        if(error >= 0)
                                                        {
                                                                int h;
-                                                               __u8 bytes[512];
+                                                               u8 bytes[512];
                                                                int n_bytes;
                                                                int chunk = 0;
                                                                
index 66ba5a6705fcf2eea2e8a22f8f1dac8c4944d6ac..6db9856532da44cbbcef3a08a41dafc517770137 100644 (file)
@@ -140,7 +140,7 @@ static int yaffs_create_tnodes(yaffs_dev_t *dev, int n_tnodes)
        struct yaffs_allocator *allocator = (struct yaffs_allocator *)dev->allocator;
        int i;
        yaffs_tnode_t *new_tnodes;
-       __u8 *mem;
+       u8 *mem;
        yaffs_tnode_t *curr;
        yaffs_tnode_t *next;
        yaffs_tnodelist_t *tnl;
@@ -157,7 +157,7 @@ static int yaffs_create_tnodes(yaffs_dev_t *dev, int n_tnodes)
        /* make these things */
 
        new_tnodes = YMALLOC(n_tnodes * dev->tnode_size);
-       mem = (__u8 *)new_tnodes;
+       mem = (u8 *)new_tnodes;
 
        if (!new_tnodes) {
                T(YAFFS_TRACE_ERROR,
index 85c8c1d83c032dfcb834a29c3a0ab54765ad5d7e..53712d171b0cdb1e55c26de01671b858d7303ad6 100644 (file)
@@ -17,7 +17,7 @@
  * Chunk bitmap manipulations
  */
 
-static Y_INLINE __u8 *yaffs_block_bits(yaffs_dev_t *dev, int blk)
+static Y_INLINE u8 *yaffs_block_bits(yaffs_dev_t *dev, int blk)
 {
        if (blk < dev->internal_start_block || blk > dev->internal_end_block) {
                T(YAFFS_TRACE_ERROR,
@@ -42,14 +42,14 @@ void yaffs_verify_chunk_bit_id(yaffs_dev_t *dev, int blk, int chunk)
 
 void yaffs_clear_chunk_bits(yaffs_dev_t *dev, int blk)
 {
-       __u8 *blk_bits = yaffs_block_bits(dev, blk);
+       u8 *blk_bits = yaffs_block_bits(dev, blk);
 
        memset(blk_bits, 0, dev->chunk_bit_stride);
 }
 
 void yaffs_clear_chunk_bit(yaffs_dev_t *dev, int blk, int chunk)
 {
-       __u8 *blk_bits = yaffs_block_bits(dev, blk);
+       u8 *blk_bits = yaffs_block_bits(dev, blk);
 
        yaffs_verify_chunk_bit_id(dev, blk, chunk);
 
@@ -58,7 +58,7 @@ void yaffs_clear_chunk_bit(yaffs_dev_t *dev, int blk, int chunk)
 
 void yaffs_set_chunk_bit(yaffs_dev_t *dev, int blk, int chunk)
 {
-       __u8 *blk_bits = yaffs_block_bits(dev, blk);
+       u8 *blk_bits = yaffs_block_bits(dev, blk);
 
        yaffs_verify_chunk_bit_id(dev, blk, chunk);
 
@@ -67,7 +67,7 @@ void yaffs_set_chunk_bit(yaffs_dev_t *dev, int blk, int chunk)
 
 int yaffs_check_chunk_bit(yaffs_dev_t *dev, int blk, int chunk)
 {
-       __u8 *blk_bits = yaffs_block_bits(dev, blk);
+       u8 *blk_bits = yaffs_block_bits(dev, blk);
        yaffs_verify_chunk_bit_id(dev, blk, chunk);
 
        return (blk_bits[chunk / 8] & (1 << (chunk & 7))) ? 1 : 0;
@@ -75,7 +75,7 @@ int yaffs_check_chunk_bit(yaffs_dev_t *dev, int blk, int chunk)
 
 int yaffs_still_some_chunks(yaffs_dev_t *dev, int blk)
 {
-       __u8 *blk_bits = yaffs_block_bits(dev, blk);
+       u8 *blk_bits = yaffs_block_bits(dev, blk);
        int i;
        for (i = 0; i < dev->chunk_bit_stride; i++) {
                if (*blk_bits)
@@ -87,11 +87,11 @@ int yaffs_still_some_chunks(yaffs_dev_t *dev, int blk)
 
 int yaffs_count_chunk_bits(yaffs_dev_t *dev, int blk)
 {
-       __u8 *blk_bits = yaffs_block_bits(dev, blk);
+       u8 *blk_bits = yaffs_block_bits(dev, blk);
        int i;
        int n = 0;
        for (i = 0; i < dev->chunk_bit_stride; i++) {
-               __u8 x = *blk_bits;
+               u8 x = *blk_bits;
                while (x) {
                        if (x & 1)
                                n++;
index 82d68744cf235b27216caacc6e3ec9037e200363..519f4068058f061b3fe7328a2ab526516159b81a 100644 (file)
@@ -177,9 +177,9 @@ int yaffs2_checkpt_open(yaffs_dev_t *dev, int writing)
        return 1;
 }
 
-int yaffs2_get_checkpt_sum(yaffs_dev_t *dev, __u32 *sum)
+int yaffs2_get_checkpt_sum(yaffs_dev_t *dev, u32 *sum)
 {
-       __u32 composite_sum;
+       u32 composite_sum;
        composite_sum =  (dev->checkpt_sum << 8) | (dev->checkpt_xor & 0xFF);
        *sum = composite_sum;
        return 1;
@@ -244,7 +244,7 @@ int yaffs2_checkpt_wr(yaffs_dev_t *dev, const void *data, int n_bytes)
        int ok = 1;
 
 
-       __u8 * data_bytes = (__u8 *)data;
+       u8 * data_bytes = (u8 *)data;
 
 
 
@@ -283,7 +283,7 @@ int yaffs2_checkpt_rd(yaffs_dev_t *dev, void *data, int n_bytes)
        int chunk;
        int realigned_chunk;
 
-       __u8 *data_bytes = (__u8 *)data;
+       u8 *data_bytes = (u8 *)data;
 
        if (!dev->checkpt_buffer)
                return 0;
index 582b89cdd2d328c441061522239680d3e3250542..3e446a111412190bed94a40b9085875a13389a80 100644 (file)
@@ -24,7 +24,7 @@ int yaffs2_checkpt_wr(yaffs_dev_t *dev, const void *data, int n_bytes);
 
 int yaffs2_checkpt_rd(yaffs_dev_t *dev, void *data, int n_bytes);
 
-int yaffs2_get_checkpt_sum(yaffs_dev_t *dev, __u32 *sum);
+int yaffs2_get_checkpt_sum(yaffs_dev_t *dev, u32 *sum);
 
 int yaffs_checkpt_close(yaffs_dev_t *dev);
 
index 7a4081d4e01825c0dec3b9e05af6f8c71ed8b2fb..a88f4d083bba0faada4f3ab42ebf023556c7fc4c 100644 (file)
@@ -46,7 +46,7 @@ static void yaffs_retire_block(yaffs_dev_t *dev, int flash_block);
 static void yaffs_handle_chunk_wr_error(yaffs_dev_t *dev, int nand_chunk,
                int erased_ok);
 static void yaffs_handle_chunk_wr_ok(yaffs_dev_t *dev, int nand_chunk,
-                               const __u8 *data,
+                               const u8 *data,
                                const yaffs_ext_tags *tags);
 static void yaffs_handle_chunk_update(yaffs_dev_t *dev, int nand_chunk,
                                const yaffs_ext_tags *tags);
@@ -57,7 +57,7 @@ static int yaffs_unlink_obj(yaffs_obj_t *obj);
 static int yaffs_obj_cache_dirty(yaffs_obj_t *obj);
 
 static int yaffs_write_new_chunk(yaffs_dev_t *dev,
-                                       const __u8 *buffer,
+                                       const u8 *buffer,
                                        yaffs_ext_tags *tags,
                                        int use_reserver);
 
@@ -93,7 +93,7 @@ static int yaffs_find_chunk_in_file(yaffs_obj_t *in, int inode_chunk,
 
 static int yaffs_verify_chunk_written(yaffs_dev_t *dev,
                                        int nand_chunk,
-                                       const __u8 *data,
+                                       const u8 *data,
                                        yaffs_ext_tags *tags);
 
 
@@ -104,16 +104,16 @@ static void yaffs_load_oh_from_name(yaffs_dev_t *dev,YCHAR *oh_name, const YCHAR
 /* Function to calculate chunk and offset */
 
 static void yaffs_addr_to_chunk(yaffs_dev_t *dev, loff_t addr, int *chunk_out,
-               __u32 *offset_out)
+               u32 *offset_out)
 {
        int chunk;
-       __u32 offset;
+       u32 offset;
 
-       chunk  = (__u32)(addr >> dev->chunk_shift);
+       chunk  = (u32)(addr >> dev->chunk_shift);
 
        if (dev->chunk_div == 1) {
                /* easy power of 2 case */
-               offset = (__u32)(addr & dev->chunk_mask);
+               offset = (u32)(addr & dev->chunk_mask);
        } else {
                /* Non power-of-2 case */
 
@@ -122,7 +122,7 @@ static void yaffs_addr_to_chunk(yaffs_dev_t *dev, loff_t addr, int *chunk_out,
                chunk /= dev->chunk_div;
 
                chunk_base = ((loff_t)chunk) * dev->data_bytes_per_chunk;
-               offset = (__u32)(addr - chunk_base);
+               offset = (u32)(addr - chunk_base);
        }
 
        *chunk_out = chunk;
@@ -135,7 +135,7 @@ static void yaffs_addr_to_chunk(yaffs_dev_t *dev, loff_t addr, int *chunk_out,
  * be hellishly efficient.
  */
 
-static __u32 calc_shifts_ceiling(__u32 x)
+static u32 calc_shifts_ceiling(u32 x)
 {
        int extra_bits;
        int shifts;
@@ -158,9 +158,9 @@ static __u32 calc_shifts_ceiling(__u32 x)
 /* Function to return the number of shifts to get a 1 in bit 0
  */
 
-static __u32 calc_shifts(__u32 x)
+static u32 calc_shifts(u32 x)
 {
-       __u32 shifts;
+       u32 shifts;
 
        shifts =  0;
 
@@ -184,7 +184,7 @@ static __u32 calc_shifts(__u32 x)
 static int yaffs_init_tmp_buffers(yaffs_dev_t *dev)
 {
        int i;
-       __u8 *buf = (__u8 *)1;
+       u8 *buf = (u8 *)1;
 
        memset(dev->temp_buffer, 0, sizeof(dev->temp_buffer));
 
@@ -197,7 +197,7 @@ static int yaffs_init_tmp_buffers(yaffs_dev_t *dev)
        return buf ? YAFFS_OK : YAFFS_FAIL;
 }
 
-__u8 *yaffs_get_temp_buffer(yaffs_dev_t *dev, int line_no)
+u8 *yaffs_get_temp_buffer(yaffs_dev_t *dev, int line_no)
 {
        int i, j;
 
@@ -237,7 +237,7 @@ __u8 *yaffs_get_temp_buffer(yaffs_dev_t *dev, int line_no)
 
 }
 
-void yaffs_release_temp_buffer(yaffs_dev_t *dev, __u8 *buffer,
+void yaffs_release_temp_buffer(yaffs_dev_t *dev, u8 *buffer,
                                    int line_no)
 {
        int i;
@@ -265,7 +265,7 @@ void yaffs_release_temp_buffer(yaffs_dev_t *dev, __u8 *buffer,
 /*
  * Determine if we have a managed buffer.
  */
-int yaffs_is_managed_tmp_buffer(yaffs_dev_t *dev, const __u8 *buffer)
+int yaffs_is_managed_tmp_buffer(yaffs_dev_t *dev, const u8 *buffer)
 {
        int i;
 
@@ -324,7 +324,7 @@ yaffs_obj_t *yaffs_lost_n_found(yaffs_dev_t *dev)
  *  Erased NAND checking functions
  */
 
-int yaffs_check_ff(__u8 *buffer, int n_bytes)
+int yaffs_check_ff(u8 *buffer, int n_bytes)
 {
        /* Horrible, slow implementation */
        while (n_bytes--) {
@@ -339,7 +339,7 @@ static int yaffs_check_chunk_erased(struct yaffs_dev_s *dev,
                                int nand_chunk)
 {
        int retval = YAFFS_OK;
-       __u8 *data = yaffs_get_temp_buffer(dev, __LINE__);
+       u8 *data = yaffs_get_temp_buffer(dev, __LINE__);
        yaffs_ext_tags tags;
        int result;
 
@@ -363,12 +363,12 @@ static int yaffs_check_chunk_erased(struct yaffs_dev_s *dev,
 
 static int yaffs_verify_chunk_written(yaffs_dev_t *dev,
                                        int nand_chunk,
-                                       const __u8 *data,
+                                       const u8 *data,
                                        yaffs_ext_tags *tags)
 {
        int retval = YAFFS_OK;
        yaffs_ext_tags temp_tags;
-       __u8 *buffer = yaffs_get_temp_buffer(dev,__LINE__);
+       u8 *buffer = yaffs_get_temp_buffer(dev,__LINE__);
        int result;
        
        result = yaffs_rd_chunk_tags_nand(dev,nand_chunk,buffer,&temp_tags);
@@ -384,7 +384,7 @@ static int yaffs_verify_chunk_written(yaffs_dev_t *dev,
 }
 
 static int yaffs_write_new_chunk(struct yaffs_dev_s *dev,
-                                       const __u8 *data,
+                                       const u8 *data,
                                        yaffs_ext_tags *tags,
                                        int use_reserver)
 {
@@ -508,7 +508,7 @@ static void yaffs_retire_block(yaffs_dev_t *dev, int flash_block)
                        yaffs_ext_tags tags;
                        int chunk_id = flash_block * dev->param.chunks_per_block;
 
-                       __u8 *buffer = yaffs_get_temp_buffer(dev, __LINE__);
+                       u8 *buffer = yaffs_get_temp_buffer(dev, __LINE__);
 
                        memset(buffer, 0xff, dev->data_bytes_per_chunk);
                        yaffs_init_tags(&tags);
@@ -536,7 +536,7 @@ static void yaffs_retire_block(yaffs_dev_t *dev, int flash_block)
  */
 
 static void yaffs_handle_chunk_wr_ok(yaffs_dev_t *dev, int nand_chunk,
-                               const __u8 *data,
+                               const u8 *data,
                                const yaffs_ext_tags *tags)
 {
        dev=dev;
@@ -591,10 +591,10 @@ static void yaffs_handle_chunk_wr_error(yaffs_dev_t *dev, int nand_chunk,
 
 /*---------------- Name handling functions ------------*/
 
-static __u16 yaffs_calc_name_sum(const YCHAR *name)
+static u16 yaffs_calc_name_sum(const YCHAR *name)
 {
-       __u16 sum = 0;
-       __u16 i = 1;
+       u16 sum = 0;
+       u16 i = 1;
 
        const YUCHAR *bname = (const YUCHAR *) name;
        if (bname) {
@@ -673,11 +673,11 @@ static void yaffs_deinit_tnodes_and_objs(yaffs_dev_t *dev)
 void yaffs_load_tnode_0(yaffs_dev_t *dev, yaffs_tnode_t *tn, unsigned pos,
                unsigned val)
 {
-       __u32 *map = (__u32 *)tn;
-       __u32 bit_in_map;
-       __u32 bit_in_word;
-       __u32 word_in_map;
-       __u32 mask;
+       u32 *map = (u32 *)tn;
+       u32 bit_in_map;
+       u32 bit_in_word;
+       u32 word_in_map;
+       u32 mask;
 
        pos &= YAFFS_TNODES_LEVEL0_MASK;
        val >>= dev->chunk_grp_bits;
@@ -700,14 +700,14 @@ void yaffs_load_tnode_0(yaffs_dev_t *dev, yaffs_tnode_t *tn, unsigned pos,
        }
 }
 
-__u32 yaffs_get_group_base(yaffs_dev_t *dev, yaffs_tnode_t *tn,
+u32 yaffs_get_group_base(yaffs_dev_t *dev, yaffs_tnode_t *tn,
                unsigned pos)
 {
-       __u32 *map = (__u32 *)tn;
-       __u32 bit_in_map;
-       __u32 bit_in_word;
-       __u32 word_in_map;
-       __u32 val;
+       u32 *map = (u32 *)tn;
+       u32 bit_in_map;
+       u32 bit_in_word;
+       u32 word_in_map;
+       u32 val;
 
        pos &= YAFFS_TNODES_LEVEL0_MASK;
 
@@ -739,10 +739,10 @@ __u32 yaffs_get_group_base(yaffs_dev_t *dev, yaffs_tnode_t *tn,
 /* FindLevel0Tnode finds the level 0 tnode, if one exists. */
 yaffs_tnode_t *yaffs_find_tnode_0(yaffs_dev_t *dev,
                                        yaffs_file_s *file_struct,
-                                       __u32 chunk_id)
+                                       u32 chunk_id)
 {
        yaffs_tnode_t *tn = file_struct->top;
-       __u32 i;
+       u32 i;
        int required_depth;
        int level = file_struct->top_level;
 
@@ -793,7 +793,7 @@ yaffs_tnode_t *yaffs_find_tnode_0(yaffs_dev_t *dev,
 
 yaffs_tnode_t *yaffs_add_find_tnode_0(yaffs_dev_t *dev,
                                        yaffs_file_s *file_struct,
-                                       __u32 chunk_id,
+                                       u32 chunk_id,
                                        yaffs_tnode_t *passed_tn)
 {
        int required_depth;
@@ -801,7 +801,7 @@ yaffs_tnode_t *yaffs_add_find_tnode_0(yaffs_dev_t *dev,
        int l;
        yaffs_tnode_t *tn;
 
-       __u32 x;
+       u32 x;
 
 
        /* Check sane level and page Id */
@@ -937,7 +937,7 @@ static void yaffs_soft_del_chunk(yaffs_dev_t *dev, int chunk)
  */
 
 static int yaffs_soft_del_worker(yaffs_obj_t *in, yaffs_tnode_t *tn,
-                                 __u32 level, int chunk_offset)
+                                 u32 level, int chunk_offset)
 {
        int i;
        int the_chunk;
@@ -1033,7 +1033,7 @@ static void yaffs_soft_del_file(yaffs_obj_t *obj)
  */
 
 static yaffs_tnode_t *yaffs_prune_worker(yaffs_dev_t *dev, yaffs_tnode_t *tn,
-                               __u32 level, int del0)
+                               u32 level, int del0)
 {
        int i;
        int has_data;
@@ -1054,8 +1054,8 @@ static yaffs_tnode_t *yaffs_prune_worker(yaffs_dev_t *dev, yaffs_tnode_t *tn,
                                        has_data++;
                        }
                } else {
-                       int tnode_size_u32 = dev->tnode_size/sizeof(__u32);
-                       __u32 *map = (__u32 *)tn;
+                       int tnode_size_u32 = dev->tnode_size/sizeof(u32);
+                       u32 *map = (u32 *)tn;
 
                         for(i = 0; !has_data && i < tnode_size_u32; i++){
                                 if(map[i])
@@ -1163,7 +1163,7 @@ static yaffs_obj_t *yaffs_alloc_empty_obj(yaffs_dev_t *dev)
 }
 
 static yaffs_obj_t *yaffs_create_fake_dir(yaffs_dev_t *dev, int number,
-                                              __u32 mode)
+                                              u32 mode)
 {
 
        yaffs_obj_t *obj =
@@ -1283,7 +1283,7 @@ static int yaffs_new_obj_id(yaffs_dev_t *dev)
        int found = 0;
        struct ylist_head *i;
 
-       __u32 n = (__u32) bucket;
+       u32 n = (u32) bucket;
 
        /* yaffs_check_obj_hash_sane();  */
 
@@ -1313,7 +1313,7 @@ static void yaffs_hash_obj(yaffs_obj_t *in)
        dev->obj_bucket[bucket].count++;
 }
 
-yaffs_obj_t *yaffs_find_by_number(yaffs_dev_t *dev, __u32 number)
+yaffs_obj_t *yaffs_find_by_number(yaffs_dev_t *dev, u32 number)
 {
        int bucket = yaffs_hash_fn(number);
        struct ylist_head *i;
@@ -1383,7 +1383,7 @@ yaffs_obj_t *yaffs_new_obj(yaffs_dev_t *dev, int number,
                case YAFFS_OBJECT_TYPE_FILE:
                        the_obj->variant.file_variant.file_size = 0;
                        the_obj->variant.file_variant.scanned_size = 0;
-                       the_obj->variant.file_variant.shrink_size = 0xFFFFFFFF; /* max __u32 */
+                       the_obj->variant.file_variant.shrink_size = 0xFFFFFFFF; /* max u32 */
                        the_obj->variant.file_variant.top_level = 0;
                        the_obj->variant.file_variant.top = tn;
                        break;
@@ -1452,11 +1452,11 @@ YCHAR *yaffs_clone_str(const YCHAR *str)
 static yaffs_obj_t *yaffs_create_obj(yaffs_obj_type type,
                                       yaffs_obj_t *parent,
                                       const YCHAR *name,
-                                      __u32 mode,
-                                      __u32 uid,
-                                      __u32 gid,
+                                      u32 mode,
+                                      u32 uid,
+                                      u32 gid,
                                       yaffs_obj_t *equiv_obj,
-                                      const YCHAR *alias_str, __u32 rdev)
+                                      const YCHAR *alias_str, u32 rdev)
 {
        yaffs_obj_t *in;
        YCHAR *str = NULL;
@@ -1545,28 +1545,28 @@ static yaffs_obj_t *yaffs_create_obj(yaffs_obj_type type,
 }
 
 yaffs_obj_t *yaffs_create_file(yaffs_obj_t *parent, const YCHAR *name,
-                       __u32 mode, __u32 uid, __u32 gid)
+                       u32 mode, u32 uid, u32 gid)
 {
        return yaffs_create_obj(YAFFS_OBJECT_TYPE_FILE, parent, name, mode,
                                uid, gid, NULL, NULL, 0);
 }
 
 yaffs_obj_t *yaffs_create_dir(yaffs_obj_t *parent, const YCHAR *name,
-                               __u32 mode, __u32 uid, __u32 gid)
+                               u32 mode, u32 uid, u32 gid)
 {
        return yaffs_create_obj(YAFFS_OBJECT_TYPE_DIRECTORY, parent, name,
                                 mode, uid, gid, NULL, NULL, 0);
 }
 
 yaffs_obj_t *yaffs_create_special(yaffs_obj_t *parent, const YCHAR *name,
-                               __u32 mode, __u32 uid, __u32 gid, __u32 rdev)
+                               u32 mode, u32 uid, u32 gid, u32 rdev)
 {
        return yaffs_create_obj(YAFFS_OBJECT_TYPE_SPECIAL, parent, name, mode,
                                 uid, gid, NULL, NULL, rdev);
 }
 
 yaffs_obj_t *yaffs_create_symlink(yaffs_obj_t *parent, const YCHAR *name,
-                               __u32 mode, __u32 uid, __u32 gid,
+                               u32 mode, u32 uid, u32 gid,
                                const YCHAR *alias)
 {
        return yaffs_create_obj(YAFFS_OBJECT_TYPE_SYMLINK, parent, name, mode,
@@ -2046,7 +2046,7 @@ static int yaffs_gc_block(yaffs_dev_t *dev, int block,
                yaffs_block_became_dirty(dev, block);
        } else {
 
-               __u8 *buffer = yaffs_get_temp_buffer(dev, __LINE__);
+               u8 *buffer = yaffs_get_temp_buffer(dev, __LINE__);
 
                yaffs_verify_blk(dev, bi, block);
 
@@ -2180,7 +2180,7 @@ static int yaffs_gc_block(yaffs_dev_t *dev, int block,
 
                                                yaffs_verify_oh(object, oh, &tags, 1);
                                                new_chunk =
-                                                   yaffs_write_new_chunk(dev,(__u8 *) oh, &tags, 1);
+                                                   yaffs_write_new_chunk(dev,(u8 *) oh, &tags, 1);
                                        } else
                                                new_chunk =
                                                    yaffs_write_new_chunk(dev, buffer, &tags, 1);
@@ -2749,7 +2749,7 @@ int yaffs_put_chunk_in_file(yaffs_obj_t *in, int inode_chunk,
 }
 
 static int yaffs_rd_data_obj(yaffs_obj_t *in, int inode_chunk,
-                                       __u8 *buffer)
+                                       u8 *buffer)
 {
        int nand_chunk = yaffs_find_chunk_in_file(in, inode_chunk, NULL);
 
@@ -2832,7 +2832,7 @@ void yaffs_chunk_del(yaffs_dev_t *dev, int chunk_id, int mark_flash, int lyn)
 }
 
 static int yaffs_wr_data_obj(yaffs_obj_t *in, int inode_chunk,
-                                       const __u8 *buffer, int n_bytes,
+                                       const u8 *buffer, int n_bytes,
                                        int use_reserve)
 {
        /* Find old chunk Need to do this to get serial number
@@ -2911,7 +2911,7 @@ int yaffs_update_oh(yaffs_obj_t *in, const YCHAR *name, int force,
        yaffs_ext_tags old_tags;
        const YCHAR *alias = NULL;
 
-       __u8 *buffer = NULL;
+       u8 *buffer = NULL;
        YCHAR old_name[YAFFS_MAX_NAME_LENGTH + 1];
 
        yaffs_obj_header *oh = NULL;
@@ -3335,12 +3335,12 @@ static void yaffs_invalidate_whole_cache(yaffs_obj_t *in)
  * Curve-balls: the first chunk might also be the last chunk.
  */
 
-int yaffs_file_rd(yaffs_obj_t *in, __u8 *buffer, loff_t offset,
+int yaffs_file_rd(yaffs_obj_t *in, u8 *buffer, loff_t offset,
                        int n_bytes)
 {
 
        int chunk;
-       __u32 start;
+       u32 start;
        int n_copy;
        int n = n_bytes;
        int n_done = 0;
@@ -3398,7 +3398,7 @@ int yaffs_file_rd(yaffs_obj_t *in, __u8 *buffer, loff_t offset,
                        } else {
                                /* Read into the local buffer then copy..*/
 
-                               __u8 *local_buffer =
+                               u8 *local_buffer =
                                    yaffs_get_temp_buffer(dev, __LINE__);
                                yaffs_rd_data_obj(in, chunk,
                                                              local_buffer);
@@ -3427,20 +3427,20 @@ int yaffs_file_rd(yaffs_obj_t *in, __u8 *buffer, loff_t offset,
        return n_done;
 }
 
-int yaffs_do_file_wr(yaffs_obj_t *in, const __u8 *buffer, loff_t offset,
+int yaffs_do_file_wr(yaffs_obj_t *in, const u8 *buffer, loff_t offset,
                        int n_bytes, int write_trhrough)
 {
 
        int chunk;
-       __u32 start;
+       u32 start;
        int n_copy;
        int n = n_bytes;
        int n_done = 0;
        int n_writeback;
        int start_write = offset;
        int chunk_written = 0;
-       __u32 n_bytes_read;
-       __u32 chunk_start;
+       u32 n_bytes_read;
+       u32 chunk_start;
 
        yaffs_dev_t *dev;
 
@@ -3549,7 +3549,7 @@ int yaffs_do_file_wr(yaffs_obj_t *in, const __u8 *buffer, loff_t offset,
                                 * Read into the local buffer then copy, then copy over and write back.
                                 */
 
-                               __u8 *local_buffer =
+                               u8 *local_buffer =
                                    yaffs_get_temp_buffer(dev, __LINE__);
 
                                yaffs_rd_data_obj(in, chunk,
@@ -3603,7 +3603,7 @@ int yaffs_do_file_wr(yaffs_obj_t *in, const __u8 *buffer, loff_t offset,
        return n_done;
 }
 
-int yaffs_wr_file(yaffs_obj_t *in, const __u8 *buffer, loff_t offset,
+int yaffs_wr_file(yaffs_obj_t *in, const u8 *buffer, loff_t offset,
                        int n_bytes, int write_trhrough)
 {
        yaffs2_handle_hole(in,offset);
@@ -3659,7 +3659,7 @@ static void yaffs_prune_chunks(yaffs_obj_t *in, int new_size)
 void yaffs_resize_file_down( yaffs_obj_t *obj, loff_t new_size)
 {
        int new_full;
-       __u32 new_partial;
+       u32 new_partial;
        yaffs_dev_t *dev = obj->my_dev;
 
        yaffs_addr_to_chunk(dev, new_size, &new_full, &new_partial);
@@ -3668,7 +3668,7 @@ void yaffs_resize_file_down( yaffs_obj_t *obj, loff_t new_size)
 
        if (new_partial != 0) {
                int last_chunk = 1 + new_full;
-               __u8 *local_buffer = yaffs_get_temp_buffer(dev, __LINE__);
+               u8 *local_buffer = yaffs_get_temp_buffer(dev, __LINE__);
 
                /* Got to read and rewrite the last chunk with its new size and zero pad */
                yaffs_rd_data_obj(obj, last_chunk, local_buffer);
@@ -4245,7 +4245,7 @@ static void yaffs_empty_l_n_f(yaffs_dev_t *dev)
 
 static void yaffs_check_obj_details_loaded(yaffs_obj_t *in)
 {
-       __u8 *chunk_data;
+       u8 *chunk_data;
        yaffs_obj_header *oh;
        yaffs_dev_t *dev;
        yaffs_ext_tags tags;
@@ -4616,7 +4616,7 @@ int yaffs_get_obj_name(yaffs_obj_t * obj, YCHAR * name, int buffer_size)
 #endif
        else if(obj->hdr_chunk > 0) {
                int result;
-               __u8 *buffer = yaffs_get_temp_buffer(obj->my_dev, __LINE__);
+               u8 *buffer = yaffs_get_temp_buffer(obj->my_dev, __LINE__);
 
                yaffs_obj_header *oh = (yaffs_obj_header *) buffer;
 
@@ -4847,7 +4847,7 @@ static int yaffs_do_xattrib_fetch(yaffs_obj_t *obj, const YCHAR *name, void *val
        if(!buffer)
                return -ENOMEM;
 
-       result = yaffs_rd_chunk_tags_nand(dev,obj->hdr_chunk, (__u8 *)buffer, &tags);
+       result = yaffs_rd_chunk_tags_nand(dev,obj->hdr_chunk, (u8 *)buffer, &tags);
 
        if(result != YAFFS_OK)
                retval = -ENOENT;
@@ -4864,7 +4864,7 @@ static int yaffs_do_xattrib_fetch(yaffs_obj_t *obj, const YCHAR *name, void *val
                else
                        retval = nval_list(x_buffer, x_size, value,size);
        }
-       yaffs_release_temp_buffer(dev,(__u8 *)buffer,__LINE__);
+       yaffs_release_temp_buffer(dev,(u8 *)buffer,__LINE__);
        return retval;
 }
 
@@ -5145,7 +5145,7 @@ int yaffs_guts_initialise(yaffs_dev_t *dev)
 
                dev->cache =  YMALLOC(cache_bytes);
 
-               buf = (__u8 *) dev->cache;
+               buf = (u8 *) dev->cache;
 
                if (dev->cache)
                        memset(dev->cache, 0, cache_bytes);
@@ -5165,7 +5165,7 @@ int yaffs_guts_initialise(yaffs_dev_t *dev)
        dev->cache_hits = 0;
 
        if (!init_failed) {
-               dev->gc_cleanup_list = YMALLOC(dev->param.chunks_per_block * sizeof(__u32));
+               dev->gc_cleanup_list = YMALLOC(dev->param.chunks_per_block * sizeof(u32));
                if (!dev->gc_cleanup_list)
                        init_failed = 1;
        }
index 3a819ab3f157ca0f62e41c3bb78653c44093204f..1c9515c723fb4f791ece3873e8742b54195dfecd 100644 (file)
@@ -119,7 +119,7 @@ typedef struct {
        int dirty;
        int n_bytes;            /* Only valid if the cache is dirty */
        int locked;             /* Can't push out or flush while locked. */
-       __u8 *data;
+       u8 *data;
 } yaffs_cache_t;
 
 
@@ -141,7 +141,7 @@ typedef struct {
 
 typedef union {
        yaffs_tags_t as_tags;
-       __u8 as_bytes[8];
+       u8 as_bytes[8];
 } yaffs_tags_union_t;
 
 #endif
@@ -203,18 +203,18 @@ typedef struct {
 
 /* Spare structure for YAFFS1 */
 typedef struct {
-       __u8 tb0;
-       __u8 tb1;
-       __u8 tb2;
-       __u8 tb3;
-       __u8 page_status;       /* set to 0 to delete the chunk */
-       __u8 block_status;
-       __u8 tb4;
-       __u8 tb5;
-       __u8 ecc1[3];
-       __u8 tb6;
-       __u8 tb7;
-       __u8 ecc2[3];
+       u8 tb0;
+       u8 tb1;
+       u8 tb2;
+       u8 tb3;
+       u8 page_status; /* set to 0 to delete the chunk */
+       u8 block_status;
+       u8 tb4;
+       u8 tb5;
+       u8 ecc1[3];
+       u8 tb6;
+       u8 tb7;
+       u8 ecc2[3];
 } yaffs_spare;
 
 /*Special structure for passing through to mtd */
@@ -280,16 +280,16 @@ typedef struct {
        int soft_del_pages:10;  /* number of soft deleted pages */
        int pages_in_use:10;    /* number of pages in use */
        unsigned block_state:4; /* One of the above block states. NB use unsigned because enum is sometimes an int */
-       __u32 needs_retiring:1; /* Data has failed on this block, need to get valid data off */
+       u32 needs_retiring:1;   /* Data has failed on this block, need to get valid data off */
                                /* and retire the block. */
-       __u32 skip_erased_check:1; /* If this is set we can skip the erased check on this block */
-       __u32 gc_prioritise:1;  /* An ECC check or blank check has failed on this block.
+       u32 skip_erased_check:1; /* If this is set we can skip the erased check on this block */
+       u32 gc_prioritise:1;    /* An ECC check or blank check has failed on this block.
                                   It should be prioritised for GC */
-       __u32 chunk_error_strikes:3; /* How many times we've had ecc etc failures on this block and tried to reuse it */
+       u32 chunk_error_strikes:3; /* How many times we've had ecc etc failures on this block and tried to reuse it */
 
 #ifdef CONFIG_YAFFS_YAFFS2
-       __u32 has_shrink_hdr:1; /* This block has at least one shrink object header */
-       __u32 seq_number;        /* block sequence number for yaffs2 */
+       u32 has_shrink_hdr:1; /* This block has at least one shrink object header */
+       u32 seq_number;  /* block sequence number for yaffs2 */
 #endif
 
 } yaffs_block_info_t;
@@ -302,20 +302,20 @@ typedef struct {
 
        /* Apply to everything  */
        int parent_obj_id;
-       __u16 sum_no_longer_used;        /* checksum of name. No longer used */
+       u16 sum_no_longer_used;        /* checksum of name. No longer used */
        YCHAR name[YAFFS_MAX_NAME_LENGTH + 1];
 
        /* The following apply to directories, files, symlinks - not hard links */
-       __u32 yst_mode;         /* protection */
+       u32 yst_mode;         /* protection */
 
 #ifdef CONFIG_YAFFS_WINCE
-       __u32 not_for_wince[5];
+       u32 not_for_wince[5];
 #else
-       __u32 yst_uid;
-       __u32 yst_gid;
-       __u32 yst_atime;
-       __u32 yst_mtime;
-       __u32 yst_ctime;
+       u32 yst_uid;
+       u32 yst_gid;
+       u32 yst_atime;
+       u32 yst_mtime;
+       u32 yst_ctime;
 #endif
 
        /* File size  applies to files only */
@@ -327,24 +327,24 @@ typedef struct {
        /* Alias is for symlinks only. */
        YCHAR alias[YAFFS_MAX_ALIAS_LENGTH + 1];
 
-       __u32 yst_rdev;         /* device stuff for block and char devices (major/min) */
+       u32 yst_rdev;           /* device stuff for block and char devices (major/min) */
 
 #ifdef CONFIG_YAFFS_WINCE
-       __u32 win_ctime[2];
-       __u32 win_atime[2];
-       __u32 win_mtime[2];
+       u32 win_ctime[2];
+       u32 win_atime[2];
+       u32 win_mtime[2];
 #else
-       __u32 room_to_grow[6];
+       u32 room_to_grow[6];
 
 #endif
-       __u32 inband_shadowed_obj_id;
-       __u32 inband_is_shrink;
+       u32 inband_shadowed_obj_id;
+       u32 inband_is_shrink;
 
-       __u32 reserved[2];
+       u32 reserved[2];
        int shadows_obj;        /* This object header shadows the specified object if > 0 */
 
        /* is_shrink applies to object headers written when we shrink the file (ie resize) */
-       __u32 is_shrink;
+       u32 is_shrink;
 
 } yaffs_obj_header;
 
@@ -367,9 +367,9 @@ typedef union yaffs_tnode_union yaffs_tnode_t;
  */
 
 typedef struct {
-       __u32 file_size;
-       __u32 scanned_size;
-       __u32 shrink_size;
+       u32 file_size;
+       u32 scanned_size;
+       u32 shrink_size;
        int top_level;
        yaffs_tnode_t *top;
 } yaffs_file_s;
@@ -385,7 +385,7 @@ typedef struct {
 
 typedef struct {
        struct yaffs_obj_s *equiv_obj;
-       __u32 equiv_id;
+       u32 equiv_id;
 } yaffs_hard_link_s;
 
 typedef union {
@@ -398,31 +398,31 @@ typedef union {
 
 
 struct yaffs_obj_s {
-       __u8 deleted:1;         /* This should only apply to unlinked files. */
-       __u8 soft_del:1;        /* it has also been soft deleted */
-       __u8 unlinked:1;        /* An unlinked file. The file should be in the unlinked directory.*/
-       __u8 fake:1;            /* A fake object has no presence on NAND. */
-       __u8 rename_allowed:1;  /* Some objects are not allowed to be renamed. */
-       __u8 unlink_allowed:1;
-       __u8 dirty:1;           /* the object needs to be written to flash */
-       __u8 valid:1;           /* When the file system is being loaded up, this
+       u8 deleted:1;           /* This should only apply to unlinked files. */
+       u8 soft_del:1;  /* it has also been soft deleted */
+       u8 unlinked:1;  /* An unlinked file. The file should be in the unlinked directory.*/
+       u8 fake:1;              /* A fake object has no presence on NAND. */
+       u8 rename_allowed:1;    /* Some objects are not allowed to be renamed. */
+       u8 unlink_allowed:1;
+       u8 dirty:1;             /* the object needs to be written to flash */
+       u8 valid:1;             /* When the file system is being loaded up, this
                                 * object might be created before the data
                                 * is available (ie. file data records appear before the header).
                                 */
-       __u8 lazy_loaded:1;     /* This object has been lazy loaded and is missing some detail */
+       u8 lazy_loaded:1;       /* This object has been lazy loaded and is missing some detail */
 
-       __u8 defered_free:1;    /* For Linux kernel. Object is removed from NAND, but is
+       u8 defered_free:1;      /* For Linux kernel. Object is removed from NAND, but is
                                 * still in the inode cache. Free of object is defered.
                                 * until the inode is released.
                                 */
-       __u8 being_created:1;   /* This object is still being created so skip some checks. */
-       __u8 is_shadowed:1;     /* This object is shadowed on the way to being renamed. */
+       u8 being_created:1;     /* This object is still being created so skip some checks. */
+       u8 is_shadowed:1;       /* This object is shadowed on the way to being renamed. */
 
-       __u8 xattr_known:1;     /* We know if this has object has xattribs or not. */
-       __u8 has_xattr:1;       /* This object has xattribs. Valid if xattr_known. */
+       u8 xattr_known:1;       /* We know if this has object has xattribs or not. */
+       u8 has_xattr:1; /* This object has xattribs. Valid if xattr_known. */
 
-       __u8 serial;            /* serial number of chunk in NAND. Cached here */
-       __u16 sum;              /* sum of the name to speed searching */
+       u8 serial;              /* serial number of chunk in NAND. Cached here */
+       u16 sum;                /* sum of the name to speed searching */
 
        struct yaffs_dev_s *my_dev;       /* The device I'm on */
 
@@ -440,27 +440,27 @@ struct yaffs_obj_s {
 
        int n_data_chunks;      /* Number of data chunks attached to the file. */
 
-       __u32 obj_id;           /* the object id value */
+       u32 obj_id;             /* the object id value */
 
-       __u32 yst_mode;
+       u32 yst_mode;
 
 #ifdef CONFIG_YAFFS_SHORT_NAMES_IN_RAM
        YCHAR short_name[YAFFS_SHORT_NAME_LENGTH + 1];
 #endif
 
 #ifdef CONFIG_YAFFS_WINCE
-       __u32 win_ctime[2];
-       __u32 win_mtime[2];
-       __u32 win_atime[2];
+       u32 win_ctime[2];
+       u32 win_mtime[2];
+       u32 win_atime[2];
 #else
-       __u32 yst_uid;
-       __u32 yst_gid;
-       __u32 yst_atime;
-       __u32 yst_mtime;
-       __u32 yst_ctime;
+       u32 yst_uid;
+       u32 yst_gid;
+       u32 yst_atime;
+       u32 yst_mtime;
+       u32 yst_ctime;
 #endif
 
-       __u32 yst_rdev;
+       u32 yst_rdev;
 
        void *my_inode;
 
@@ -484,20 +484,20 @@ typedef struct {
 
 typedef struct {
        int struct_type;
-       __u32 obj_id;
-       __u32 parent_id;
+       u32 obj_id;
+       u32 parent_id;
        int hdr_chunk;
        yaffs_obj_type variant_type:3;
-       __u8 deleted:1;
-       __u8 soft_del:1;
-       __u8 unlinked:1;
-       __u8 fake:1;
-       __u8 rename_allowed:1;
-       __u8 unlink_allowed:1;
-       __u8 serial;
+       u8 deleted:1;
+       u8 soft_del:1;
+       u8 unlinked:1;
+       u8 fake:1;
+       u8 rename_allowed:1;
+       u8 unlink_allowed:1;
+       u8 serial;
 
        int n_data_chunks;
-       __u32 size_or_equiv_obj;
+       u32 size_or_equiv_obj;
 } yaffs_checkpt_obj_t;
 
 /*--------------------- Temporary buffers ----------------
@@ -506,7 +506,7 @@ typedef struct {
  */
 
 typedef struct {
-       __u8 *buffer;
+       u8 *buffer;
        int line;       /* track from whence this buffer was allocated */
        int max_line;
 } yaffs_buffer_t;
@@ -524,7 +524,7 @@ struct yaffs_param_s {
          */
 
        int inband_tags;          /* Use unband tags */
-       __u32 total_bytes_per_chunk; /* Should be >= 512, does not need to be a power of 2 */
+       u32 total_bytes_per_chunk; /* Should be >= 512, does not need to be a power of 2 */
        int chunks_per_block;   /* does not need to be a power of 2 */
        int spare_bytes_per_chunk;      /* spare area size */
        int start_block;                /* Start block we're allowed to use */
@@ -547,18 +547,18 @@ struct yaffs_param_s {
        int refresh_period;     /* How often we should check to do a block refresh */
 
        /* Checkpoint control. Can be set before or after initialisation */
-       __u8 skip_checkpt_rd;
-       __u8 skip_checkpt_wr;
+       u8 skip_checkpt_rd;
+       u8 skip_checkpt_wr;
 
        int enable_xattr;       /* Enable xattribs */
 
        /* NAND access functions (Must be set before calling YAFFS)*/
 
        int (*write_chunk_fn) (struct yaffs_dev_s *dev,
-                                       int nand_chunk, const __u8 *data,
+                                       int nand_chunk, const u8 *data,
                                        const yaffs_spare *spare);
        int (*read_chunk_fn) (struct yaffs_dev_s *dev,
-                                       int nand_chunk, __u8 *data,
+                                       int nand_chunk, u8 *data,
                                        yaffs_spare *spare);
        int (*erase_fn) (struct yaffs_dev_s *dev,
                                        int flash_block);
@@ -567,14 +567,14 @@ struct yaffs_param_s {
 
 #ifdef CONFIG_YAFFS_YAFFS2
        int (*write_chunk_tags_fn) (struct yaffs_dev_s *dev,
-                                        int nand_chunk, const __u8 *data,
+                                        int nand_chunk, const u8 *data,
                                         const yaffs_ext_tags *tags);
        int (*read_chunk_tags_fn) (struct yaffs_dev_s *dev,
-                                         int nand_chunk, __u8 *data,
+                                         int nand_chunk, u8 *data,
                                          yaffs_ext_tags *tags);
        int (*bad_block_fn) (struct yaffs_dev_s *dev, int block_no);
        int (*query_block_fn) (struct yaffs_dev_s *dev, int block_no,
-                              yaffs_block_state_t *state, __u32 *seq_number);
+                              yaffs_block_state_t *state, u32 *seq_number);
 #endif
 
        /* The remove_obj_fn function must be supplied by OS flavours that
@@ -620,20 +620,20 @@ struct yaffs_dev_s {
        int data_bytes_per_chunk;       
 
         /* Non-wide tnode stuff */
-       __u16 chunk_grp_bits;   /* Number of bits that need to be resolved if
+       u16 chunk_grp_bits;     /* Number of bits that need to be resolved if
                                  * the tnodes are not wide enough.
                                  */
-       __u16 chunk_grp_size;   /* == 2^^chunk_grp_bits */
+       u16 chunk_grp_size;     /* == 2^^chunk_grp_bits */
 
        /* Stuff to support wide tnodes */
-       __u32 tnode_width;
-       __u32 tnode_mask;
-       __u32 tnode_size;
+       u32 tnode_width;
+       u32 tnode_mask;
+       u32 tnode_size;
 
        /* Stuff for figuring out file offset to chunk conversions */
-       __u32 chunk_shift; /* Shift value */
-       __u32 chunk_div;   /* Divisor after shifting: 1 for power-of-2 sizes */
-       __u32 chunk_mask;  /* Mask to use for power-of-2 case */
+       u32 chunk_shift; /* Shift value */
+       u32 chunk_div;   /* Divisor after shifting: 1 for power-of-2 sizes */
+       u32 chunk_mask;  /* Mask to use for power-of-2 case */
 
 
 
@@ -653,7 +653,7 @@ struct yaffs_dev_s {
        int checkpt_page_seq;   /* running sequence number of checkpoint pages */
        int checkpt_byte_count;
        int checkpt_byte_offs;
-       __u8 *checkpt_buffer;
+       u8 *checkpt_buffer;
        int checkpt_open_write;
        int blocks_in_checkpt;
        int checkpt_cur_chunk;
@@ -661,14 +661,14 @@ struct yaffs_dev_s {
        int checkpt_next_block;
        int *checkpt_block_list;
        int checkpt_max_blocks;
-       __u32 checkpt_sum;
-       __u32 checkpt_xor;
+       u32 checkpt_sum;
+       u32 checkpt_xor;
 
        int checkpoint_blocks_required; /* Number of blocks needed to store current checkpoint set */
 
        /* Block Info */
        yaffs_block_info_t *block_info;
-       __u8 *chunk_bits;       /* bitmap of chunks in use */
+       u8 *chunk_bits; /* bitmap of chunks in use */
        unsigned block_info_alt:1;      /* was allocated using alternative strategy */
        unsigned chunk_bits_alt:1;      /* was allocated using alternative strategy */
        int chunk_bit_stride;   /* Number of bytes of chunk_bits per block.
@@ -677,7 +677,7 @@ struct yaffs_dev_s {
 
        int n_erased_blocks;
        int alloc_block;        /* Current block being allocated off */
-       __u32 alloc_page;
+       u32 alloc_page;
        int alloc_block_finder; /* Used to search for next allocation block */
 
        /* Object and Tnode memory management */
@@ -688,13 +688,13 @@ struct yaffs_dev_s {
        int n_hardlinks;
 
        yaffs_obj_bucket obj_bucket[YAFFS_NOBJECT_BUCKETS];
-       __u32 bucket_finder;
+       u32 bucket_finder;
 
        int n_free_chunks;
 
        /* Garbage collection control */
-       __u32 *gc_cleanup_list; /* objects to delete at the end of a GC. */
-       __u32 n_clean_ups;
+       u32 *gc_cleanup_list;   /* objects to delete at the end of a GC. */
+       u32 n_clean_ups;
 
        unsigned has_pending_prioritised_gc; /* We think this device might have pending prioritised gcs */
        unsigned gc_disable;
@@ -711,7 +711,7 @@ struct yaffs_dev_s {
        yaffs_obj_t *lost_n_found;
 
        /* Buffer areas for storing data to recover from write failures TODO
-        *      __u8            buffered_data[YAFFS_CHUNKS_PER_BLOCK][YAFFS_BYTES_PER_CHUNK];
+        *      u8            buffered_data[YAFFS_CHUNKS_PER_BLOCK][YAFFS_BYTES_PER_CHUNK];
         *      yaffs_spare buffered_spare[YAFFS_CHUNKS_PER_BLOCK];
         */
 
@@ -749,26 +749,26 @@ struct yaffs_dev_s {
 
 
        /* Statistcs */
-       __u32 n_page_writes;
-       __u32 n_page_reads;
-       __u32 n_erasures;
-       __u32 n_erase_failures;
-       __u32 n_gc_copies;
-       __u32 all_gcs;
-       __u32 passive_gc_count;
-       __u32 oldest_dirty_gc_count;
-       __u32 n_gc_blocks;
-       __u32 bg_gcs;
-       __u32 n_retired_writes;
-       __u32 n_retired_blocks;
-       __u32 n_ecc_fixed;
-       __u32 n_ecc_unfixed;
-       __u32 n_tags_ecc_fixed;
-       __u32 n_tags_ecc_unfixed;
-       __u32 n_deletions;
-       __u32 n_unmarked_deletions;
-       __u32 refresh_count;
-       __u32 cache_hits;
+       u32 n_page_writes;
+       u32 n_page_reads;
+       u32 n_erasures;
+       u32 n_erase_failures;
+       u32 n_gc_copies;
+       u32 all_gcs;
+       u32 passive_gc_count;
+       u32 oldest_dirty_gc_count;
+       u32 n_gc_blocks;
+       u32 bg_gcs;
+       u32 n_retired_writes;
+       u32 n_retired_blocks;
+       u32 n_ecc_fixed;
+       u32 n_ecc_unfixed;
+       u32 n_tags_ecc_fixed;
+       u32 n_tags_ecc_unfixed;
+       u32 n_deletions;
+       u32 n_unmarked_deletions;
+       u32 refresh_count;
+       u32 cache_hits;
 
 };
 
@@ -792,7 +792,7 @@ typedef struct {
        int struct_type;
        int n_erased_blocks;
        int alloc_block;        /* Current block being allocated off */
-       __u32 alloc_page;
+       u32 alloc_page;
        int n_free_chunks;
 
        int n_deleted_files;            /* Count of files awaiting deletion;*/
@@ -807,9 +807,9 @@ typedef struct {
 
 typedef struct {
        int struct_type;
-       __u32 magic;
-       __u32 version;
-       __u32 head;
+       u32 magic;
+       u32 version;
+       u32 head;
 } yaffs_checkpt_validty_t;
 
 
@@ -853,14 +853,14 @@ int yaffs_set_attribs(yaffs_obj_t *obj, struct iattr *attr);
 int yaffs_get_attribs(yaffs_obj_t *obj, struct iattr *attr);
 
 /* File operations */
-int yaffs_file_rd(yaffs_obj_t *obj, __u8 *buffer, loff_t offset,
+int yaffs_file_rd(yaffs_obj_t *obj, u8 *buffer, loff_t offset,
                                int n_bytes);
-int yaffs_wr_file(yaffs_obj_t *obj, const __u8 *buffer, loff_t offset,
+int yaffs_wr_file(yaffs_obj_t *obj, const u8 *buffer, loff_t offset,
                                int n_bytes, int write_trhrough);
 int yaffs_resize_file(yaffs_obj_t *obj, loff_t new_size);
 
 yaffs_obj_t *yaffs_create_file(yaffs_obj_t *parent, const YCHAR *name,
-                               __u32 mode, __u32 uid, __u32 gid);
+                               u32 mode, u32 uid, u32 gid);
 
 int yaffs_flush_file(yaffs_obj_t *obj, int update_time, int data_sync);
 
@@ -872,9 +872,9 @@ int yaffs_checkpoint_restore(yaffs_dev_t *dev);
 
 /* Directory operations */
 yaffs_obj_t *yaffs_create_dir(yaffs_obj_t *parent, const YCHAR *name,
-                               __u32 mode, __u32 uid, __u32 gid);
+                               u32 mode, u32 uid, u32 gid);
 yaffs_obj_t *yaffs_find_by_name(yaffs_obj_t *the_dir, const YCHAR *name);
-yaffs_obj_t *yaffs_find_by_number(yaffs_dev_t *dev, __u32 number);
+yaffs_obj_t *yaffs_find_by_number(yaffs_dev_t *dev, u32 number);
 
 /* Link operations */
 yaffs_obj_t *yaffs_link_obj(yaffs_obj_t *parent, const YCHAR *name,
@@ -884,13 +884,13 @@ yaffs_obj_t *yaffs_get_equivalent_obj(yaffs_obj_t *obj);
 
 /* Symlink operations */
 yaffs_obj_t *yaffs_create_symlink(yaffs_obj_t *parent, const YCHAR *name,
-                                __u32 mode, __u32 uid, __u32 gid,
+                                u32 mode, u32 uid, u32 gid,
                                 const YCHAR *alias);
 YCHAR *yaffs_get_symlink_alias(yaffs_obj_t *obj);
 
 /* Special inodes (fifos, sockets and devices) */
 yaffs_obj_t *yaffs_create_special(yaffs_obj_t *parent, const YCHAR *name,
-                                __u32 mode, __u32 uid, __u32 gid, __u32 rdev);
+                                u32 mode, u32 uid, u32 gid, u32 rdev);
 
 
 int yaffs_set_xattrib(yaffs_obj_t *obj, const YCHAR *name, const void * value, int size, int flags);
@@ -904,7 +904,7 @@ yaffs_obj_t *yaffs_lost_n_found(yaffs_dev_t *dev);
 
 #ifdef CONFIG_YAFFS_WINCE
 /* CONFIG_YAFFS_WINCE special stuff */
-void yfsd_win_file_time_now(__u32 target[2]);
+void yfsd_win_file_time_now(u32 target[2]);
 #endif
 
 void yaffs_handle_defered_free(yaffs_obj_t *obj);
@@ -920,11 +920,11 @@ void yaffs_guts_test(yaffs_dev_t *dev);
 
 /* A few useful functions to be used within the core files*/
 void yaffs_chunk_del(yaffs_dev_t *dev, int chunk_id, int mark_flash, int lyn);
-int yaffs_check_ff(__u8 *buffer, int n_bytes);
+int yaffs_check_ff(u8 *buffer, int n_bytes);
 void yaffs_handle_chunk_error(yaffs_dev_t *dev, yaffs_block_info_t *bi);
 
-__u8 *yaffs_get_temp_buffer(yaffs_dev_t *dev, int line_no);
-void yaffs_release_temp_buffer(yaffs_dev_t *dev, __u8 *buffer, int line_no);
+u8 *yaffs_get_temp_buffer(yaffs_dev_t *dev, int line_no);
+void yaffs_release_temp_buffer(yaffs_dev_t *dev, u8 *buffer, int line_no);
 
 yaffs_obj_t *yaffs_find_or_create_by_number(yaffs_dev_t *dev,
                                                int number,
@@ -947,10 +947,10 @@ int yaffs_check_alloc_available(yaffs_dev_t *dev, int n_chunks);
 yaffs_tnode_t *yaffs_get_tnode(yaffs_dev_t *dev);
 yaffs_tnode_t *yaffs_add_find_tnode_0(yaffs_dev_t *dev,
                                        yaffs_file_s *file_struct,
-                                       __u32 chunk_id,
+                                       u32 chunk_id,
                                        yaffs_tnode_t *passed_tn);
 
-int yaffs_do_file_wr(yaffs_obj_t *in, const __u8 *buffer, loff_t offset,
+int yaffs_do_file_wr(yaffs_obj_t *in, const u8 *buffer, loff_t offset,
                        int n_bytes, int write_trhrough);
 void yaffs_resize_file_down( yaffs_obj_t *obj, loff_t new_size);
 void yaffs_skip_rest_of_block(yaffs_dev_t *dev);
@@ -959,8 +959,8 @@ int yaffs_count_free_chunks(yaffs_dev_t *dev);
 
 yaffs_tnode_t *yaffs_find_tnode_0(yaffs_dev_t *dev,
                                yaffs_file_s *file_struct,
-                               __u32 chunk_id);
+                               u32 chunk_id);
 
-__u32 yaffs_get_group_base(yaffs_dev_t *dev, yaffs_tnode_t *tn, unsigned pos);
+u32 yaffs_get_group_base(yaffs_dev_t *dev, yaffs_tnode_t *tn, unsigned pos);
 
 #endif
index a8e3f8502dd83e047068c2b016c530e1cf6458f9..254a76ee0c569d3c359d223618ef3280668b86ea 100644 (file)
@@ -26,7 +26,7 @@ struct yaffs_linux_context {
        struct task_struct *bg_thread; /* Background thread for this device */
        int bg_running;
         struct semaphore gross_lock;     /* Gross locking semaphore */
-       __u8 *spare_buffer;      /* For mtdif2 use. Don't know the size of the buffer
+       u8 *spare_buffer;      /* For mtdif2 use. Don't know the size of the buffer
                                 * at compile time so we have to allocate it.
                                 */
        struct ylist_head search_contexts;
index 698e083489b45519e3bfb307a3b5a757144fb575..8d0eb19f7e70326e194d7c158fa630648003d10a 100644 (file)
@@ -65,7 +65,7 @@
  * Returns YAFFS_OK or YAFFS_FAIL.
  */
 int nandmtd1_write_chunk_tags(yaffs_dev_t *dev,
-       int nand_chunk, const __u8 *data, const yaffs_ext_tags *etags)
+       int nand_chunk, const u8 *data, const yaffs_ext_tags *etags)
 {
        struct mtd_info *mtd = yaffs_dev_to_mtd(dev);
        int chunk_bytes = dev->data_bytes_per_chunk;
@@ -94,11 +94,11 @@ int nandmtd1_write_chunk_tags(yaffs_dev_t *dev,
                pt1.deleted = 0;
        }
 #else
-       ((__u8 *)&pt1)[8] = 0xff;
+       ((u8 *)&pt1)[8] = 0xff;
        if (etags->is_deleted) {
                memset(&pt1, 0xff, 8);
                /* zero page_status byte to indicate deleted */
-               ((__u8 *)&pt1)[8] = 0;
+               ((u8 *)&pt1)[8] = 0;
        }
 #endif
 
@@ -106,8 +106,8 @@ int nandmtd1_write_chunk_tags(yaffs_dev_t *dev,
        ops.mode = MTD_OOB_AUTO;
        ops.len = (data) ? chunk_bytes : 0;
        ops.ooblen = YTAG1_SIZE;
-       ops.datbuf = (__u8 *)data;
-       ops.oobbuf = (__u8 *)&pt1;
+       ops.datbuf = (u8 *)data;
+       ops.oobbuf = (u8 *)&pt1;
 
        retval = mtd->write_oob(mtd, addr, &ops);
        if (retval) {
@@ -143,7 +143,7 @@ static int rettags(yaffs_ext_tags *etags, int ecc_result, int retval)
  * Returns YAFFS_OK or YAFFS_FAIL.
  */
 int nandmtd1_read_chunk_tags(yaffs_dev_t *dev,
-       int nand_chunk, __u8 *data, yaffs_ext_tags *etags)
+       int nand_chunk, u8 *data, yaffs_ext_tags *etags)
 {
        struct mtd_info *mtd = yaffs_dev_to_mtd(dev);
        int chunk_bytes = dev->data_bytes_per_chunk;
@@ -159,7 +159,7 @@ int nandmtd1_read_chunk_tags(yaffs_dev_t *dev,
        ops.len = (data) ? chunk_bytes : 0;
        ops.ooblen = YTAG1_SIZE;
        ops.datbuf = data;
-       ops.oobbuf = (__u8 *)&pt1;
+       ops.oobbuf = (u8 *)&pt1;
 
        /* Read page and oob using MTD.
         * Check status and determine ECC result.
@@ -194,7 +194,7 @@ int nandmtd1_read_chunk_tags(yaffs_dev_t *dev,
 
        /* Check for a blank/erased chunk.
         */
-       if (yaffs_check_ff((__u8 *)&pt1, 8)) {
+       if (yaffs_check_ff((u8 *)&pt1, 8)) {
                /* when blank, upper layers want ecc_result to be <= NO_ERROR */
                return rettags(etags, YAFFS_ECC_RESULT_NO_ERROR, YAFFS_OK);
        }
@@ -207,7 +207,7 @@ int nandmtd1_read_chunk_tags(yaffs_dev_t *dev,
        deleted = !pt1.deleted;
        pt1.deleted = 1;
 #else
-       deleted = (yaffs_count_bits(((__u8 *)&pt1)[8]) < 7);
+       deleted = (yaffs_count_bits(((u8 *)&pt1)[8]) < 7);
 #endif
 
        /* Check the packed tags mini-ECC and correct if necessary/possible.
@@ -289,7 +289,7 @@ static int nandmtd1_test_prerequists(struct mtd_info *mtd)
  * Always returns YAFFS_OK.
  */
 int nandmtd1_query_block(struct yaffs_dev_s *dev, int block_no,
-       yaffs_block_state_t *state_ptr, __u32 *seq_ptr)
+       yaffs_block_state_t *state_ptr, u32 *seq_ptr)
 {
        struct mtd_info *mtd = yaffs_dev_to_mtd(dev);
        int chunk_num = block_no * dev->param.chunks_per_block;
index af54c184a06ef29ff14af199d322284ed25ecfe4..53ba308786623120c4356d598a511c591756600f 100644 (file)
@@ -31,7 +31,7 @@
  * use it to load the tags.
  */
 int nandmtd2_write_chunk_tags(yaffs_dev_t *dev, int nand_chunk,
-                                     const __u8 *data,
+                                     const u8 *data,
                                      const yaffs_ext_tags *tags)
 {
        struct mtd_info *mtd = yaffs_dev_to_mtd(dev);
@@ -70,7 +70,7 @@ int nandmtd2_write_chunk_tags(yaffs_dev_t *dev, int nand_chunk,
        ops.ooblen = (dev->param.inband_tags) ? 0 : packed_tags_size;
        ops.len = dev->param.total_bytes_per_chunk;
        ops.ooboffs = 0;
-       ops.datbuf = (__u8 *)data;
+       ops.datbuf = (u8 *)data;
        ops.oobbuf = (dev->param.inband_tags) ? NULL : packed_tags_ptr;
        retval = mtd->write_oob(mtd, addr, &ops);
 
@@ -82,7 +82,7 @@ int nandmtd2_write_chunk_tags(yaffs_dev_t *dev, int nand_chunk,
 }
 
 int nandmtd2_read_chunk_tags(yaffs_dev_t *dev, int nand_chunk,
-                                      __u8 *data, yaffs_ext_tags *tags)
+                                      u8 *data, yaffs_ext_tags *tags)
 {
        struct mtd_info *mtd = yaffs_dev_to_mtd(dev);
        struct mtd_oob_ops ops;
@@ -177,7 +177,7 @@ int nandmtd2_mark_block_bad(struct yaffs_dev_s *dev, int block_no)
 }
 
 int nandmtd2_query_block(struct yaffs_dev_s *dev, int block_no,
-                           yaffs_block_state_t *state, __u32 *seq_number)
+                           yaffs_block_state_t *state, u32 *seq_number)
 {
        struct mtd_info *mtd = yaffs_dev_to_mtd(dev);
        int retval;
index 4fd89943eebabed9a5e141016b8c1563a2eea287..968109a559c4644cda84f0ecf101ea301ae6d6c3 100644 (file)
@@ -26,7 +26,7 @@
 int nandmtd_erase_block(yaffs_dev_t *dev, int block_no)
 {
        struct mtd_info *mtd = yaffs_dev_to_mtd(dev);
-       __u32 addr =
+       u32 addr =
            ((loff_t) block_no) * dev->param.total_bytes_per_chunk
                * dev->param.chunks_per_block;
        struct erase_info ei;
index 01a8ec4fe49749b724c030fa6c469756b97a2adb..83e93e2204a8131ed863acf2b0a06e7ba5297353 100644 (file)
 #define __YAFFS_MTDIF1_H__
 
 int nandmtd1_write_chunk_tags(yaffs_dev_t *dev, int nand_chunk,
-       const __u8 *data, const yaffs_ext_tags *tags);
+       const u8 *data, const yaffs_ext_tags *tags);
 
 int nandmtd1_read_chunk_tags(yaffs_dev_t *dev, int nand_chunk,
-       __u8 *data, yaffs_ext_tags *tags);
+       u8 *data, yaffs_ext_tags *tags);
 
 int nandmtd1_mark_block_bad(struct yaffs_dev_s *dev, int block_no);
 
 int nandmtd1_query_block(struct yaffs_dev_s *dev, int block_no,
-       yaffs_block_state_t *state, __u32 *seq_number);
+       yaffs_block_state_t *state, u32 *seq_number);
 
 #endif
index b33b84d15df54aa9497167e962a9cf24c9494d53..4cce67b7f3f260c576d61488d216f16df6b8b714 100644 (file)
 
 #include "yaffs_guts.h"
 int nandmtd2_write_chunk_tags(yaffs_dev_t *dev, int nand_chunk,
-                               const __u8 *data,
+                               const u8 *data,
                                const yaffs_ext_tags *tags);
 int nandmtd2_read_chunk_tags(yaffs_dev_t *dev, int nand_chunk,
-                               __u8 *data, yaffs_ext_tags *tags);
+                               u8 *data, yaffs_ext_tags *tags);
 int nandmtd2_mark_block_bad(struct yaffs_dev_s *dev, int block_no);
 int nandmtd2_query_block(struct yaffs_dev_s *dev, int block_no,
-                       yaffs_block_state_t *state, __u32 *seq_number);
+                       yaffs_block_state_t *state, u32 *seq_number);
 
 #endif
index d721fa636bf7234c6c3319abdddc5588cb327c5a..5fee1a31f33acfa8b6c6ba28d19faf5c3ab7b2e2 100644 (file)
@@ -18,7 +18,7 @@
 #include "yaffs_getblockinfo.h"
 
 int yaffs_rd_chunk_tags_nand(yaffs_dev_t *dev, int nand_chunk,
-                                          __u8 *buffer,
+                                          u8 *buffer,
                                           yaffs_ext_tags *tags)
 {
        int result;
@@ -53,7 +53,7 @@ int yaffs_rd_chunk_tags_nand(yaffs_dev_t *dev, int nand_chunk,
 
 int yaffs_wr_chunk_tags_nand(yaffs_dev_t *dev,
                                                   int nand_chunk,
-                                                  const __u8 *buffer,
+                                                  const u8 *buffer,
                                                   yaffs_ext_tags *tags)
 {
 
@@ -102,7 +102,7 @@ int yaffs_mark_bad(yaffs_dev_t *dev, int block_no)
 int yaffs_query_init_block_state(yaffs_dev_t *dev,
                                                 int block_no,
                                                 yaffs_block_state_t *state,
-                                                __u32 *seq_number)
+                                                u32 *seq_number)
 {
        block_no -= dev->block_offset;
 
index 24cd147af82b8bb94e561a4a79ebeeeec67e518d..127b129ac22ec46cba3d61fdbc31504d2d302e26 100644 (file)
 
 
 int yaffs_rd_chunk_tags_nand(yaffs_dev_t *dev, int nand_chunk,
-                                       __u8 *buffer,
+                                       u8 *buffer,
                                        yaffs_ext_tags *tags);
 
 int yaffs_wr_chunk_tags_nand(yaffs_dev_t *dev,
                                                int nand_chunk,
-                                               const __u8 *buffer,
+                                               const u8 *buffer,
                                                yaffs_ext_tags *tags);
 
 int yaffs_mark_bad(yaffs_dev_t *dev, int block_no);
index 2ce873f631e0bb741d01becd5a339670b6fcd952..77df13f3790c801bc81cd577e45f5a28806f0885 100644 (file)
@@ -29,7 +29,7 @@ void yaffs_pack_tags1(yaffs_packed_tags1 *pt, const yaffs_ext_tags *t)
 
 void yaffs_unpack_tags1(yaffs_ext_tags *t, const yaffs_packed_tags1 *pt)
 {
-       static const __u8 all_ff[] =
+       static const u8 all_ff[] =
            { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
 0xff };
 
index 9d2472de6494a488b1e51b0fb6b29547f10ab042..5af3a3319f4db60a9efb81cc29f0359caaa4755f 100644 (file)
@@ -39,7 +39,7 @@ static const char yaffs_count_bits_table[256] = {
        4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8
 };
 
-int yaffs_count_bits(__u8 x)
+int yaffs_count_bits(u8 x)
 {
        int ret_val;
        ret_val = yaffs_count_bits_table[x];
@@ -48,7 +48,7 @@ int yaffs_count_bits(__u8 x)
 
 /********** Tags ECC calculations  *********/
 
-void yaffs_calc_ecc(const __u8 *data, yaffs_spare *spare)
+void yaffs_calc_ecc(const u8 *data, yaffs_spare *spare)
 {
        yaffs_ecc_cacl(data, spare->ecc1);
        yaffs_ecc_cacl(&data[256], spare->ecc2);
@@ -153,7 +153,7 @@ static void yaffs_spare_init(yaffs_spare *spare)
 }
 
 static int yaffs_wr_nand(struct yaffs_dev_s *dev,
-                               int nand_chunk, const __u8 *data,
+                               int nand_chunk, const u8 *data,
                                yaffs_spare *spare)
 {
        if (nand_chunk < dev->param.start_block * dev->param.chunks_per_block) {
@@ -168,7 +168,7 @@ static int yaffs_wr_nand(struct yaffs_dev_s *dev,
 
 static int yaffs_rd_chunk_nand(struct yaffs_dev_s *dev,
                                   int nand_chunk,
-                                  __u8 *data,
+                                  u8 *data,
                                   yaffs_spare *spare,
                                   yaffs_ecc_result *ecc_result,
                                   int correct_errors)
@@ -188,7 +188,7 @@ static int yaffs_rd_chunk_nand(struct yaffs_dev_s *dev,
                        /* Do ECC correction */
                        /* Todo handle any errors */
                        int ecc_result1, ecc_result2;
-                       __u8 calc_ecc[3];
+                       u8 calc_ecc[3];
 
                        yaffs_ecc_cacl(data, calc_ecc);
                        ecc_result1 =
@@ -313,7 +313,7 @@ static void yaffs_handle_rd_data_error(yaffs_dev_t *dev, int nand_chunk)
 
 int yaffs_tags_compat_wr(yaffs_dev_t *dev,
                                                int nand_chunk,
-                                               const __u8 *data,
+                                               const u8 *data,
                                                const yaffs_ext_tags *ext_tags)
 {
        yaffs_spare spare;
@@ -349,7 +349,7 @@ int yaffs_tags_compat_wr(yaffs_dev_t *dev,
 
 int yaffs_tags_compat_rd(yaffs_dev_t *dev,
                                                     int nand_chunk,
-                                                    __u8 *data,
+                                                    u8 *data,
                                                     yaffs_ext_tags *ext_tags)
 {
 
@@ -423,7 +423,7 @@ int yaffs_tags_compat_mark_bad(struct yaffs_dev_s *dev,
 int yaffs_tags_compat_query_block(struct yaffs_dev_s *dev,
                                          int block_no,
                                          yaffs_block_state_t *state,
-                                         __u32 *seq_number)
+                                         u32 *seq_number)
 {
 
        yaffs_spare spare0, spare1;
index 889bf5f4b7c873df778514e2732b8320f9c42d32..9f0fc5de7cfdc16ea523b821e5ab4dab7bc1bf79 100644 (file)
 #include "yaffs_guts.h"
 int yaffs_tags_compat_wr(yaffs_dev_t *dev,
                                                int nand_chunk,
-                                               const __u8 *data,
+                                               const u8 *data,
                                                const yaffs_ext_tags *tags);
 int yaffs_tags_compat_rd(yaffs_dev_t *dev,
                                                int nand_chunk,
-                                               __u8 *data,
+                                               u8 *data,
                                                yaffs_ext_tags *tags);
 int yaffs_tags_compat_mark_bad(struct yaffs_dev_s *dev,
                                            int block_no);
 int yaffs_tags_compat_query_block(struct yaffs_dev_s *dev,
                                          int block_no,
                                          yaffs_block_state_t *state,
-                                         __u32 *seq_number);
+                                         u32 *seq_number);
 
 void yaffs_calc_tags_ecc(yaffs_tags_t *tags);
 int yaffs_check_tags_ecc(yaffs_tags_t *tags);
-int yaffs_count_bits(__u8 byte);
+int yaffs_count_bits(u8 byte);
 
 #endif
index 32aaadc4fd720267b9a898595582809c562193a3..5bdddc0c5923fa273c51780527b6c5f1bc638f04 100644 (file)
@@ -209,7 +209,7 @@ void yaffs_verify_oh(yaffs_obj_t *obj, yaffs_obj_header *oh, yaffs_ext_tags *tag
                        (TSTR("Obj %d header name is NULL"TENDSTR),
                        obj->obj_id));
 
-       if (tags->obj_id > 1 && ((__u8)(oh->name[0])) == 0xff) /* Trashed name */
+       if (tags->obj_id > 1 && ((u8)(oh->name[0])) == 0xff) /* Trashed name */
                T(YAFFS_TRACE_VERIFY,
                        (TSTR("Obj %d header name is 0xFF"TENDSTR),
                        obj->obj_id));
@@ -221,13 +221,13 @@ void yaffs_verify_file(yaffs_obj_t *obj)
 {
        int required_depth;
        int actual_depth;
-       __u32 last_chunk;
-       __u32 x;
-       __u32 i;
+       u32 last_chunk;
+       u32 x;
+       u32 i;
        yaffs_dev_t *dev;
        yaffs_ext_tags tags;
        yaffs_tnode_t *tn;
-       __u32 obj_id;
+       u32 obj_id;
 
        if (!obj)
                return;
@@ -261,7 +261,7 @@ void yaffs_verify_file(yaffs_obj_t *obj)
                tn = yaffs_find_tnode_0(dev, &obj->variant.file_variant, i);
 
                if (tn) {
-                       __u32 the_chunk = yaffs_get_group_base(dev, tn, i);
+                       u32 the_chunk = yaffs_get_group_base(dev, tn, i);
                        if (the_chunk > 0) {
                                /* T(~0,(TSTR("verifying (%d:%d) %d"TENDSTR),obj_id,i,the_chunk)); */
                                yaffs_rd_chunk_tags_nand(dev, the_chunk, NULL, &tags);
@@ -302,13 +302,13 @@ void yaffs_verify_obj(yaffs_obj_t *obj)
 {
        yaffs_dev_t *dev;
 
-       __u32 chunk_min;
-       __u32 chunk_max;
+       u32 chunk_min;
+       u32 chunk_max;
 
-       __u32 chunk_id_ok;
-       __u32 chunk_in_range;
-       __u32 chunk_wrongly_deleted;
-       __u32 chunk_valid;
+       u32 chunk_id_ok;
+       u32 chunk_in_range;
+       u32 chunk_wrongly_deleted;
+       u32 chunk_valid;
 
        if (!obj)
                return;
@@ -347,7 +347,7 @@ void yaffs_verify_obj(yaffs_obj_t *obj)
        if (chunk_valid && !yaffs_skip_nand_verification(dev)) {
                yaffs_ext_tags tags;
                yaffs_obj_header *oh;
-               __u8 *buffer = yaffs_get_temp_buffer(dev, __LINE__);
+               u8 *buffer = yaffs_get_temp_buffer(dev, __LINE__);
 
                oh = (yaffs_obj_header *)buffer;
 
index 3bd5aea48e155c6e0312de2f9752821f59c047dc..8230537afa823cfba7b250af1b7d8c40b019ecf3 100644 (file)
@@ -1309,7 +1309,7 @@ static void yaffs_fill_inode_from_obj(struct inode *inode, yaffs_obj_t *obj)
 
 
                /* Check mode against the variant type and attempt to repair if broken. */
-               __u32 mode = obj->yst_mode;
+               u32 mode = obj->yst_mode;
                switch (obj->variant_type) {
                case YAFFS_OBJECT_TYPE_FILE:
                        if (!S_ISREG(mode)) {
index 63f0e3db8181f5b3405266c87930e3fe4a0582fc..9bceaa318e93151ceee953872b973ddef7e913d2 100644 (file)
@@ -926,7 +926,7 @@ static void yaffs_fill_inode_from_obj(struct inode *inode, yaffs_obj_t *obj)
 
 
                /* Check mode against the variant type and attempt to repair if broken. */
-               __u32 mode = obj->yst_mode;
+               u32 mode = obj->yst_mode;
                switch (obj->variant_type) {
                case YAFFS_OBJECT_TYPE_FILE:
                        if (!S_ISREG(mode)) {
index 21933dc370667c26b30cdcdda71175bdf4987f3a..8a1712cd5d5620144547fdb709808ba8d71c0d21 100644 (file)
@@ -31,7 +31,7 @@ int yaffs1_scan(yaffs_dev_t *dev)
        yaffs_block_state_t state;
        yaffs_obj_t *hard_list = NULL;
        yaffs_block_info_t *bi;
-       __u32 seq_number;
+       u32 seq_number;
        yaffs_obj_header *oh;
        yaffs_obj_t *in;
        yaffs_obj_t *parent;
@@ -41,7 +41,7 @@ int yaffs1_scan(yaffs_dev_t *dev)
        struct yaffs_shadow_fixer_s *shadow_fixers = NULL;
 
 
-       __u8 *chunk_data;
+       u8 *chunk_data;
 
 
 
index 76623ad35f99adb2fb58227e2af818b36a875ad0..12c0830aae4f4d2e1efe38dbf0f3a0961e14fb82 100644 (file)
@@ -140,12 +140,12 @@ int yaffs_block_ok_for_gc(yaffs_dev_t *dev,
  * periodically finds the oldest full block by sequence number for refreshing.
  * Only for yaffs2.
  */
-__u32 yaffs2_find_refresh_block(yaffs_dev_t *dev)
+u32 yaffs2_find_refresh_block(yaffs_dev_t *dev)
 {
-       __u32 b ;
+       u32 b ;
 
-       __u32 oldest = 0;
-       __u32 oldest_seq = 0;
+       u32 oldest = 0;
+       u32 oldest_seq = 0;
 
        yaffs_block_info_t *bi;
 
@@ -229,10 +229,10 @@ int yaffs_calc_checkpt_blocks_required(yaffs_dev_t *dev)
                n_bytes += sizeof(yaffs_checkpt_dev_t);
                n_bytes += dev_blocks * sizeof(yaffs_block_info_t);
                n_bytes += dev_blocks * dev->chunk_bit_stride;
-               n_bytes += (sizeof(yaffs_checkpt_obj_t) + sizeof(__u32)) * (dev->n_obj);
-               n_bytes += (dev->tnode_size + sizeof(__u32)) * (dev->n_tnodes);
+               n_bytes += (sizeof(yaffs_checkpt_obj_t) + sizeof(u32)) * (dev->n_obj);
+               n_bytes += (dev->tnode_size + sizeof(u32)) * (dev->n_tnodes);
                n_bytes += sizeof(yaffs_checkpt_validty_t);
-               n_bytes += sizeof(__u32); /* checksum*/
+               n_bytes += sizeof(u32); /* checksum*/
 
                /* Round up and add 2 blocks to allow for some bad blocks, so add 3 */
 
@@ -313,8 +313,8 @@ static void yaffs_checkpt_dev_to_dev(yaffs_dev_t *dev,
 static int yaffs2_wr_checkpt_dev(yaffs_dev_t *dev)
 {
        yaffs_checkpt_dev_t cp;
-       __u32 n_bytes;
-       __u32 n_blocks = (dev->internal_end_block - dev->internal_start_block + 1);
+       u32 n_bytes;
+       u32 n_blocks = (dev->internal_end_block - dev->internal_start_block + 1);
 
        int ok;
 
@@ -342,8 +342,8 @@ static int yaffs2_wr_checkpt_dev(yaffs_dev_t *dev)
 static int yaffs2_rd_checkpt_dev(yaffs_dev_t *dev)
 {
        yaffs_checkpt_dev_t cp;
-       __u32 n_bytes;
-       __u32 n_blocks = (dev->internal_end_block - dev->internal_start_block + 1);
+       u32 n_bytes;
+       u32 n_blocks = (dev->internal_end_block - dev->internal_start_block + 1);
 
        int ok;
 
@@ -452,7 +452,7 @@ static int taffs2_checkpt_obj_to_obj(yaffs_obj_t *obj, yaffs_checkpt_obj_t *cp)
 
 
 static int yaffs2_checkpt_tnode_worker(yaffs_obj_t *in, yaffs_tnode_t *tn,
-                                       __u32 level, int chunk_offset)
+                                       u32 level, int chunk_offset)
 {
        int i;
        yaffs_dev_t *dev = in->my_dev;
@@ -470,7 +470,7 @@ static int yaffs2_checkpt_tnode_worker(yaffs_obj_t *in, yaffs_tnode_t *tn,
                                }
                        }
                } else if (level == 0) {
-                       __u32 base_offset = chunk_offset <<  YAFFS_TNODES_LEVEL0_BITS;
+                       u32 base_offset = chunk_offset <<  YAFFS_TNODES_LEVEL0_BITS;
                        ok = (yaffs2_checkpt_wr(dev, &base_offset, sizeof(base_offset)) == 
                                sizeof(base_offset));
                        if (ok)
@@ -484,7 +484,7 @@ static int yaffs2_checkpt_tnode_worker(yaffs_obj_t *in, yaffs_tnode_t *tn,
 
 static int yaffs2_wr_checkpt_tnodes(yaffs_obj_t *obj)
 {
-       __u32 end_marker = ~0;
+       u32 end_marker = ~0;
        int ok = 1;
 
        if (obj->variant_type == YAFFS_OBJECT_TYPE_FILE) {
@@ -502,7 +502,7 @@ static int yaffs2_wr_checkpt_tnodes(yaffs_obj_t *obj)
 
 static int yaffs2_rd_checkpt_tnodes(yaffs_obj_t *obj)
 {
-       __u32 base_chunk;
+       u32 base_chunk;
        int ok = 1;
        yaffs_dev_t *dev = obj->my_dev;
        yaffs_file_s *file_stuct_ptr = &obj->variant.file_variant;
@@ -632,7 +632,7 @@ static int yaffs2_rd_checkpt_objs(yaffs_dev_t *dev)
 
 static int yaffs2_wr_checkpt_sum(yaffs_dev_t *dev)
 {
-       __u32 checkpt_sum;
+       u32 checkpt_sum;
        int ok;
 
        yaffs2_get_checkpt_sum(dev, &checkpt_sum);
@@ -647,8 +647,8 @@ static int yaffs2_wr_checkpt_sum(yaffs_dev_t *dev)
 
 static int yaffs2_rd_checkpt_sum(yaffs_dev_t *dev)
 {
-       __u32 checkpt_sum0;
-       __u32 checkpt_sum1;
+       u32 checkpt_sum0;
+       u32 checkpt_sum1;
        int ok;
 
        yaffs2_get_checkpt_sum(dev, &checkpt_sum0);
@@ -820,7 +820,7 @@ int yaffs2_handle_hole(yaffs_obj_t *obj, loff_t new_size)
        int result = YAFFS_OK;
        yaffs_dev_t *dev = NULL;
 
-       __u8 *local_buffer = NULL;
+       u8 *local_buffer = NULL;
        
        int small_increase_ok = 0;
        
@@ -926,13 +926,13 @@ int yaffs2_scan_backwards(yaffs_dev_t *dev)
        yaffs_block_state_t state;
        yaffs_obj_t *hard_list = NULL;
        yaffs_block_info_t *bi;
-       __u32 seq_number;
+       u32 seq_number;
        yaffs_obj_header *oh;
        yaffs_obj_t *in;
        yaffs_obj_t *parent;
        int n_blocks = dev->internal_end_block - dev->internal_start_block + 1;
        int is_unlinked;
-       __u8 *chunk_data;
+       u8 *chunk_data;
 
        int file_size;
        int is_shrink;
@@ -1146,7 +1146,7 @@ int yaffs2_scan_backwards(yaffs_dev_t *dev)
                        } else if (tags.chunk_id > 0) {
                                /* chunk_id > 0 so it is a data chunk... */
                                unsigned int endpos;
-                               __u32 chunk_base =
+                               u32 chunk_base =
                                    (tags.chunk_id - 1) * dev->data_bytes_per_chunk;
 
                                found_chunks = 1;
@@ -1262,10 +1262,10 @@ int yaffs2_scan_backwards(yaffs_dev_t *dev)
                                               oh->type == YAFFS_OBJECT_TYPE_FILE) ||
                                              (tags.extra_available  &&
                                               tags.extra_obj_type == YAFFS_OBJECT_TYPE_FILE))) {
-                                               __u32 this_size =
+                                               u32 this_size =
                                                    (oh) ? oh->file_size : tags.
                                                    extra_length;
-                                               __u32 parent_obj_id =
+                                               u32 parent_obj_id =
                                                    (oh) ? oh->
                                                    parent_obj_id : tags.
                                                    extra_parent_id;
index ce1fa9d4ca8d90547f854a1bbb18a20103e68b8c..dce904202f2262375b10ffec66dc4b8b26fa91c7 100644 (file)
@@ -23,7 +23,7 @@ void yaffs2_find_oldest_dirty_seq(yaffs_dev_t *dev);
 void yaffs2_clear_oldest_dirty_seq(yaffs_dev_t *dev, yaffs_block_info_t *bi);
 void yaffs2_update_oldest_dirty_seq(yaffs_dev_t *dev, unsigned block_no, yaffs_block_info_t *bi);
 int yaffs_block_ok_for_gc(yaffs_dev_t *dev, yaffs_block_info_t *bi);
-__u32 yaffs2_find_refresh_block(yaffs_dev_t *dev);
+u32 yaffs2_find_refresh_block(yaffs_dev_t *dev);
 int yaffs2_checkpt_required(yaffs_dev_t *dev);
 int yaffs_calc_checkpt_blocks_required(yaffs_dev_t *dev);