Commit ab9bf4be authored by Greg Kroah-Hartman's avatar Greg Kroah-Hartman

sysfs: remove trailing whitespace

This removes all trailing whitespace errors in the sysfs code.
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 1b866757
...@@ -735,7 +735,7 @@ static enum kobj_ns_type sysfs_read_ns_type(struct kobject *kobj) ...@@ -735,7 +735,7 @@ static enum kobj_ns_type sysfs_read_ns_type(struct kobject *kobj)
/** /**
* sysfs_create_dir - create a directory for an object. * sysfs_create_dir - create a directory for an object.
* @kobj: object we're creating directory for. * @kobj: object we're creating directory for.
*/ */
int sysfs_create_dir(struct kobject * kobj) int sysfs_create_dir(struct kobject * kobj)
{ {
......
...@@ -59,8 +59,8 @@ struct sysfs_buffer { ...@@ -59,8 +59,8 @@ struct sysfs_buffer {
* @buffer: data buffer for file. * @buffer: data buffer for file.
* *
* Allocate @buffer->page, if it hasn't been already, then call the * Allocate @buffer->page, if it hasn't been already, then call the
* kobject's show() method to fill the buffer with this attribute's * kobject's show() method to fill the buffer with this attribute's
* data. * data.
* This is called only once, on the file's first read unless an error * This is called only once, on the file's first read unless an error
* is returned. * is returned.
*/ */
...@@ -106,7 +106,7 @@ static int fill_read_buffer(struct dentry * dentry, struct sysfs_buffer * buffer ...@@ -106,7 +106,7 @@ static int fill_read_buffer(struct dentry * dentry, struct sysfs_buffer * buffer
} }
/** /**
* sysfs_read_file - read an attribute. * sysfs_read_file - read an attribute.
* @file: file pointer. * @file: file pointer.
* @buf: buffer to fill. * @buf: buffer to fill.
* @count: number of bytes to read. * @count: number of bytes to read.
...@@ -154,9 +154,8 @@ sysfs_read_file(struct file *file, char __user *buf, size_t count, loff_t *ppos) ...@@ -154,9 +154,8 @@ sysfs_read_file(struct file *file, char __user *buf, size_t count, loff_t *ppos)
* Allocate @buffer->page if it hasn't been already, then * Allocate @buffer->page if it hasn't been already, then
* copy the user-supplied buffer into it. * copy the user-supplied buffer into it.
*/ */
static int fill_write_buffer(struct sysfs_buffer * buffer,
static int const char __user * buf, size_t count)
fill_write_buffer(struct sysfs_buffer * buffer, const char __user * buf, size_t count)
{ {
int error; int error;
...@@ -183,10 +182,9 @@ fill_write_buffer(struct sysfs_buffer * buffer, const char __user * buf, size_t ...@@ -183,10 +182,9 @@ fill_write_buffer(struct sysfs_buffer * buffer, const char __user * buf, size_t
* @count: number of bytes * @count: number of bytes
* *
* Get the correct pointers for the kobject and the attribute we're * Get the correct pointers for the kobject and the attribute we're
* dealing with, then call the store() method for the attribute, * dealing with, then call the store() method for the attribute,
* passing the buffer that we acquired in fill_write_buffer(). * passing the buffer that we acquired in fill_write_buffer().
*/ */
static int static int
flush_write_buffer(struct dentry * dentry, struct sysfs_buffer * buffer, size_t count) flush_write_buffer(struct dentry * dentry, struct sysfs_buffer * buffer, size_t count)
{ {
...@@ -219,9 +217,9 @@ flush_write_buffer(struct dentry * dentry, struct sysfs_buffer * buffer, size_t ...@@ -219,9 +217,9 @@ flush_write_buffer(struct dentry * dentry, struct sysfs_buffer * buffer, size_t
* then push it to the kobject in flush_write_buffer(). * then push it to the kobject in flush_write_buffer().
* There is no easy way for us to know if userspace is only doing a partial * There is no easy way for us to know if userspace is only doing a partial
* write, so we don't support them. We expect the entire buffer to come * write, so we don't support them. We expect the entire buffer to come
* on the first write. * on the first write.
* Hint: if you're writing a value, first read the file, modify only the * Hint: if you're writing a value, first read the file, modify only the
* the value you're changing, then write entire buffer back. * the value you're changing, then write entire buffer back.
*/ */
static ssize_t static ssize_t
...@@ -345,7 +343,7 @@ static int sysfs_open_file(struct inode *inode, struct file *file) ...@@ -345,7 +343,7 @@ static int sysfs_open_file(struct inode *inode, struct file *file)
} }
/* File needs write support. /* File needs write support.
* The inode's perms must say it's ok, * The inode's perms must say it's ok,
* and we must have a store method. * and we must have a store method.
*/ */
if (file->f_mode & FMODE_WRITE) { if (file->f_mode & FMODE_WRITE) {
...@@ -566,7 +564,7 @@ int sysfs_add_file(struct sysfs_dirent *dir_sd, const struct attribute *attr, ...@@ -566,7 +564,7 @@ int sysfs_add_file(struct sysfs_dirent *dir_sd, const struct attribute *attr,
/** /**
* sysfs_create_file - create an attribute file for an object. * sysfs_create_file - create an attribute file for an object.
* @kobj: object we're creating for. * @kobj: object we're creating for.
* @attr: attribute descriptor. * @attr: attribute descriptor.
*/ */
int sysfs_create_file(struct kobject * kobj, const struct attribute * attr) int sysfs_create_file(struct kobject * kobj, const struct attribute * attr)
......
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
* Please see Documentation/filesystems/sysfs.txt for more information. * Please see Documentation/filesystems/sysfs.txt for more information.
*/ */
#undef DEBUG #undef DEBUG
#include <linux/pagemap.h> #include <linux/pagemap.h>
#include <linux/namei.h> #include <linux/namei.h>
......
...@@ -297,7 +297,7 @@ static void *sysfs_follow_link(struct dentry *dentry, struct nameidata *nd) ...@@ -297,7 +297,7 @@ static void *sysfs_follow_link(struct dentry *dentry, struct nameidata *nd)
int error = -ENOMEM; int error = -ENOMEM;
unsigned long page = get_zeroed_page(GFP_KERNEL); unsigned long page = get_zeroed_page(GFP_KERNEL);
if (page) { if (page) {
error = sysfs_getlink(dentry, (char *) page); error = sysfs_getlink(dentry, (char *) page);
if (error < 0) if (error < 0)
free_page((unsigned long)page); free_page((unsigned long)page);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment