From: Anton Salikhmetov <alexo@tuxera.com>
To: hch@tuxera.com, linux-fsdevel@vger.kernel.org
Subject: [PATCH 4/5] hfsplus: %L-to-%ll, macro correction, and remove unneeded braces
Date: Thu, 16 Dec 2010 18:08:41 +0200 [thread overview]
Message-ID: <1292515722-17884-5-git-send-email-alexo@tuxera.com> (raw)
In-Reply-To: <1292515722-17884-1-git-send-email-alexo@tuxera.com>
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 <alexo@tuxera.com>
---
fs/hfsplus/bnode.c | 9 +++------
fs/hfsplus/extents.c | 16 +++++++++-------
fs/hfsplus/hfsplus_fs.h | 3 ++-
3 files changed, 14 insertions(+), 14 deletions(-)
diff --git a/fs/hfsplus/bnode.c b/fs/hfsplus/bnode.c
index c8f4ea4..1c42cc5 100644
--- a/fs/hfsplus/bnode.c
+++ b/fs/hfsplus/bnode.c
@@ -363,9 +363,8 @@ void hfs_bnode_unlink(struct hfs_bnode *node)
tree->leaf_tail = node->prev;
/* move down? */
- if (!node->prev && !node->next) {
+ if (!node->prev && !node->next)
dprint(DBG_BNODE_MOD, "hfs_btree_del_level\n");
- }
if (!node->parent) {
tree->root = 0;
tree->depth = 0;
@@ -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)];
- node; node = node->next_hash) {
- if (node->this == cnid) {
+ node; node = node->next_hash)
+ if (node->this == cnid)
return node;
- }
- }
return NULL;
}
diff --git a/fs/hfsplus/extents.c b/fs/hfsplus/extents.c
index 4b693b5..52a0bca 100644
--- a/fs/hfsplus/extents.c
+++ b/fs/hfsplus/extents.c
@@ -397,12 +397,13 @@ int hfsplus_file_extend(struct inode *inode)
u32 start, len, goal;
int res;
- if (sbi->alloc_file->i_size * 8 <
- sbi->total_blocks - sbi->free_blocks + 8) {
+ if (sbi->total_blocks - sbi->free_blocks + 8 >
+ sbi->alloc_file->i_size * 8) {
/* extend alloc file */
- printk(KERN_ERR "hfs: extend alloc file! (%Lu,%u,%u)\n",
- sbi->alloc_file->i_size * 8,
- sbi->total_blocks, sbi->free_blocks);
+ printk(KERN_ERR "hfs: extend alloc file! "
+ "(%llu,%u,%u)\n",
+ sbi->alloc_file->i_size * 8,
+ sbi->total_blocks, sbi->free_blocks);
return -ENOSPC;
}
@@ -490,8 +491,9 @@ void hfsplus_file_truncate(struct inode *inode)
u32 alloc_cnt, blk_cnt, start;
int res;
- dprint(DBG_INODE, "truncate: %lu, %Lu -> %Lu\n",
- inode->i_ino, (long long)hip->phys_size, inode->i_size);
+ dprint(DBG_INODE, "truncate: %lu, %llu -> %llu\n",
+ inode->i_ino, (long long)hip->phys_size,
+ inode->i_size);
if (inode->i_size > hip->phys_size) {
struct address_space *mapping = inode->i_mapping;
diff --git a/fs/hfsplus/hfsplus_fs.h b/fs/hfsplus/hfsplus_fs.h
index a15e1c1..f7cbdf8 100644
--- a/fs/hfsplus/hfsplus_fs.h
+++ b/fs/hfsplus/hfsplus_fs.h
@@ -31,7 +31,8 @@
#define DBG_MASK (0)
#define dprint(flg, fmt, args...) \
- if (flg & DBG_MASK) printk(fmt , ## args)
+ if (flg & DBG_MASK) \
+ printk(fmt , ## args)
/* Runtime config options */
#define HFSPLUS_DEF_CR_TYPE 0x3F3F3F3F /* '????' */
--
1.7.2.3
next prev parent reply other threads:[~2010-12-16 16:09 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-12-16 16:08 [PATCH 0/5] hfsplus: clean-up based on checkpatch.pl Anton Salikhmetov
2010-12-16 16:08 ` [PATCH 1/5] hfsplus: over 80 character lines clean-up Anton Salikhmetov
2010-12-16 16:08 ` [PATCH 2/5] hfsplus: C99 comments clean-up Anton Salikhmetov
2010-12-16 16:08 ` [PATCH 3/5] hfsplus: spaces/indentation clean-up Anton Salikhmetov
2010-12-16 16:08 ` Anton Salikhmetov [this message]
2010-12-16 16:08 ` [PATCH 5/5] hfsplus: assignments inside `if' condition clean-up Anton Salikhmetov
2010-12-16 17:09 ` Andreas Dilger
2010-12-16 17:13 ` Christoph Hellwig
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1292515722-17884-5-git-send-email-alexo@tuxera.com \
--to=alexo@tuxera.com \
--cc=hch@tuxera.com \
--cc=linux-fsdevel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).