diff options
author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-08-22 01:28:26 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-08-22 01:28:26 +0200 |
commit | 1b18dc2beb31f588db1c75901b0112324c72124f (patch) | |
tree | 45050bf98417716cd934da104891ad6b403f67c1 /fs/sysfs/file.c | |
parent | sysfs: remove trailing whitespace (diff) | |
download | linux-1b18dc2beb31f588db1c75901b0112324c72124f.tar.xz linux-1b18dc2beb31f588db1c75901b0112324c72124f.zip |
sysfs: fix up space coding style issues
This fixes up all of the space-related coding style issues for 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.c | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/fs/sysfs/file.c b/fs/sysfs/file.c index 65052df09485..1e12e07eed5e 100644 --- a/fs/sysfs/file.c +++ b/fs/sysfs/file.c @@ -45,8 +45,8 @@ struct sysfs_open_dirent { struct sysfs_buffer { size_t count; loff_t pos; - char * page; - const struct sysfs_ops * ops; + char *page; + const struct sysfs_ops *ops; struct mutex mutex; int needs_read_fill; int event; @@ -64,11 +64,11 @@ struct sysfs_buffer { * This is called only once, on the file's first read unless an error * is returned. */ -static int fill_read_buffer(struct dentry * dentry, struct sysfs_buffer * buffer) +static int fill_read_buffer(struct dentry *dentry, struct sysfs_buffer *buffer) { struct sysfs_dirent *attr_sd = dentry->d_fsdata; struct kobject *kobj = attr_sd->s_parent->s_dir.kobj; - const struct sysfs_ops * ops = buffer->ops; + const struct sysfs_ops *ops = buffer->ops; int ret = 0; ssize_t count; @@ -127,12 +127,12 @@ static int fill_read_buffer(struct dentry * dentry, struct sysfs_buffer * buffer static ssize_t sysfs_read_file(struct file *file, char __user *buf, size_t count, loff_t *ppos) { - struct sysfs_buffer * buffer = file->private_data; + struct sysfs_buffer *buffer = file->private_data; ssize_t retval = 0; mutex_lock(&buffer->mutex); if (buffer->needs_read_fill || *ppos == 0) { - retval = fill_read_buffer(file->f_path.dentry,buffer); + retval = fill_read_buffer(file->f_path.dentry, buffer); if (retval) goto out; } @@ -154,8 +154,8 @@ out: * Allocate @buffer->page if it hasn't been already, then * copy the user-supplied buffer into it. */ -static int fill_write_buffer(struct sysfs_buffer * buffer, - const char __user * buf, size_t count) +static int fill_write_buffer(struct sysfs_buffer *buffer, + const char __user *buf, size_t count) { int error; @@ -166,7 +166,7 @@ static int fill_write_buffer(struct sysfs_buffer * buffer, if (count >= PAGE_SIZE) count = PAGE_SIZE - 1; - error = copy_from_user(buffer->page,buf,count); + error = copy_from_user(buffer->page, buf, count); buffer->needs_read_fill = 1; /* if buf is assumed to contain a string, terminate it by \0, so e.g. sscanf() can scan the string easily */ @@ -186,11 +186,11 @@ static int fill_write_buffer(struct sysfs_buffer * buffer, * passing the buffer that we acquired in fill_write_buffer(). */ 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) { struct sysfs_dirent *attr_sd = dentry->d_fsdata; struct kobject *kobj = attr_sd->s_parent->s_dir.kobj; - const struct sysfs_ops * ops = buffer->ops; + const struct sysfs_ops *ops = buffer->ops; int rc; /* need attr_sd for attr and ops, its parent for kobj */ @@ -225,7 +225,7 @@ flush_write_buffer(struct dentry * dentry, struct sysfs_buffer * buffer, size_t static ssize_t sysfs_write_file(struct file *file, const char __user *buf, size_t count, loff_t *ppos) { - struct sysfs_buffer * buffer = file->private_data; + struct sysfs_buffer *buffer = file->private_data; ssize_t len; mutex_lock(&buffer->mutex); @@ -418,7 +418,7 @@ static int sysfs_release(struct inode *inode, struct file *filp) */ static unsigned int sysfs_poll(struct file *filp, poll_table *wait) { - struct sysfs_buffer * buffer = filp->private_data; + struct sysfs_buffer *buffer = filp->private_data; struct sysfs_dirent *attr_sd = filp->f_path.dentry->d_fsdata; struct sysfs_open_dirent *od = attr_sd->s_attr.open; @@ -567,7 +567,7 @@ int sysfs_add_file(struct sysfs_dirent *dir_sd, const struct attribute *attr, * @kobj: object we're creating for. * @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) { BUG_ON(!kobj || !kobj->sd || !attr); @@ -660,7 +660,7 @@ EXPORT_SYMBOL_GPL(sysfs_chmod_file); * * Hash the attribute name and kill the victim. */ -void sysfs_remove_file(struct kobject * kobj, const struct attribute * attr) +void sysfs_remove_file(struct kobject *kobj, const struct attribute *attr) { const void *ns; @@ -671,7 +671,7 @@ void sysfs_remove_file(struct kobject * kobj, const struct attribute * attr) } EXPORT_SYMBOL_GPL(sysfs_remove_file); -void sysfs_remove_files(struct kobject * kobj, const struct attribute **ptr) +void sysfs_remove_files(struct kobject *kobj, const struct attribute **ptr) { int i; for (i = 0; ptr[i]; i++) |