linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Anton Salikhmetov <alexo@tuxera.com>
To: hch@tuxera.com, linux-fsdevel@vger.kernel.org
Subject: [PATCH 2/5] hfsplus: C99 comments clean-up
Date: Thu, 16 Dec 2010 18:08:39 +0200	[thread overview]
Message-ID: <1292515722-17884-3-git-send-email-alexo@tuxera.com> (raw)
In-Reply-To: <1292515722-17884-1-git-send-email-alexo@tuxera.com>

Match coding style restriction against C99 comments where
checkpatch.pl reported errors about their usage.

Signed-off-by: Anton Salikhmetov <alexo@tuxera.com>
---
 fs/hfsplus/bnode.c      |   18 ++++++++++--------
 fs/hfsplus/extents.c    |    2 +-
 fs/hfsplus/hfsplus_fs.h |    9 +++++----
 3 files changed, 16 insertions(+), 13 deletions(-)

diff --git a/fs/hfsplus/bnode.c b/fs/hfsplus/bnode.c
index cf7dc8d..c8f4ea4 100644
--- a/fs/hfsplus/bnode.c
+++ b/fs/hfsplus/bnode.c
@@ -42,7 +42,7 @@ void hfs_bnode_read(struct hfs_bnode *node, void *buf, int off, int len)
 u16 hfs_bnode_read_u16(struct hfs_bnode *node, int off)
 {
 	__be16 data;
-	// optimize later...
+	/* TODO: optimize later... */
 	hfs_bnode_read(node, &data, off, 2);
 	return be16_to_cpu(data);
 }
@@ -50,7 +50,7 @@ u16 hfs_bnode_read_u16(struct hfs_bnode *node, int off)
 u8 hfs_bnode_read_u8(struct hfs_bnode *node, int off)
 {
 	u8 data;
-	// optimize later...
+	/* TODO: optimize later... */
 	hfs_bnode_read(node, &data, off, 1);
 	return data;
 }
@@ -96,7 +96,7 @@ void hfs_bnode_write(struct hfs_bnode *node, void *buf, int off, int len)
 void hfs_bnode_write_u16(struct hfs_bnode *node, int off, u16 data)
 {
 	__be16 v = cpu_to_be16(data);
-	// optimize later...
+	/* TODO: optimize later... */
 	hfs_bnode_write(node, &v, off, 2);
 }
 
@@ -362,7 +362,7 @@ void hfs_bnode_unlink(struct hfs_bnode *node)
 	} else if (node->type == HFS_NODE_LEAF)
 		tree->leaf_tail = node->prev;
 
-	// move down?
+	/* move down? */
 	if (!node->prev && !node->next) {
 		dprint(DBG_BNODE_MOD, "hfs_btree_del_level\n");
 	}
@@ -569,11 +569,13 @@ node_error:
 
 void hfs_bnode_free(struct hfs_bnode *node)
 {
-	//int i;
+#if 0
+	int i;
 
-	//for (i = 0; i < node->tree->pages_per_bnode; i++)
-	//	if (node->page[i])
-	//		page_cache_release(node->page[i]);
+	for (i = 0; i < node->tree->pages_per_bnode; i++)
+		if (node->page[i])
+			page_cache_release(node->page[i]);
+#endif
 	kfree(node);
 }
 
diff --git a/fs/hfsplus/extents.c b/fs/hfsplus/extents.c
index 1ae2fe5..4b693b5 100644
--- a/fs/hfsplus/extents.c
+++ b/fs/hfsplus/extents.c
@@ -399,7 +399,7 @@ int hfsplus_file_extend(struct inode *inode)
 
 	if (sbi->alloc_file->i_size * 8 <
 	    sbi->total_blocks - sbi->free_blocks + 8) {
-		// extend alloc file
+		/* 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);
diff --git a/fs/hfsplus/hfsplus_fs.h b/fs/hfsplus/hfsplus_fs.h
index c4abec1..a15e1c1 100644
--- a/fs/hfsplus/hfsplus_fs.h
+++ b/fs/hfsplus/hfsplus_fs.h
@@ -23,9 +23,11 @@
 #define DBG_EXTENT	0x00000020
 #define DBG_BITMAP	0x00000040
 
-//#define DBG_MASK	(DBG_EXTENT|DBG_INODE|DBG_BNODE_MOD)
-//#define DBG_MASK	(DBG_BNODE_MOD|DBG_CAT_MOD|DBG_INODE)
-//#define DBG_MASK	(DBG_CAT_MOD|DBG_BNODE_REFS|DBG_INODE|DBG_EXTENT)
+#if 0
+#define DBG_MASK	(DBG_EXTENT|DBG_INODE|DBG_BNODE_MOD)
+#define DBG_MASK	(DBG_BNODE_MOD|DBG_CAT_MOD|DBG_INODE)
+#define DBG_MASK	(DBG_CAT_MOD|DBG_BNODE_REFS|DBG_INODE|DBG_EXTENT)
+#endif
 #define DBG_MASK	(0)
 
 #define dprint(flg, fmt, args...) \
@@ -62,7 +64,6 @@ struct hfs_btree {
 	unsigned int max_key_len;
 	unsigned int depth;
 
-	//unsigned int map1_size, map_size;
 	struct mutex tree_lock;
 
 	unsigned int pages_per_bnode;
-- 
1.7.2.3


  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 ` Anton Salikhmetov [this message]
2010-12-16 16:08 ` [PATCH 3/5] hfsplus: spaces/indentation clean-up Anton Salikhmetov
2010-12-16 16:08 ` [PATCH 4/5] hfsplus: %L-to-%ll, macro correction, and remove unneeded braces Anton Salikhmetov
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-3-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).