linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Erez Zadok <ezk@cs.sunysb.edu>
To: akpm@linux-foundation.org
Cc: linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org,
	viro@ftp.linux.org.uk, hch@infradead.org,
	Erez Zadok <ezk@cs.sunysb.edu>
Subject: [PATCH 18/19] Unionfs: coding style: miscellaneous fixes
Date: Mon,  1 Oct 2007 01:50:55 -0400	[thread overview]
Message-ID: <11912178642252-git-send-email-ezk@cs.sunysb.edu> (raw)
In-Reply-To: <1191217856647-git-send-email-ezk@cs.sunysb.edu>

No braces around single-statement if's.
No externs in .c files.
use <linux/mman.h> not <asm/mman.h>.
Use (foo *) not (foo*).

Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
---
 fs/unionfs/rdstate.c |    3 +--
 fs/unionfs/super.c   |    3 +--
 fs/unionfs/union.h   |    3 ++-
 fs/unionfs/xattr.c   |    6 +++---
 4 files changed, 7 insertions(+), 8 deletions(-)

diff --git a/fs/unionfs/rdstate.c b/fs/unionfs/rdstate.c
index 93ea588..0df5f52 100644
--- a/fs/unionfs/rdstate.c
+++ b/fs/unionfs/rdstate.c
@@ -218,12 +218,11 @@ struct filldir_node *find_filldir_node(struct unionfs_dir_state *rdstate,
 			 * if the duplicate is in this branch, then the file
 			 * system is corrupted.
 			 */
-			if (unlikely(cursor->bindex == rdstate->bindex)) {
+			if (unlikely(cursor->bindex == rdstate->bindex))
 				printk(KERN_ERR "unionfs: filldir: possible "
 				       "I/O error: a file is duplicated "
 				       "in the same branch %d: %s\n",
 				       rdstate->bindex, cursor->name);
-			}
 			break;
 		}
 	}
diff --git a/fs/unionfs/super.c b/fs/unionfs/super.c
index 0a0b075..515689d 100644
--- a/fs/unionfs/super.c
+++ b/fs/unionfs/super.c
@@ -26,7 +26,6 @@ static struct kmem_cache *unionfs_inode_cachep;
 
 static void unionfs_read_inode(struct inode *inode)
 {
-	extern struct address_space_operations unionfs_aops;
 	int size;
 	struct unionfs_inode_info *info = UNIONFS_I(inode);
 
@@ -965,7 +964,7 @@ static int unionfs_show_options(struct seq_file *m, struct vfsmount *mnt)
 
 	unionfs_lock_dentry(sb->s_root);
 
-	tmp_page = (char*) __get_free_page(GFP_KERNEL);
+	tmp_page = (char *) __get_free_page(GFP_KERNEL);
 	if (unlikely(!tmp_page)) {
 		ret = -ENOMEM;
 		goto out;
diff --git a/fs/unionfs/union.h b/fs/unionfs/union.h
index ee8324c..8eb2ee4 100644
--- a/fs/unionfs/union.h
+++ b/fs/unionfs/union.h
@@ -44,8 +44,8 @@
 #include <linux/magic.h>
 #include <linux/log2.h>
 #include <linux/poison.h>
+#include <linux/mman.h>
 
-#include <asm/mman.h>
 #include <asm/system.h>
 
 #include <linux/union_fs.h>
@@ -70,6 +70,7 @@ extern struct inode_operations unionfs_dir_iops;
 extern struct inode_operations unionfs_symlink_iops;
 extern struct super_operations unionfs_sops;
 extern struct dentry_operations unionfs_dops;
+extern struct address_space_operations unionfs_aops;
 
 /* How long should an entry be allowed to persist */
 #define RDCACHE_JIFFIES	(5*HZ)
diff --git a/fs/unionfs/xattr.c b/fs/unionfs/xattr.c
index 71ff7d0..602cedf 100644
--- a/fs/unionfs/xattr.c
+++ b/fs/unionfs/xattr.c
@@ -55,7 +55,7 @@ ssize_t unionfs_getxattr(struct dentry *dentry, const char *name, void *value,
 
 	lower_dentry = unionfs_lower_dentry(dentry);
 
-	err = vfs_getxattr(lower_dentry, (char*) name, value, size);
+	err = vfs_getxattr(lower_dentry, (char *) name, value, size);
 
 out:
 	unionfs_unlock_dentry(dentry);
@@ -84,7 +84,7 @@ int unionfs_setxattr(struct dentry *dentry, const char *name,
 
 	lower_dentry = unionfs_lower_dentry(dentry);
 
-	err = vfs_setxattr(lower_dentry, (char*) name, (void*) value,
+	err = vfs_setxattr(lower_dentry, (char *) name, (void *) value,
 			   size, flags);
 
 out:
@@ -113,7 +113,7 @@ int unionfs_removexattr(struct dentry *dentry, const char *name)
 
 	lower_dentry = unionfs_lower_dentry(dentry);
 
-	err = vfs_removexattr(lower_dentry, (char*) name);
+	err = vfs_removexattr(lower_dentry, (char *) name);
 
 out:
 	unionfs_unlock_dentry(dentry);
-- 
1.5.2.2


  parent reply	other threads:[~2007-10-01  5:51 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-10-01  5:50 [GIT PULL -mm] 00/19 Unionfs updates/cleanups/fixes Erez Zadok
2007-10-01  5:50 ` [PATCH 01/19] Unionfs: compile if debug is off Erez Zadok
2007-10-01  5:50 ` [PATCH 02/19] Unionfs: add un/likely on conditionals Erez Zadok
2007-10-01  5:50 ` [PATCH 03/19] Unionfs: minor comment cleanups Erez Zadok
2007-10-01  5:50 ` [PATCH 04/19] Unionfs: use consistent printk prefixes Erez Zadok
2007-10-01  5:50 ` [PATCH 05/19] Unionfs: use UNIONFS_NAME macro Erez Zadok
2007-10-01  5:50 ` [PATCH 06/19] Unionfs: properly indent static struct Erez Zadok
2007-10-01  5:50 ` [PATCH 07/19] Unionfs: remove unnecessary if condition Erez Zadok
2007-10-01  5:50 ` [PATCH 08/19] Unionfs: use page_offset() helper Erez Zadok
2007-10-01  5:50 ` [PATCH 09/19] Unionfs: use pr_debug() instead of custom dprintk() Erez Zadok
2007-10-01  5:50 ` [PATCH 10/19] Unionfs: convert all appropriate printk's to pr_debug calls Erez Zadok
2007-10-01  5:50 ` [PATCH 11/19] Unionfs: add missing newlines in printk's Erez Zadok
2007-10-01  5:50 ` [PATCH 12/19] Unionfs: update/assign a KERN_* level to all printk statements Erez Zadok
2007-10-01  5:50 ` [PATCH 13/19] Unionfs: remove periods from the end of printk strings Erez Zadok
2007-10-01  5:50 ` [PATCH 14/19] Unionfs: use braces in both branches of conditionals Erez Zadok
2007-10-01  5:50 ` [PATCH 15/19] Unionfs: coding style: proper spacing Erez Zadok
2007-10-01  5:50 ` [PATCH 16/19] Unionfs: coding style: take assignments out of "if" conditions Erez Zadok
2007-10-01  5:50 ` [PATCH 17/19] Unionfs: coding style: avoid multiple assignments on same line Erez Zadok
2007-10-01  5:50 ` Erez Zadok [this message]
2007-10-01  5:50 ` [PATCH 19/19] Unionfs: coding style: avoid lines longer than 80 chars Erez Zadok

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=11912178642252-git-send-email-ezk@cs.sunysb.edu \
    --to=ezk@cs.sunysb.edu \
    --cc=akpm@linux-foundation.org \
    --cc=hch@infradead.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=viro@ftp.linux.org.uk \
    /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).