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 8/8] fs/configfs: checkpatch cleanup
Date: Thu, 03 Jan 2013 11:10:25 +0100 [thread overview]
Message-ID: <1357207825-10485-9-git-send-email-andrzej.p@samsung.com> (raw)
In-Reply-To: <1357207825-10485-1-git-send-email-andrzej.p@samsung.com>
---
fs/configfs/symlink.c | 29 +++++++++++++++--------------
1 files changed, 15 insertions(+), 14 deletions(-)
diff --git a/fs/configfs/symlink.c b/fs/configfs/symlink.c
index cc9f254..cb9169d 100644
--- a/fs/configfs/symlink.c
+++ b/fs/configfs/symlink.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.
*/
@@ -35,17 +35,17 @@
/* Protects attachments of new symlinks */
DEFINE_MUTEX(configfs_symlink_mutex);
-static int item_depth(struct config_item * item)
+static int item_depth(struct config_item *item)
{
- struct config_item * p = item;
+ struct config_item *p = item;
int depth = 0;
do { depth++; } while ((p = p->ci_parent) && !configfs_is_root(p));
return depth;
}
-static int item_path_length(struct config_item * item)
+static int item_path_length(struct config_item *item)
{
- struct config_item * p = item;
+ struct config_item *p = item;
int length = 1;
do {
length += strlen(config_item_name(p)) + 1;
@@ -54,9 +54,9 @@ static int item_path_length(struct config_item * item)
return length;
}
-static void fill_item_path(struct config_item * item, char * buffer, int length)
+static void fill_item_path(struct config_item *item, char *buffer, int length)
{
- struct config_item * p;
+ struct config_item *p;
--length;
for (p = item; p && !configfs_is_root(p); p = p->ci_parent) {
@@ -64,7 +64,7 @@ static void fill_item_path(struct config_item * item, char * buffer, int length)
/* back up enough to print this bus id with '/' */
length -= cur;
- strncpy(buffer + length,config_item_name(p),cur);
+ strncpy(buffer + length, config_item_name(p), cur);
*(buffer + --length) = '/';
}
}
@@ -132,7 +132,8 @@ static int get_target(const char *symname, struct path *path,
}
-int configfs_symlink(struct inode *dir, struct dentry *dentry, const char *symname)
+int configfs_symlink(struct inode *dir, struct dentry *dentry,
+ const char *symname)
{
int ret;
struct path path;
@@ -232,10 +233,10 @@ out:
return ret;
}
-static int configfs_get_target_path(struct config_item * item, struct config_item * target,
- char *path)
+static int configfs_get_target_path(struct config_item *item,
+ struct config_item *target, char *path)
{
- char * s;
+ char *s;
int depth, size;
depth = item_depth(item);
@@ -246,7 +247,7 @@ static int configfs_get_target_path(struct config_item * item, struct config_ite
pr_debug("%s: depth = %d, size = %d\n", __func__, depth, size);
for (s = path; depth--; s += 3)
- strcpy(s,"../");
+ strcpy(s, "../");
fill_item_path(target, path, size);
pr_debug("%s: path = '%s'\n", __func__, path);
@@ -254,7 +255,7 @@ static int configfs_get_target_path(struct config_item * item, struct config_ite
return 0;
}
-static int configfs_getlink(struct dentry *dentry, char * path)
+static int configfs_getlink(struct dentry *dentry, char *path)
{
struct config_item *item, *target_item;
int error = 0;
--
1.7.0.4
prev parent reply other threads:[~2013-01-03 10:12 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 ` [PATCH 5/8] " Andrzej Pietrasiewicz
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 ` Andrzej Pietrasiewicz [this message]
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-9-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®