aboutsummaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-08-21 19:21:17 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-08-21 19:21:17 -0400
commitab9bf4be4dd58f8ae1961180e008b7e3022f08b5 (patch)
tree1364584f9de0cd4bba03f88ae2fb610e1ebd17ed /fs
parent1b866757fc4cb135674f46c96909e900fcea91a2 (diff)
sysfs: remove trailing whitespace
This removes all trailing whitespace errors in the sysfs code. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'fs')
-rw-r--r--fs/sysfs/dir.c2
-rw-r--r--fs/sysfs/file.c22
-rw-r--r--fs/sysfs/inode.c2
-rw-r--r--fs/sysfs/symlink.c2
4 files changed, 13 insertions, 15 deletions
diff --git a/fs/sysfs/dir.c b/fs/sysfs/dir.c
index e068e744dbdd..32244cd157a7 100644
--- a/fs/sysfs/dir.c
+++ b/fs/sysfs/dir.c
@@ -735,7 +735,7 @@ static enum kobj_ns_type sysfs_read_ns_type(struct kobject *kobj)
735 735
736/** 736/**
737 * sysfs_create_dir - create a directory for an object. 737 * sysfs_create_dir - create a directory for an object.
738 * @kobj: object we're creating directory for. 738 * @kobj: object we're creating directory for.
739 */ 739 */
740int sysfs_create_dir(struct kobject * kobj) 740int sysfs_create_dir(struct kobject * kobj)
741{ 741{
diff --git a/fs/sysfs/file.c b/fs/sysfs/file.c
index b278bf922d44..65052df09485 100644
--- a/fs/sysfs/file.c
+++ b/fs/sysfs/file.c
@@ -59,8 +59,8 @@ struct sysfs_buffer {
59 * @buffer: data buffer for file. 59 * @buffer: data buffer for file.
60 * 60 *
61 * Allocate @buffer->page, if it hasn't been already, then call the 61 * Allocate @buffer->page, if it hasn't been already, then call the
62 * kobject's show() method to fill the buffer with this attribute's 62 * kobject's show() method to fill the buffer with this attribute's
63 * data. 63 * data.
64 * This is called only once, on the file's first read unless an error 64 * This is called only once, on the file's first read unless an error
65 * is returned. 65 * is returned.
66 */ 66 */
@@ -106,7 +106,7 @@ static int fill_read_buffer(struct dentry * dentry, struct sysfs_buffer * buffer
106} 106}
107 107
108/** 108/**
109 * sysfs_read_file - read an attribute. 109 * sysfs_read_file - read an attribute.
110 * @file: file pointer. 110 * @file: file pointer.
111 * @buf: buffer to fill. 111 * @buf: buffer to fill.
112 * @count: number of bytes to read. 112 * @count: number of bytes to read.
@@ -154,9 +154,8 @@ out:
154 * Allocate @buffer->page if it hasn't been already, then 154 * Allocate @buffer->page if it hasn't been already, then
155 * copy the user-supplied buffer into it. 155 * copy the user-supplied buffer into it.
156 */ 156 */
157 157static int fill_write_buffer(struct sysfs_buffer * buffer,
158static int 158 const char __user * buf, size_t count)
159fill_write_buffer(struct sysfs_buffer * buffer, const char __user * buf, size_t count)
160{ 159{
161 int error; 160 int error;
162 161
@@ -183,10 +182,9 @@ fill_write_buffer(struct sysfs_buffer * buffer, const char __user * buf, size_t
183 * @count: number of bytes 182 * @count: number of bytes
184 * 183 *
185 * Get the correct pointers for the kobject and the attribute we're 184 * Get the correct pointers for the kobject and the attribute we're
186 * dealing with, then call the store() method for the attribute, 185 * dealing with, then call the store() method for the attribute,
187 * passing the buffer that we acquired in fill_write_buffer(). 186 * passing the buffer that we acquired in fill_write_buffer().
188 */ 187 */
189
190static int 188static int
191flush_write_buffer(struct dentry * dentry, struct sysfs_buffer * buffer, size_t count) 189flush_write_buffer(struct dentry * dentry, struct sysfs_buffer * buffer, size_t count)
192{ 190{
@@ -219,9 +217,9 @@ flush_write_buffer(struct dentry * dentry, struct sysfs_buffer * buffer, size_t
219 * then push it to the kobject in flush_write_buffer(). 217 * then push it to the kobject in flush_write_buffer().
220 * There is no easy way for us to know if userspace is only doing a partial 218 * There is no easy way for us to know if userspace is only doing a partial
221 * write, so we don't support them. We expect the entire buffer to come 219 * write, so we don't support them. We expect the entire buffer to come
222 * on the first write. 220 * on the first write.
223 * Hint: if you're writing a value, first read the file, modify only the 221 * Hint: if you're writing a value, first read the file, modify only the
224 * the value you're changing, then write entire buffer back. 222 * the value you're changing, then write entire buffer back.
225 */ 223 */
226 224
227static ssize_t 225static ssize_t
@@ -345,7 +343,7 @@ static int sysfs_open_file(struct inode *inode, struct file *file)
345 } 343 }
346 344
347 /* File needs write support. 345 /* File needs write support.
348 * The inode's perms must say it's ok, 346 * The inode's perms must say it's ok,
349 * and we must have a store method. 347 * and we must have a store method.
350 */ 348 */
351 if (file->f_mode & FMODE_WRITE) { 349 if (file->f_mode & FMODE_WRITE) {
@@ -566,7 +564,7 @@ int sysfs_add_file(struct sysfs_dirent *dir_sd, const struct attribute *attr,
566 564
567/** 565/**
568 * sysfs_create_file - create an attribute file for an object. 566 * sysfs_create_file - create an attribute file for an object.
569 * @kobj: object we're creating for. 567 * @kobj: object we're creating for.
570 * @attr: attribute descriptor. 568 * @attr: attribute descriptor.
571 */ 569 */
572int sysfs_create_file(struct kobject * kobj, const struct attribute * attr) 570int sysfs_create_file(struct kobject * kobj, const struct attribute * attr)
diff --git a/fs/sysfs/inode.c b/fs/sysfs/inode.c
index 3e2837a633ed..e9f251ae7e8b 100644
--- a/fs/sysfs/inode.c
+++ b/fs/sysfs/inode.c
@@ -10,7 +10,7 @@
10 * Please see Documentation/filesystems/sysfs.txt for more information. 10 * Please see Documentation/filesystems/sysfs.txt for more information.
11 */ 11 */
12 12
13#undef DEBUG 13#undef DEBUG
14 14
15#include <linux/pagemap.h> 15#include <linux/pagemap.h>
16#include <linux/namei.h> 16#include <linux/namei.h>
diff --git a/fs/sysfs/symlink.c b/fs/sysfs/symlink.c
index bb097ad1d860..9fab2e7f7357 100644
--- a/fs/sysfs/symlink.c
+++ b/fs/sysfs/symlink.c
@@ -297,7 +297,7 @@ static void *sysfs_follow_link(struct dentry *dentry, struct nameidata *nd)
297 int error = -ENOMEM; 297 int error = -ENOMEM;
298 unsigned long page = get_zeroed_page(GFP_KERNEL); 298 unsigned long page = get_zeroed_page(GFP_KERNEL);
299 if (page) { 299 if (page) {
300 error = sysfs_getlink(dentry, (char *) page); 300 error = sysfs_getlink(dentry, (char *) page);
301 if (error < 0) 301 if (error < 0)
302 free_page((unsigned long)page); 302 free_page((unsigned long)page);
303 } 303 }