aboutsummaryrefslogtreecommitdiffstats
path: root/fs/sysfs/file.c
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/sysfs/file.c
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/sysfs/file.c')
-rw-r--r--fs/sysfs/file.c22
1 files changed, 10 insertions, 12 deletions
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)