mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Andrzej Pietrasiewicz <andrzej.p@samsung.com>
To: linux-kernel@vger.kernel.org
Cc: Andrzej Pietrasiewicz <andrzej.p@samsung.com>,
	Kyungmin Park <kyungmin.park@samsung.com>,
	Joel Becker <jlbec@evilplan.org>,
	Marek Szyprowski <m.szyprowski@samsung.com>
Subject: [PATCH 5/8] fs/configfs: checkpatch cleanup
Date: Thu, 03 Jan 2013 11:10:22 +0100	[thread overview]
Message-ID: <1357207825-10485-6-git-send-email-andrzej.p@samsung.com> (raw)
In-Reply-To: <1357207825-10485-1-git-send-email-andrzej.p@samsung.com>

---
 fs/configfs/inode.c |   46 +++++++++++++++++++++++++---------------------
 1 files changed, 25 insertions(+), 21 deletions(-)

diff --git a/fs/configfs/inode.c b/fs/configfs/inode.c
index a9d35b0..087fc73 100644
--- a/fs/configfs/inode.c
+++ b/fs/configfs/inode.c
@@ -19,7 +19,7 @@
  * Boston, MA 021110-1307, USA.
  *
  * Based on sysfs:
- * 	sysfs is Copyright (C) 2001, 2002, 2003 Patrick Mochel
+ *	sysfs is Copyright (C) 2001, 2002, 2003 Patrick Mochel
  *
  * configfs Copyright (C) 2005 Oracle.  All rights reserved.
  *
@@ -56,15 +56,15 @@ static struct backing_dev_info configfs_backing_dev_info = {
 	.capabilities	= BDI_CAP_NO_ACCT_AND_WRITEBACK,
 };
 
-static const struct inode_operations configfs_inode_operations ={
+static const struct inode_operations configfs_inode_operations = {
 	.setattr	= configfs_setattr,
 };
 
-int configfs_setattr(struct dentry * dentry, struct iattr * iattr)
+int configfs_setattr(struct dentry *dentry, struct iattr *iattr)
 {
-	struct inode * inode = dentry->d_inode;
-	struct configfs_dirent * sd = dentry->d_fsdata;
-	struct iattr * sd_iattr;
+	struct inode *inode = dentry->d_inode;
+	struct configfs_dirent *sd = dentry->d_fsdata;
+	struct iattr *sd_iattr;
 	unsigned int ia_valid = iattr->ia_valid;
 	int error;
 
@@ -81,7 +81,8 @@ int configfs_setattr(struct dentry * dentry, struct iattr * iattr)
 		sd_iattr->ia_mode = sd->s_mode;
 		sd_iattr->ia_uid = GLOBAL_ROOT_UID;
 		sd_iattr->ia_gid = GLOBAL_ROOT_GID;
-		sd_iattr->ia_atime = sd_iattr->ia_mtime = sd_iattr->ia_ctime = CURRENT_TIME;
+		sd_iattr->ia_atime = sd_iattr->ia_mtime = sd_iattr->ia_ctime =
+			CURRENT_TIME;
 		sd->s_iattr = sd_iattr;
 	}
 	/* attributes were changed atleast once in past */
@@ -114,13 +115,13 @@ int configfs_setattr(struct dentry * dentry, struct iattr * iattr)
 	return error;
 }
 
-static inline void set_default_inode_attr(struct inode * inode, umode_t mode)
+static inline void set_default_inode_attr(struct inode *inode, umode_t mode)
 {
 	inode->i_mode = mode;
 	inode->i_atime = inode->i_mtime = inode->i_ctime = CURRENT_TIME;
 }
 
-static inline void set_inode_attr(struct inode * inode, struct iattr * iattr)
+static inline void set_inode_attr(struct inode *inode, struct iattr *iattr)
 {
 	inode->i_mode = iattr->ia_mode;
 	inode->i_uid = iattr->ia_uid;
@@ -133,7 +134,7 @@ static inline void set_inode_attr(struct inode * inode, struct iattr * iattr)
 struct inode *configfs_new_inode(umode_t mode, struct configfs_dirent *sd,
 				 struct super_block *s)
 {
-	struct inode * inode = new_inode(s);
+	struct inode *inode = new_inode(s);
 	if (inode) {
 		inode->i_ino = get_next_ino();
 		inode->i_mapping->a_ops = &configfs_aops;
@@ -154,6 +155,8 @@ struct inode *configfs_new_inode(umode_t mode, struct configfs_dirent *sd,
 
 #ifdef CONFIG_LOCKDEP
 
+static char *lockdep_msg =
+"configfs: Too many levels of inodes for the locking correctness validator.\n";
 static void configfs_set_inode_lock_class(struct configfs_dirent *sd,
 					  struct inode *inode)
 {
@@ -168,9 +171,8 @@ static void configfs_set_inode_lock_class(struct configfs_dirent *sd,
 			 * In practice the maximum level of locking depth is
 			 * already reached. Just inform about possible reasons.
 			 */
-			printk(KERN_INFO "configfs: Too many levels of inodes"
-			       " for the locking correctness validator.\n");
-			printk(KERN_INFO "Spurious warnings may appear.\n");
+			pr_info(lockdep_msg);
+			pr_info("Spurious warnings may appear.\n");
 		}
 	}
 }
@@ -184,7 +186,8 @@ static void configfs_set_inode_lock_class(struct configfs_dirent *sd,
 
 #endif /* CONFIG_LOCKDEP */
 
-int configfs_create(struct dentry * dentry, umode_t mode, int (*init)(struct inode *))
+int configfs_create(struct dentry *dentry, umode_t mode,
+		    int (*init)(struct inode *))
 {
 	int error = 0;
 	struct inode *inode = NULL;
@@ -220,9 +223,10 @@ int configfs_create(struct dentry * dentry, umode_t mode, int (*init)(struct ino
 }
 
 /*
- * Get the name for corresponding element represented by the given configfs_dirent
+ * Get the name for corresponding element represented by the given
+ * configfs_dirent
  */
-const unsigned char * configfs_get_name(struct configfs_dirent *sd)
+const unsigned char *configfs_get_name(struct configfs_dirent *sd)
 {
 	struct configfs_attribute *attr;
 
@@ -244,9 +248,9 @@ const unsigned char * configfs_get_name(struct configfs_dirent *sd)
  * Unhashes the dentry corresponding to given configfs_dirent
  * Called with parent inode's i_mutex held.
  */
-void configfs_drop_dentry(struct configfs_dirent * sd, struct dentry * parent)
+void configfs_drop_dentry(struct configfs_dirent *sd, struct dentry *parent)
 {
-	struct dentry * dentry = sd->s_dentry;
+	struct dentry *dentry = sd->s_dentry;
 
 	if (dentry) {
 		spin_lock(&dentry->d_lock);
@@ -260,10 +264,10 @@ void configfs_drop_dentry(struct configfs_dirent * sd, struct dentry * parent)
 	}
 }
 
-void configfs_hash_and_remove(struct dentry * dir, const char * name)
+void configfs_hash_and_remove(struct dentry *dir, const char *name)
 {
-	struct configfs_dirent * sd;
-	struct configfs_dirent * parent_sd = dir->d_fsdata;
+	struct configfs_dirent *sd;
+	struct configfs_dirent *parent_sd = dir->d_fsdata;
 
 	if (dir->d_inode == NULL)
 		/* no inode means this hasn't been made visible yet */
-- 
1.7.0.4


  parent reply	other threads:[~2013-01-03 10:11 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-01-03 10:10 [PATCH 0/8] configfs " Andrzej Pietrasiewicz
2013-01-03 10:10 ` [PATCH 1/8] fs/configfs: " Andrzej Pietrasiewicz
2013-01-03 10:31   ` devendra.aaru
2013-01-03 10:10 ` [PATCH 2/8] " Andrzej Pietrasiewicz
2013-01-03 10:10 ` [PATCH 3/8] " Andrzej Pietrasiewicz
2013-01-03 10:10 ` [PATCH 4/8] " Andrzej Pietrasiewicz
2013-01-03 10:10 ` Andrzej Pietrasiewicz [this message]
2013-01-03 10:10 ` [PATCH 6/8] " Andrzej Pietrasiewicz
2013-01-03 10:10 ` [PATCH 7/8] " Andrzej Pietrasiewicz
2013-01-03 10:10 ` [PATCH 8/8] " Andrzej Pietrasiewicz

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=1357207825-10485-6-git-send-email-andrzej.p@samsung.com \
    --to=andrzej.p@samsung.com \
    --cc=jlbec@evilplan.org \
    --cc=kyungmin.park@samsung.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=m.szyprowski@samsung.com \
    /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

all inboxes | Powered by JetHome®