diff --git a/exfat_api.c b/exfat_api.c index 77304fa..3a9943b 100644 --- a/exfat_api.c +++ b/exfat_api.c @@ -75,12 +75,12 @@ extern struct semaphore z_sem; /* exFAT Filesystem Init & Exit Functions */ /*----------------------------------------------------------------------*/ -s32 FsInit(void) +int FsInit(void) { return ffsInit(); } -s32 FsShutdown(void) +int FsShutdown(void) { return ffsShutdown(); } @@ -90,9 +90,9 @@ s32 FsShutdown(void) /*----------------------------------------------------------------------*/ /* FsMountVol : mount the file system volume */ -s32 FsMountVol(struct super_block *sb) +int FsMountVol(struct super_block *sb) { - s32 err; + int err; sm_P(&z_sem); @@ -108,9 +108,9 @@ s32 FsMountVol(struct super_block *sb) } /* end of FsMountVol */ /* FsUmountVol : unmount the file system volume */ -s32 FsUmountVol(struct super_block *sb) +int FsUmountVol(struct super_block *sb) { - s32 err; + int err; FS_INFO_T *p_fs = &(EXFAT_SB(sb)->fs_info); sm_P(&z_sem); @@ -130,9 +130,9 @@ s32 FsUmountVol(struct super_block *sb) } /* end of FsUmountVol */ /* FsGetVolInfo : get the information of a file system volume */ -s32 FsGetVolInfo(struct super_block *sb, VOL_INFO_T *info) +int FsGetVolInfo(struct super_block *sb, VOL_INFO_T *info) { - s32 err; + int err; FS_INFO_T *p_fs = &(EXFAT_SB(sb)->fs_info); /* check the validity of pointer parameters */ @@ -151,9 +151,9 @@ s32 FsGetVolInfo(struct super_block *sb, VOL_INFO_T *info) } /* end of FsGetVolInfo */ /* FsSyncVol : synchronize a file system volume */ -s32 FsSyncVol(struct super_block *sb, s32 do_sync) +int FsSyncVol(struct super_block *sb, int do_sync) { - s32 err; + int err; FS_INFO_T *p_fs = &(EXFAT_SB(sb)->fs_info); /* acquire the lock for file system critical section */ @@ -173,9 +173,9 @@ s32 FsSyncVol(struct super_block *sb, s32 do_sync) /*----------------------------------------------------------------------*/ /* FsCreateFile : create a file */ -s32 FsLookupFile(struct inode *inode, char *path, FILE_ID_T *fid) +int FsLookupFile(struct inode *inode, char *path, FILE_ID_T *fid) { - s32 err; + int err; struct super_block *sb = inode->i_sb; FS_INFO_T *p_fs = &(EXFAT_SB(sb)->fs_info); @@ -195,9 +195,9 @@ s32 FsLookupFile(struct inode *inode, char *path, FILE_ID_T *fid) } /* end of FsLookupFile */ /* FsCreateFile : create a file */ -s32 FsCreateFile(struct inode *inode, char *path, u8 mode, FILE_ID_T *fid) +int FsCreateFile(struct inode *inode, char *path, u8 mode, FILE_ID_T *fid) { - s32 err; + int err; struct super_block *sb = inode->i_sb; FS_INFO_T *p_fs = &(EXFAT_SB(sb)->fs_info); @@ -216,9 +216,9 @@ s32 FsCreateFile(struct inode *inode, char *path, u8 mode, FILE_ID_T *fid) return err; } /* end of FsCreateFile */ -s32 FsReadFile(struct inode *inode, FILE_ID_T *fid, void *buffer, u64 count, u64 *rcount) +int FsReadFile(struct inode *inode, FILE_ID_T *fid, void *buffer, u64 count, u64 *rcount) { - s32 err; + int err; struct super_block *sb = inode->i_sb; FS_INFO_T *p_fs = &(EXFAT_SB(sb)->fs_info); @@ -241,9 +241,9 @@ s32 FsReadFile(struct inode *inode, FILE_ID_T *fid, void *buffer, u64 count, u64 return err; } /* end of FsReadFile */ -s32 FsWriteFile(struct inode *inode, FILE_ID_T *fid, void *buffer, u64 count, u64 *wcount) +int FsWriteFile(struct inode *inode, FILE_ID_T *fid, void *buffer, u64 count, u64 *wcount) { - s32 err; + int err; struct super_block *sb = inode->i_sb; FS_INFO_T *p_fs = &(EXFAT_SB(sb)->fs_info); @@ -267,9 +267,9 @@ s32 FsWriteFile(struct inode *inode, FILE_ID_T *fid, void *buffer, u64 count, u6 } /* end of FsWriteFile */ /* FsTruncateFile : resize the file length */ -s32 FsTruncateFile(struct inode *inode, u64 old_size, u64 new_size) +int FsTruncateFile(struct inode *inode, u64 old_size, u64 new_size) { - s32 err; + int err; struct super_block *sb = inode->i_sb; FS_INFO_T *p_fs = &(EXFAT_SB(sb)->fs_info); @@ -289,9 +289,9 @@ s32 FsTruncateFile(struct inode *inode, u64 old_size, u64 new_size) } /* end of FsTruncateFile */ /* FsMoveFile : move(rename) a old file into a new file */ -s32 FsMoveFile(struct inode *old_parent_inode, FILE_ID_T *fid, struct inode *new_parent_inode, struct dentry *new_dentry) +int FsMoveFile(struct inode *old_parent_inode, FILE_ID_T *fid, struct inode *new_parent_inode, struct dentry *new_dentry) { - s32 err; + int err; struct super_block *sb = old_parent_inode->i_sb; FS_INFO_T *p_fs = &(EXFAT_SB(sb)->fs_info); @@ -311,9 +311,9 @@ s32 FsMoveFile(struct inode *old_parent_inode, FILE_ID_T *fid, struct inode *new } /* end of FsMoveFile */ /* FsRemoveFile : remove a file */ -s32 FsRemoveFile(struct inode *inode, FILE_ID_T *fid) +int FsRemoveFile(struct inode *inode, FILE_ID_T *fid) { - s32 err; + int err; struct super_block *sb = inode->i_sb; FS_INFO_T *p_fs = &(EXFAT_SB(sb)->fs_info); @@ -333,9 +333,9 @@ s32 FsRemoveFile(struct inode *inode, FILE_ID_T *fid) } /* end of FsRemoveFile */ /* FsSetAttr : set the attribute of a given file */ -s32 FsSetAttr(struct inode *inode, u32 attr) +int FsSetAttr(struct inode *inode, u32 attr) { - s32 err; + int err; struct super_block *sb = inode->i_sb; FS_INFO_T *p_fs = &(EXFAT_SB(sb)->fs_info); @@ -351,9 +351,9 @@ s32 FsSetAttr(struct inode *inode, u32 attr) } /* end of FsSetAttr */ /* FsReadStat : get the information of a given file */ -s32 FsReadStat(struct inode *inode, DIR_ENTRY_T *info) +int FsReadStat(struct inode *inode, DIR_ENTRY_T *info) { - s32 err; + int err; struct super_block *sb = inode->i_sb; FS_INFO_T *p_fs = &(EXFAT_SB(sb)->fs_info); @@ -369,9 +369,9 @@ s32 FsReadStat(struct inode *inode, DIR_ENTRY_T *info) } /* end of FsReadStat */ /* FsWriteStat : set the information of a given file */ -s32 FsWriteStat(struct inode *inode, DIR_ENTRY_T *info) +int FsWriteStat(struct inode *inode, DIR_ENTRY_T *info) { - s32 err; + int err; struct super_block *sb = inode->i_sb; FS_INFO_T *p_fs = &(EXFAT_SB(sb)->fs_info); @@ -391,9 +391,9 @@ s32 FsWriteStat(struct inode *inode, DIR_ENTRY_T *info) } /* end of FsWriteStat */ /* FsMapCluster : return the cluster number in the given cluster offset */ -s32 FsMapCluster(struct inode *inode, s32 clu_offset, u32 *clu) +int FsMapCluster(struct inode *inode, s32 clu_offset, u32 *clu) { - s32 err; + int err; struct super_block *sb = inode->i_sb; FS_INFO_T *p_fs = &(EXFAT_SB(sb)->fs_info); @@ -417,9 +417,9 @@ s32 FsMapCluster(struct inode *inode, s32 clu_offset, u32 *clu) /*----------------------------------------------------------------------*/ /* FsCreateDir : create(make) a directory */ -s32 FsCreateDir(struct inode *inode, char *path, FILE_ID_T *fid) +int FsCreateDir(struct inode *inode, char *path, FILE_ID_T *fid) { - s32 err; + int err; struct super_block *sb = inode->i_sb; FS_INFO_T *p_fs = &(EXFAT_SB(sb)->fs_info); @@ -439,9 +439,9 @@ s32 FsCreateDir(struct inode *inode, char *path, FILE_ID_T *fid) } /* end of FsCreateDir */ /* FsReadDir : read a directory entry from the opened directory */ -s32 FsReadDir(struct inode *inode, DIR_ENTRY_T *dir_entry) +int FsReadDir(struct inode *inode, DIR_ENTRY_T *dir_entry) { - s32 err; + int err; struct super_block *sb = inode->i_sb; FS_INFO_T *p_fs = &(EXFAT_SB(sb)->fs_info); @@ -461,9 +461,9 @@ s32 FsReadDir(struct inode *inode, DIR_ENTRY_T *dir_entry) } /* end of FsReadDir */ /* FsRemoveDir : remove a directory */ -s32 FsRemoveDir(struct inode *inode, FILE_ID_T *fid) +int FsRemoveDir(struct inode *inode, FILE_ID_T *fid) { - s32 err; + int err; struct super_block *sb = inode->i_sb; FS_INFO_T *p_fs = &(EXFAT_SB(sb)->fs_info); @@ -503,7 +503,7 @@ EXPORT_SYMBOL(FsRemoveDir); #ifdef CONFIG_EXFAT_KERNEL_DEBUG /* FsReleaseCache: Release FAT & buf cache */ -s32 FsReleaseCache(struct super_block *sb) +int FsReleaseCache(struct super_block *sb) { FS_INFO_T *p_fs = &(EXFAT_SB(sb)->fs_info); diff --git a/exfat_api.h b/exfat_api.h index 306fe81..a924e4d 100644 --- a/exfat_api.h +++ b/exfat_api.h @@ -173,32 +173,32 @@ typedef struct { /*----------------------------------------------------------------------*/ /* file system initialization & shutdown functions */ -s32 FsInit(void); -s32 FsShutdown(void); + int FsInit(void); + int FsShutdown(void); /* volume management functions */ -s32 FsMountVol(struct super_block *sb); -s32 FsUmountVol(struct super_block *sb); -s32 FsGetVolInfo(struct super_block *sb, VOL_INFO_T *info); -s32 FsSyncVol(struct super_block *sb, s32 do_sync); + int FsMountVol(struct super_block *sb); + int FsUmountVol(struct super_block *sb); + int FsGetVolInfo(struct super_block *sb, VOL_INFO_T *info); + int FsSyncVol(struct super_block *sb, int do_sync); /* file management functions */ -s32 FsLookupFile(struct inode *inode, char *path, FILE_ID_T *fid); -s32 FsCreateFile(struct inode *inode, char *path, u8 mode, FILE_ID_T *fid); -s32 FsReadFile(struct inode *inode, FILE_ID_T *fid, void *buffer, u64 count, u64 *rcount); -s32 FsWriteFile(struct inode *inode, FILE_ID_T *fid, void *buffer, u64 count, u64 *wcount); -s32 FsTruncateFile(struct inode *inode, u64 old_size, u64 new_size); -s32 FsMoveFile(struct inode *old_parent_inode, FILE_ID_T *fid, struct inode *new_parent_inode, struct dentry *new_dentry); -s32 FsRemoveFile(struct inode *inode, FILE_ID_T *fid); -s32 FsSetAttr(struct inode *inode, u32 attr); -s32 FsReadStat(struct inode *inode, DIR_ENTRY_T *info); -s32 FsWriteStat(struct inode *inode, DIR_ENTRY_T *info); -s32 FsMapCluster(struct inode *inode, s32 clu_offset, u32 *clu); + int FsLookupFile(struct inode *inode, char *path, FILE_ID_T *fid); + int FsCreateFile(struct inode *inode, char *path, u8 mode, FILE_ID_T *fid); + int FsReadFile(struct inode *inode, FILE_ID_T *fid, void *buffer, u64 count, u64 *rcount); + int FsWriteFile(struct inode *inode, FILE_ID_T *fid, void *buffer, u64 count, u64 *wcount); + int FsTruncateFile(struct inode *inode, u64 old_size, u64 new_size); + int FsMoveFile(struct inode *old_parent_inode, FILE_ID_T *fid, struct inode *new_parent_inode, struct dentry *new_dentry); + int FsRemoveFile(struct inode *inode, FILE_ID_T *fid); + int FsSetAttr(struct inode *inode, u32 attr); + int FsReadStat(struct inode *inode, DIR_ENTRY_T *info); + int FsWriteStat(struct inode *inode, DIR_ENTRY_T *info); + int FsMapCluster(struct inode *inode, s32 clu_offset, u32 *clu); /* directory management functions */ -s32 FsCreateDir(struct inode *inode, char *path, FILE_ID_T *fid); -s32 FsReadDir(struct inode *inode, DIR_ENTRY_T *dir_entry); -s32 FsRemoveDir(struct inode *inode, FILE_ID_T *fid); + int FsCreateDir(struct inode *inode, char *path, FILE_ID_T *fid); + int FsReadDir(struct inode *inode, DIR_ENTRY_T *dir_entry); + int FsRemoveDir(struct inode *inode, FILE_ID_T *fid); /* debug functions */ s32 FsReleaseCache(struct super_block *sb); diff --git a/exfat_bitmap.c b/exfat_bitmap.c index ec17b5f..b0672dd 100644 --- a/exfat_bitmap.c +++ b/exfat_bitmap.c @@ -42,7 +42,7 @@ #define BITMAP_LOC(v) ((v) >> 3) #define BITMAP_SHIFT(v) ((v) & 0x07) -s32 exfat_bitmap_test(u8 *bitmap, s32 i) +s32 exfat_bitmap_test(u8 *bitmap, int i) { u8 data; @@ -52,12 +52,12 @@ s32 exfat_bitmap_test(u8 *bitmap, s32 i) return 0; } /* end of Bitmap_test */ -void exfat_bitmap_set(u8 *bitmap, s32 i) +void exfat_bitmap_set(u8 *bitmap, int i) { bitmap[BITMAP_LOC(i)] |= (0x01 << BITMAP_SHIFT(i)); } /* end of Bitmap_set */ -void exfat_bitmap_clear(u8 *bitmap, s32 i) +void exfat_bitmap_clear(u8 *bitmap, int i) { bitmap[BITMAP_LOC(i)] &= ~(0x01 << BITMAP_SHIFT(i)); } /* end of Bitmap_clear */ diff --git a/exfat_bitmap.h b/exfat_bitmap.h index a04d310..4f482c7 100644 --- a/exfat_bitmap.h +++ b/exfat_bitmap.h @@ -48,8 +48,8 @@ /* Bitmap Manipulation Functions */ /*----------------------------------------------------------------------*/ -s32 exfat_bitmap_test(u8 *bitmap, s32 i); -void exfat_bitmap_set(u8 *bitmap, s32 i); -void exfat_bitmap_clear(u8 *bitmpa, s32 i); +s32 exfat_bitmap_test(u8 *bitmap, int i); +void exfat_bitmap_set(u8 *bitmap, int i); +void exfat_bitmap_clear(u8 *bitmpa, int i); #endif /* _EXFAT_BITMAP_H */ diff --git a/exfat_cache.c b/exfat_cache.c index 8deb65d..36a9717 100644 --- a/exfat_cache.c +++ b/exfat_cache.c @@ -75,7 +75,7 @@ s32 buf_init(struct super_block *sb) { FS_INFO_T *p_fs = &(EXFAT_SB(sb)->fs_info); - s32 i; + int i; /* LRU list */ p_fs->FAT_cache_lru_list.next = p_fs->FAT_cache_lru_list.prev = &p_fs->FAT_cache_lru_list; diff --git a/exfat_core.c b/exfat_core.c index a4eaa6c..b5e9b97 100644 --- a/exfat_core.c +++ b/exfat_core.c @@ -159,7 +159,7 @@ s32 ffsShutdown(void) /* ffsMountVol : mount the file system volume */ s32 ffsMountVol(struct super_block *sb) { - s32 i, ret; + int i, ret; PBR_SECTOR_T *p_pbr; struct buffer_head *tmp_bh = NULL; FS_INFO_T *p_fs = &(EXFAT_SB(sb)->fs_info); @@ -1439,7 +1439,7 @@ s32 ffsCreateDir(struct inode *inode, char *path, FILE_ID_T *fid) /* ffsReadDir : read a directory entry from the opened directory */ s32 ffsReadDir(struct inode *inode, DIR_ENTRY_T *dir_entry) { - s32 i, dentry, clu_offset; + int i, dentry, clu_offset; s32 dentries_per_clu, dentries_per_clu_bits = 0; u32 type, sector; CHAIN_T dir, clu; @@ -1789,7 +1789,7 @@ s32 clear_cluster(struct super_block *sb, u32 clu) s32 fat_alloc_cluster(struct super_block *sb, s32 num_alloc, CHAIN_T *p_chain) { - s32 i, num_clusters = 0; + int i, num_clusters = 0; u32 new_clu, last_clu = CLUSTER_32(~0), read_clu; FS_INFO_T *p_fs = &(EXFAT_SB(sb)->fs_info); @@ -1914,7 +1914,7 @@ void fat_free_cluster(struct super_block *sb, CHAIN_T *p_chain, s32 do_relse) s32 num_clusters = 0; u32 clu, prev; FS_INFO_T *p_fs = &(EXFAT_SB(sb)->fs_info); - s32 i; + int i; u32 sector; if ((p_chain->dir == CLUSTER_32(0)) || (p_chain->dir == CLUSTER_32(~0))) @@ -1953,7 +1953,7 @@ void exfat_free_cluster(struct super_block *sb, CHAIN_T *p_chain, s32 do_relse) s32 num_clusters = 0; u32 clu; FS_INFO_T *p_fs = &(EXFAT_SB(sb)->fs_info); - s32 i; + int i; u32 sector; if ((p_chain->dir == CLUSTER_32(0)) || (p_chain->dir == CLUSTER_32(~0))) @@ -2029,7 +2029,7 @@ u32 find_last_cluster(struct super_block *sb, CHAIN_T *p_chain) s32 count_num_clusters(struct super_block *sb, CHAIN_T *p_chain) { - s32 i, count = 0; + int i, count = 0; u32 clu; FS_INFO_T *p_fs = &(EXFAT_SB(sb)->fs_info); @@ -2055,7 +2055,7 @@ s32 count_num_clusters(struct super_block *sb, CHAIN_T *p_chain) s32 fat_count_used_clusters(struct super_block *sb) { - s32 i, count = 0; + int i, count = 0; u32 clu; FS_INFO_T *p_fs = &(EXFAT_SB(sb)->fs_info); @@ -2071,7 +2071,7 @@ s32 fat_count_used_clusters(struct super_block *sb) s32 exfat_count_used_clusters(struct super_block *sb) { - s32 i, map_i, map_b, count = 0; + int i, map_i, map_b, count = 0; u8 k; FS_INFO_T *p_fs = &(EXFAT_SB(sb)->fs_info); BD_INFO_T *p_bd = &(EXFAT_SB(sb)->bd_info); @@ -2110,7 +2110,7 @@ void exfat_chain_cont_cluster(struct super_block *sb, u32 chain, s32 len) s32 load_alloc_bitmap(struct super_block *sb) { - s32 i, j, ret; + int i, j, ret; u32 map_size; u32 type, sector; CHAIN_T clu; @@ -2179,7 +2179,7 @@ s32 load_alloc_bitmap(struct super_block *sb) void free_alloc_bitmap(struct super_block *sb) { - s32 i; + int i; FS_INFO_T *p_fs = &(EXFAT_SB(sb)->fs_info); brelse(p_fs->pbr_bh); @@ -2194,7 +2194,7 @@ void free_alloc_bitmap(struct super_block *sb) s32 set_alloc_bitmap(struct super_block *sb, u32 clu) { - s32 i, b; + int i, b; u32 sector; FS_INFO_T *p_fs = &(EXFAT_SB(sb)->fs_info); BD_INFO_T *p_bd = &(EXFAT_SB(sb)->bd_info); @@ -2211,7 +2211,7 @@ s32 set_alloc_bitmap(struct super_block *sb, u32 clu) s32 clr_alloc_bitmap(struct super_block *sb, u32 clu) { - s32 i, b; + int i, b; u32 sector; #ifdef CONFIG_EXFAT_DISCARD struct exfat_sb_info *sbi = EXFAT_SB(sb); @@ -2247,7 +2247,7 @@ s32 clr_alloc_bitmap(struct super_block *sb, u32 clu) u32 test_alloc_bitmap(struct super_block *sb, u32 clu) { - s32 i, map_i, map_b; + int i, map_i, map_b; u32 clu_base, clu_free; u8 k, clu_mask; FS_INFO_T *p_fs = &(EXFAT_SB(sb)->fs_info); @@ -2286,7 +2286,7 @@ u32 test_alloc_bitmap(struct super_block *sb, u32 clu) void sync_alloc_bitmap(struct super_block *sb) { - s32 i; + int i; FS_INFO_T *p_fs = &(EXFAT_SB(sb)->fs_info); if (p_fs->vol_amap == NULL) @@ -2301,7 +2301,7 @@ void sync_alloc_bitmap(struct super_block *sb) */ s32 __load_upcase_table(struct super_block *sb, u32 sector, u32 num_sectors, u32 utbl_checksum) { - s32 i, ret = FFS_ERROR; + int i, ret = FFS_ERROR; u32 j; FS_INFO_T *p_fs = &(EXFAT_SB(sb)->fs_info); BD_INFO_T *p_bd = &(EXFAT_SB(sb)->bd_info); @@ -2379,7 +2379,7 @@ s32 __load_upcase_table(struct super_block *sb, u32 sector, u32 num_sectors, u32 s32 __load_default_upcase_table(struct super_block *sb) { - s32 i, ret = FFS_ERROR; + int i, ret = FFS_ERROR; u32 j; FS_INFO_T *p_fs = &(EXFAT_SB(sb)->fs_info); @@ -2435,7 +2435,7 @@ s32 __load_default_upcase_table(struct super_block *sb) s32 load_upcase_table(struct super_block *sb) { - s32 i; + int i; u32 tbl_clu, tbl_size; u32 type, sector, num_sectors; CHAIN_T clu; @@ -2858,7 +2858,7 @@ s32 exfat_init_dir_entry(struct super_block *sb, CHAIN_T *p_dir, s32 entry, u32 s32 fat_init_ext_entry(struct super_block *sb, CHAIN_T *p_dir, s32 entry, s32 num_entries, UNI_NAME_T *p_uniname, DOS_NAME_T *p_dosname) { - s32 i; + int i; u32 sector; u8 chksum; u16 *uniname = p_uniname->name; @@ -2900,7 +2900,7 @@ s32 fat_init_ext_entry(struct super_block *sb, CHAIN_T *p_dir, s32 entry, s32 nu s32 exfat_init_ext_entry(struct super_block *sb, CHAIN_T *p_dir, s32 entry, s32 num_entries, UNI_NAME_T *p_uniname, DOS_NAME_T *p_dosname) { - s32 i; + int i; u32 sector; u16 *uniname = p_uniname->name; FILE_DENTRY_T *file_ep; @@ -2955,7 +2955,7 @@ void init_dos_entry(DOS_DENTRY_T *ep, u32 type, u32 start_clu) void init_ext_entry(EXT_DENTRY_T *ep, s32 order, u8 chksum, u16 *uniname) { - s32 i; + int i; u8 end = FALSE; fat_set_entry_type((DENTRY_T *) ep, TYPE_EXTEND); @@ -3027,7 +3027,7 @@ void init_strm_entry(STRM_DENTRY_T *ep, u8 flags, u32 start_clu, u64 size) void init_name_entry(NAME_DENTRY_T *ep, u16 *uniname) { - s32 i; + int i; exfat_set_entry_type((DENTRY_T *) ep, TYPE_EXTEND); ep->flags = 0x0; @@ -3042,7 +3042,7 @@ void init_name_entry(NAME_DENTRY_T *ep, u16 *uniname) void fat_delete_dir_entry(struct super_block *sb, CHAIN_T *p_dir, s32 entry, s32 order, s32 num_entries) { - s32 i; + int i; u32 sector; DENTRY_T *ep; FS_INFO_T *p_fs = &(EXFAT_SB(sb)->fs_info); @@ -3059,7 +3059,7 @@ void fat_delete_dir_entry(struct super_block *sb, CHAIN_T *p_dir, s32 entry, s32 void exfat_delete_dir_entry(struct super_block *sb, CHAIN_T *p_dir, s32 entry, s32 order, s32 num_entries) { - s32 i; + int i; u32 sector; DENTRY_T *ep; FS_INFO_T *p_fs = &(EXFAT_SB(sb)->fs_info); @@ -3076,7 +3076,7 @@ void exfat_delete_dir_entry(struct super_block *sb, CHAIN_T *p_dir, s32 entry, s void update_dir_checksum(struct super_block *sb, CHAIN_T *p_dir, s32 entry) { - s32 i, num_entries; + int i, num_entries; u32 sector; u16 chksum; FILE_DENTRY_T *file_ep; @@ -3472,7 +3472,7 @@ s32 write_partial_entries_in_entry_set (struct super_block *sb, ENTRY_SET_CACHE_ /* search EMPTY CONTINUOUS "num_entries" entries */ s32 search_deleted_or_unused_entry(struct super_block *sb, CHAIN_T *p_dir, s32 num_entries) { - s32 i, dentry, num_empty = 0; + int i, dentry, num_empty = 0; s32 dentries_per_clu; u32 type; CHAIN_T clu; @@ -3651,7 +3651,7 @@ s32 find_empty_entry(struct inode *inode, CHAIN_T *p_dir, s32 num_entries) -2 : entry with the name does not exist */ s32 fat_find_dir_entry(struct super_block *sb, CHAIN_T *p_dir, UNI_NAME_T *p_uniname, s32 num_entries, DOS_NAME_T *p_dosname, u32 type) { - s32 i, dentry = 0, lossy = FALSE, len; + int i, dentry = 0, lossy = FALSE, len; s32 order = 0, is_feasible_entry = TRUE, has_ext_entry = FALSE; s32 dentries_per_clu; u32 entry_type; @@ -3744,7 +3744,7 @@ s32 fat_find_dir_entry(struct super_block *sb, CHAIN_T *p_dir, UNI_NAME_T *p_uni -2 : entry with the name does not exist */ s32 exfat_find_dir_entry(struct super_block *sb, CHAIN_T *p_dir, UNI_NAME_T *p_uniname, s32 num_entries, DOS_NAME_T *p_dosname, u32 type) { - s32 i, dentry = 0, num_ext_entries = 0, len; + int i, dentry = 0, num_ext_entries = 0, len; s32 order = 0, is_feasible_entry = FALSE; s32 dentries_per_clu, num_empty = 0; u32 entry_type; @@ -3901,7 +3901,7 @@ s32 fat_count_ext_entries(struct super_block *sb, CHAIN_T *p_dir, s32 entry, DEN /* returns -1 on error */ s32 exfat_count_ext_entries(struct super_block *sb, CHAIN_T *p_dir, s32 entry, DENTRY_T *p_entry) { - s32 i, count = 0; + int i, count = 0; u32 type; FILE_DENTRY_T *file_ep = (FILE_DENTRY_T *) p_entry; DENTRY_T *ext_ep; @@ -3925,7 +3925,7 @@ s32 exfat_count_ext_entries(struct super_block *sb, CHAIN_T *p_dir, s32 entry, D /* returns -1 on error */ s32 count_dos_name_entries(struct super_block *sb, CHAIN_T *p_dir, u32 type) { - s32 i, count = 0; + int i, count = 0; s32 dentries_per_clu; u32 entry_type; CHAIN_T clu; @@ -3980,7 +3980,7 @@ s32 count_dos_name_entries(struct super_block *sb, CHAIN_T *p_dir, u32 type) bool is_dir_empty(struct super_block *sb, CHAIN_T *p_dir) { - s32 i, count = 0; + int i, count = 0; s32 dentries_per_clu; u32 type; CHAIN_T clu; @@ -4096,7 +4096,7 @@ void get_uni_name_from_dos_entry(struct super_block *sb, DOS_DENTRY_T *ep, UNI_N void fat_get_uni_name_from_ext_entry(struct super_block *sb, CHAIN_T *p_dir, s32 entry, u16 *uniname) { - s32 i; + int i; EXT_DENTRY_T *ep; FS_INFO_T *p_fs = &(EXFAT_SB(sb)->fs_info); @@ -4119,7 +4119,7 @@ void fat_get_uni_name_from_ext_entry(struct super_block *sb, CHAIN_T *p_dir, s32 void exfat_get_uni_name_from_ext_entry(struct super_block *sb, CHAIN_T *p_dir, s32 entry, u16 *uniname) { - s32 i; + int i; DENTRY_T *ep; ENTRY_SET_CACHE_T *es; FS_INFO_T *p_fs = &(EXFAT_SB(sb)->fs_info); @@ -4153,7 +4153,7 @@ void exfat_get_uni_name_from_ext_entry(struct super_block *sb, CHAIN_T *p_dir, s s32 extract_uni_name_from_ext_entry(EXT_DENTRY_T *ep, u16 *uniname, s32 order) { - s32 i, len = 0; + int i, len = 0; for (i = 0; i < 10; i += 2) { *uniname = GET16(ep->unicode_0_4+i); @@ -4198,7 +4198,7 @@ s32 extract_uni_name_from_ext_entry(EXT_DENTRY_T *ep, u16 *uniname, s32 order) s32 extract_uni_name_from_name_entry(NAME_DENTRY_T *ep, u16 *uniname, s32 order) { - s32 i, len = 0; + int i, len = 0; for (i = 0; i < 30; i += 2) { *uniname = GET16_A(ep->unicode_0_14+i); @@ -4215,7 +4215,7 @@ s32 extract_uni_name_from_name_entry(NAME_DENTRY_T *ep, u16 *uniname, s32 order) s32 fat_generate_dos_name(struct super_block *sb, CHAIN_T *p_dir, DOS_NAME_T *p_dosname) { - s32 i, j, count = 0, count_begin = FALSE; + int i, j, count = 0, count_begin = FALSE; s32 dentries_per_clu; u32 type; u8 bmap[128/* 1 ~ 1023 */]; @@ -4305,7 +4305,7 @@ s32 fat_generate_dos_name(struct super_block *sb, CHAIN_T *p_dir, DOS_NAME_T *p_ void fat_attach_count_to_dos_name(u8 *dosname, s32 count) { - s32 i, j, length; + int i, j, length; char str_count[6]; snprintf(str_count, sizeof str_count, "~%d", count); @@ -4358,7 +4358,7 @@ s32 exfat_calc_num_entries(UNI_NAME_T *p_uniname) u8 calc_checksum_1byte(void *data, s32 len, u8 chksum) { - s32 i; + int i; u8 *c = (u8 *) data; for (i = 0; i < len; i++, c++) @@ -4369,7 +4369,7 @@ u8 calc_checksum_1byte(void *data, s32 len, u8 chksum) u16 calc_checksum_2byte(void *data, s32 len, u16 chksum, s32 type) { - s32 i; + int i; u8 *c = (u8 *) data; switch (type) { @@ -4391,7 +4391,7 @@ u16 calc_checksum_2byte(void *data, s32 len, u16 chksum, s32 type) u32 calc_checksum_4byte(void *data, s32 len, u32 chksum, s32 type) { - s32 i; + int i; u8 *c = (u8 *) data; switch (type) { diff --git a/exfat_nls.c b/exfat_nls.c index fcc3cb2..382bdc3 100644 --- a/exfat_nls.c +++ b/exfat_nls.c @@ -104,7 +104,7 @@ s32 nls_dosname_cmp(struct super_block *sb, u8 *a, u8 *b) s32 nls_uniname_cmp(struct super_block *sb, u16 *a, u16 *b) { - s32 i; + int i; for (i = 0; i < MAX_NAME_LENGTH; i++, a++, b++) { if (nls_upper(sb, *a) != nls_upper(sb, *b)) @@ -117,7 +117,7 @@ s32 nls_uniname_cmp(struct super_block *sb, u16 *a, u16 *b) void nls_uniname_to_dosname(struct super_block *sb, DOS_NAME_T *p_dosname, UNI_NAME_T *p_uniname, s32 *p_lossy) { - s32 i, j, len, lossy = FALSE; + int i, j, len, lossy = FALSE; u8 buf[MAX_CHARSET_SIZE]; u8 lower = 0, upper = 0; u8 *dosname = p_dosname->name; @@ -236,7 +236,7 @@ void nls_uniname_to_dosname(struct super_block *sb, DOS_NAME_T *p_dosname, UNI_N void nls_dosname_to_uniname(struct super_block *sb, UNI_NAME_T *p_uniname, DOS_NAME_T *p_dosname) { - s32 i = 0, j, n = 0; + int i = 0, j, n = 0; u8 buf[DOS_NAME_LENGTH+2]; u8 *dosname = p_dosname->name; u16 *uniname = p_uniname->name; @@ -289,7 +289,7 @@ void nls_dosname_to_uniname(struct super_block *sb, UNI_NAME_T *p_uniname, DOS_N void nls_uniname_to_cstring(struct super_block *sb, u8 *p_cstring, UNI_NAME_T *p_uniname) { - s32 i, j, len; + int i, j, len; u8 buf[MAX_CHARSET_SIZE]; u16 *uniname = p_uniname->name; struct nls_table *nls = EXFAT_SB(sb)->nls_io; @@ -323,7 +323,7 @@ void nls_uniname_to_cstring(struct super_block *sb, u8 *p_cstring, UNI_NAME_T *p void nls_cstring_to_uniname(struct super_block *sb, UNI_NAME_T *p_uniname, u8 *p_cstring, s32 *p_lossy) { - s32 i, j, lossy = FALSE; + int i, j, lossy = FALSE; u8 *end_of_name; u8 upname[MAX_NAME_LENGTH * 2]; u16 *uniname = p_uniname->name; @@ -361,7 +361,8 @@ void nls_cstring_to_uniname(struct super_block *sb, UNI_NAME_T *p_uniname, u8 *p else { i = j = 0; while (j < (MAX_NAME_LENGTH-1)) { - if (*(p_cstring+i) == '\0') break; + if (*(p_cstring+i) == '\0') + break; i += convert_ch_to_uni(nls, uniname, (u8 *)(p_cstring+i), &lossy);