for (j = 0; j < p_fs->map_sectors; j++) {
p_fs->vol_amap[j] = NULL;
- ret = sector_read(sb, sector + j, &(p_fs->vol_amap[j]), 1);
+ ret = sector_read(sb, sector + j, &p_fs->vol_amap[j], 1);
if (ret != FFS_SUCCESS) {
/* release all buffers and free vol_amap */
i = 0;
{
struct dos_dentry_t *ep = (struct dos_dentry_t *)p_entry;
- if (*(ep->name) == 0x0)
+ if (*ep->name == 0x0)
return TYPE_UNUSED;
- else if (*(ep->name) == 0xE5)
+ else if (*ep->name == 0xE5)
return TYPE_DELETED;
else if (ep->attr == ATTR_EXTEND)
struct dos_dentry_t *ep = (struct dos_dentry_t *)p_entry;
if (type == TYPE_UNUSED)
- *(ep->name) = 0x0;
+ *ep->name = 0x0;
else if (type == TYPE_DELETED)
- *(ep->name) = 0xE5;
+ *ep->name = 0xE5;
else if (type == TYPE_EXTEND)
ep->attr = ATTR_EXTEND;
u16 chksum = 0;
s32 chksum_type = CS_DIR_ENTRY, i;
- ep = (struct dentry_t *)&(es->__buf);
+ ep = (struct dentry_t *)&es->__buf;
for (i = 0; i < es->num_entries; i++) {
pr_debug("%s ep %p\n", __func__, ep);
chksum = calc_checksum_2byte((void *)ep, DENTRY_SIZE, chksum,
chksum_type = CS_DEFAULT;
}
- ep = (struct dentry_t *)&(es->__buf);
+ ep = (struct dentry_t *)&es->__buf;
SET16_A(((struct file_dentry_t *)ep)->checksum, chksum);
write_whole_entry_set(sb, es);
}
}
if (file_ep)
- *file_ep = (struct dentry_t *)&(es->__buf);
+ *file_ep = (struct dentry_t *)&es->__buf;
pr_debug("%s exiting es %p sec %llu offset %d flags %d, num_entries %u buf ptr %p\n",
__func__, es, (unsigned long long)es->sector, es->offset,
struct fs_info_t *p_fs = &(EXFAT_SB(sb)->fs_info);
struct bd_info_t *p_bd = &(EXFAT_SB(sb)->bd_info);
u32 clu;
- u8 *buf, *esbuf = (u8 *)&(es->__buf);
+ u8 *buf, *esbuf = (u8 *)&es->__buf;
pr_debug("%s entered es %p sec %llu off %d count %d\n",
__func__, es, (unsigned long long)sec, off, count);
struct chain_t dir;
/* vaidity check */
- if (ep + count > ((struct dentry_t *)&(es->__buf)) + es->num_entries)
+ if (ep + count > ((struct dentry_t *)&es->__buf) + es->num_entries)
return FFS_ERROR;
dir.dir = GET_CLUSTER_FROM_SECTOR(es->sector);
byte_offset = (es->sector - START_SECTOR(dir.dir)) <<
p_bd->sector_size_bits;
- byte_offset += ((void **)ep - &(es->__buf)) + es->offset;
+ byte_offset += ((void **)ep - &es->__buf) + es->offset;
ret = _walk_fat_chain(sb, &dir, byte_offset, &clu);
if (ret != FFS_SUCCESS)
p_fs->fs_func->set_entry_flag(ep, p_dir->flags);
buf_modify(sb, sector);
- update_dir_checksum(sb, &(fid->dir),
+ update_dir_checksum(sb, &fid->dir,
fid->entry);
}
}
/* (3) update the direcoty entry */
if (p_fs->vol_type == EXFAT) {
- es = get_entry_set_in_dir(sb, &(fid->dir), fid->entry,
+ es = get_entry_set_in_dir(sb, &fid->dir, fid->entry,
ES_ALL_ENTRIES, &ep);
if (!es)
goto err_out;
ep2 = ep + 1;
} else {
- ep = get_entry_in_dir(sb, &(fid->dir), fid->entry, §or);
+ ep = get_entry_in_dir(sb, &fid->dir, fid->entry, §or);
if (!ep)
goto err_out;
ep2 = ep;
}
ep2 = ep + 1;
} else {
- ep = get_entry_in_dir(sb, &(fid->dir), fid->entry, §or);
+ ep = get_entry_in_dir(sb, &fid->dir, fid->entry, §or);
if (!ep) {
ret = FFS_MEDIAERR;
goto out;
update_parent_info(new_fid, new_parent_inode);
- p_dir = &(new_fid->dir);
+ p_dir = &new_fid->dir;
new_entry = new_fid->entry;
ep = get_entry_in_dir(sb, p_dir, new_entry, NULL);
if (!ep)
/* get the directory entry of given file */
if (p_fs->vol_type == EXFAT) {
- es = get_entry_set_in_dir(sb, &(fid->dir), fid->entry,
+ es = get_entry_set_in_dir(sb, &fid->dir, fid->entry,
ES_ALL_ENTRIES, &ep);
if (!es) {
ret = FFS_MEDIAERR;
goto out;
}
} else {
- ep = get_entry_in_dir(sb, &(fid->dir), fid->entry, §or);
+ ep = get_entry_in_dir(sb, &fid->dir, fid->entry, §or);
if (!ep) {
ret = FFS_MEDIAERR;
goto out;
/* get the directory entry of given file or directory */
if (p_fs->vol_type == EXFAT) {
- es = get_entry_set_in_dir(sb, &(fid->dir), fid->entry,
+ es = get_entry_set_in_dir(sb, &fid->dir, fid->entry,
ES_2_ENTRIES, &ep);
if (!es) {
ret = FFS_MEDIAERR;
}
ep2 = ep + 1;
} else {
- ep = get_entry_in_dir(sb, &(fid->dir), fid->entry, §or);
+ ep = get_entry_in_dir(sb, &fid->dir, fid->entry, §or);
if (!ep) {
ret = FFS_MEDIAERR;
goto out;
memset((char *)&info->AccessTimestamp, 0, sizeof(struct date_time_t));
- *(uni_name.name) = 0x0;
+ *uni_name.name = 0x0;
/* XXX this is very bad for exfat cuz name is already included in es.
* API should be revised
*/
- p_fs->fs_func->get_uni_name_from_ext_entry(sb, &(fid->dir), fid->entry,
+ p_fs->fs_func->get_uni_name_from_ext_entry(sb, &fid->dir, fid->entry,
uni_name.name);
if (*uni_name.name == 0x0 && p_fs->vol_type != EXFAT)
get_uni_name_from_dos_entry(sb, (struct dos_dentry_t *)ep,
/* get the directory entry of given file or directory */
if (p_fs->vol_type == EXFAT) {
- es = get_entry_set_in_dir(sb, &(fid->dir), fid->entry,
+ es = get_entry_set_in_dir(sb, &fid->dir, fid->entry,
ES_ALL_ENTRIES, &ep);
if (!es) {
ret = FFS_MEDIAERR;
ep2 = ep + 1;
} else {
/* for other than exfat */
- ep = get_entry_in_dir(sb, &(fid->dir), fid->entry, §or);
+ ep = get_entry_in_dir(sb, &fid->dir, fid->entry, §or);
if (!ep) {
ret = FFS_MEDIAERR;
goto out;
/* (3) update directory entry */
if (modified) {
if (p_fs->vol_type != EXFAT) {
- ep = get_entry_in_dir(sb, &(fid->dir),
+ ep = get_entry_in_dir(sb, &fid->dir,
fid->entry, §or);
if (!ep) {
ret = FFS_MEDIAERR;
memset((char *)&dir_entry->AccessTimestamp, 0,
sizeof(struct date_time_t));
- *(uni_name.name) = 0x0;
+ *uni_name.name = 0x0;
fs_func->get_uni_name_from_ext_entry(sb, &dir, dentry,
uni_name.name);
if (*uni_name.name == 0x0 && p_fs->vol_type != EXFAT)
}
}
- *(dir_entry->Name) = '\0';
+ *dir_entry->Name = '\0';
fid->rwoffset = (s64)(++dentry);
struct inode *inode = file_inode(filp);
struct super_block *sb = inode->i_sb;
struct exfat_sb_info *sbi = EXFAT_SB(sb);
- struct fs_info_t *p_fs = &(sbi->fs_info);
+ struct fs_info_t *p_fs = &sbi->fs_info;
struct bd_info_t *p_bd = &(EXFAT_SB(sb)->bd_info);
struct dir_entry_t de;
unsigned long inum;
{
struct super_block *sb = dir->i_sb;
struct exfat_sb_info *sbi = EXFAT_SB(sb);
- struct fs_info_t *p_fs = &(sbi->fs_info);
+ struct fs_info_t *p_fs = &sbi->fs_info;
return p_fs->vol_id;
}
{
struct super_block *sb = inode->i_sb;
struct exfat_sb_info *sbi = EXFAT_SB(sb);
- struct fs_info_t *p_fs = &(sbi->fs_info);
+ struct fs_info_t *p_fs = &sbi->fs_info;
int err;
__lock_super(sb);
{
struct super_block *sb = inode->i_sb;
struct exfat_sb_info *sbi = EXFAT_SB(sb);
- struct fs_info_t *p_fs = &(sbi->fs_info);
- struct bd_info_t *p_bd = &(sbi->bd_info);
+ struct fs_info_t *p_fs = &sbi->fs_info;
+ struct bd_info_t *p_bd = &sbi->bd_info;
const unsigned long blocksize = sb->s_blocksize;
const unsigned char blocksize_bits = sb->s_blocksize_bits;
sector_t last_block;
static int exfat_fill_inode(struct inode *inode, struct file_id_t *fid)
{
struct exfat_sb_info *sbi = EXFAT_SB(inode->i_sb);
- struct fs_info_t *p_fs = &(sbi->fs_info);
+ struct fs_info_t *p_fs = &sbi->fs_info;
struct dir_entry_t info;
memcpy(&(EXFAT_I(inode)->fid), fid, sizeof(struct file_id_t));
{
struct super_block *sb = inode->i_sb;
struct exfat_sb_info *sbi = EXFAT_SB(sb);
- struct fs_info_t *p_fs = &(sbi->fs_info);
+ struct fs_info_t *p_fs = &sbi->fs_info;
struct dir_entry_t info;
EXFAT_I(inode)->fid.dir.dir = p_fs->root_dir;