Commit b2837fcf authored by Anton Salikhmetov's avatar Anton Salikhmetov Committed by Christoph Hellwig

hfsplus: %L-to-%ll, macro correction, and remove unneeded braces

Clean-up based on checkpatch.pl report against unnecessary braces
(`{' and `}'), non-standard format option %Lu (%llu recommended)
as well as one trailing statement in a macro definition which
should have been on the next line.
Signed-off-by: default avatarAnton Salikhmetov <alexo@tuxera.com>
Signed-off-by: default avatarChristoph Hellwig <hch@tuxera.com>
parent 20b7643d
...@@ -363,9 +363,8 @@ void hfs_bnode_unlink(struct hfs_bnode *node) ...@@ -363,9 +363,8 @@ void hfs_bnode_unlink(struct hfs_bnode *node)
tree->leaf_tail = node->prev; tree->leaf_tail = node->prev;
/* move down? */ /* move down? */
if (!node->prev && !node->next) { if (!node->prev && !node->next)
dprint(DBG_BNODE_MOD, "hfs_btree_del_level\n"); dprint(DBG_BNODE_MOD, "hfs_btree_del_level\n");
}
if (!node->parent) { if (!node->parent) {
tree->root = 0; tree->root = 0;
tree->depth = 0; tree->depth = 0;
...@@ -392,11 +391,9 @@ struct hfs_bnode *hfs_bnode_findhash(struct hfs_btree *tree, u32 cnid) ...@@ -392,11 +391,9 @@ struct hfs_bnode *hfs_bnode_findhash(struct hfs_btree *tree, u32 cnid)
} }
for (node = tree->node_hash[hfs_bnode_hash(cnid)]; for (node = tree->node_hash[hfs_bnode_hash(cnid)];
node; node = node->next_hash) { node; node = node->next_hash)
if (node->this == cnid) { if (node->this == cnid)
return node; return node;
}
}
return NULL; return NULL;
} }
......
...@@ -397,12 +397,13 @@ int hfsplus_file_extend(struct inode *inode) ...@@ -397,12 +397,13 @@ int hfsplus_file_extend(struct inode *inode)
u32 start, len, goal; u32 start, len, goal;
int res; int res;
if (sbi->alloc_file->i_size * 8 < if (sbi->total_blocks - sbi->free_blocks + 8 >
sbi->total_blocks - sbi->free_blocks + 8) { sbi->alloc_file->i_size * 8) {
/* extend alloc file */ /* extend alloc file */
printk(KERN_ERR "hfs: extend alloc file! (%Lu,%u,%u)\n", printk(KERN_ERR "hfs: extend alloc file! "
sbi->alloc_file->i_size * 8, "(%llu,%u,%u)\n",
sbi->total_blocks, sbi->free_blocks); sbi->alloc_file->i_size * 8,
sbi->total_blocks, sbi->free_blocks);
return -ENOSPC; return -ENOSPC;
} }
...@@ -490,8 +491,9 @@ void hfsplus_file_truncate(struct inode *inode) ...@@ -490,8 +491,9 @@ void hfsplus_file_truncate(struct inode *inode)
u32 alloc_cnt, blk_cnt, start; u32 alloc_cnt, blk_cnt, start;
int res; int res;
dprint(DBG_INODE, "truncate: %lu, %Lu -> %Lu\n", dprint(DBG_INODE, "truncate: %lu, %llu -> %llu\n",
inode->i_ino, (long long)hip->phys_size, inode->i_size); inode->i_ino, (long long)hip->phys_size,
inode->i_size);
if (inode->i_size > hip->phys_size) { if (inode->i_size > hip->phys_size) {
struct address_space *mapping = inode->i_mapping; struct address_space *mapping = inode->i_mapping;
......
...@@ -31,7 +31,8 @@ ...@@ -31,7 +31,8 @@
#define DBG_MASK (0) #define DBG_MASK (0)
#define dprint(flg, fmt, args...) \ #define dprint(flg, fmt, args...) \
if (flg & DBG_MASK) printk(fmt , ## args) if (flg & DBG_MASK) \
printk(fmt , ## args)
/* Runtime config options */ /* Runtime config options */
#define HFSPLUS_DEF_CR_TYPE 0x3F3F3F3F /* '????' */ #define HFSPLUS_DEF_CR_TYPE 0x3F3F3F3F /* '????' */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment