Skip to content

Commit b2837fc

Browse files
Anton SalikhmetovChristoph Hellwig
authored andcommitted
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: Anton Salikhmetov <[email protected]> Signed-off-by: Christoph Hellwig <[email protected]>
1 parent 20b7643 commit b2837fc

File tree

3 files changed

+14
-14
lines changed

3 files changed

+14
-14
lines changed

fs/hfsplus/bnode.c

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -363,9 +363,8 @@ void hfs_bnode_unlink(struct hfs_bnode *node)
363363
tree->leaf_tail = node->prev;
364364

365365
/* move down? */
366-
if (!node->prev && !node->next) {
366+
if (!node->prev && !node->next)
367367
dprint(DBG_BNODE_MOD, "hfs_btree_del_level\n");
368-
}
369368
if (!node->parent) {
370369
tree->root = 0;
371370
tree->depth = 0;
@@ -392,11 +391,9 @@ struct hfs_bnode *hfs_bnode_findhash(struct hfs_btree *tree, u32 cnid)
392391
}
393392

394393
for (node = tree->node_hash[hfs_bnode_hash(cnid)];
395-
node; node = node->next_hash) {
396-
if (node->this == cnid) {
394+
node; node = node->next_hash)
395+
if (node->this == cnid)
397396
return node;
398-
}
399-
}
400397
return NULL;
401398
}
402399

fs/hfsplus/extents.c

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -397,12 +397,13 @@ int hfsplus_file_extend(struct inode *inode)
397397
u32 start, len, goal;
398398
int res;
399399

400-
if (sbi->alloc_file->i_size * 8 <
401-
sbi->total_blocks - sbi->free_blocks + 8) {
400+
if (sbi->total_blocks - sbi->free_blocks + 8 >
401+
sbi->alloc_file->i_size * 8) {
402402
/* extend alloc file */
403-
printk(KERN_ERR "hfs: extend alloc file! (%Lu,%u,%u)\n",
404-
sbi->alloc_file->i_size * 8,
405-
sbi->total_blocks, sbi->free_blocks);
403+
printk(KERN_ERR "hfs: extend alloc file! "
404+
"(%llu,%u,%u)\n",
405+
sbi->alloc_file->i_size * 8,
406+
sbi->total_blocks, sbi->free_blocks);
406407
return -ENOSPC;
407408
}
408409

@@ -490,8 +491,9 @@ void hfsplus_file_truncate(struct inode *inode)
490491
u32 alloc_cnt, blk_cnt, start;
491492
int res;
492493

493-
dprint(DBG_INODE, "truncate: %lu, %Lu -> %Lu\n",
494-
inode->i_ino, (long long)hip->phys_size, inode->i_size);
494+
dprint(DBG_INODE, "truncate: %lu, %llu -> %llu\n",
495+
inode->i_ino, (long long)hip->phys_size,
496+
inode->i_size);
495497

496498
if (inode->i_size > hip->phys_size) {
497499
struct address_space *mapping = inode->i_mapping;

fs/hfsplus/hfsplus_fs.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,8 @@
3131
#define DBG_MASK (0)
3232

3333
#define dprint(flg, fmt, args...) \
34-
if (flg & DBG_MASK) printk(fmt , ## args)
34+
if (flg & DBG_MASK) \
35+
printk(fmt , ## args)
3536

3637
/* Runtime config options */
3738
#define HFSPLUS_DEF_CR_TYPE 0x3F3F3F3F /* '????' */

0 commit comments

Comments
 (0)