lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-id: <1357213361-23620-6-git-send-email-andrzej.p@samsung.com>
Date:	Thu, 03 Jan 2013 12:42:38 +0100
From:	Andrzej Pietrasiewicz <andrzej.p@...sung.com>
To:	linux-kernel@...r.kernel.org
Cc:	Andrzej Pietrasiewicz <andrzej.p@...sung.com>,
	Kyungmin Park <kyungmin.park@...sung.com>,
	Joel Becker <jlbec@...lplan.org>,
	Marek Szyprowski <m.szyprowski@...sung.com>
Subject: [PATCH 5/8] fs/configfs: inode.c checkpatch cleanup

Eliminate checkpatch errors and warnings

Signed-off-by: Andrzej Pietrasiewicz <andrzej.p@...sung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@...sung.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

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ