forked from Minki/linux
ashmem: Whitespace cleanups
Fixes checkpatch warnings with the ashmem.c file CC: Brian Swetland <swetland@google.com> CC: Colin Cross <ccross@android.com> CC: Arve Hjønnevåg <arve@android.com> CC: Dima Zavin <dima@android.com> CC: Robert Love <rlove@google.com> Signed-off-by: John Stultz <john.stultz@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:
parent
33e8fc463e
commit
1efb34394a
@ -41,7 +41,7 @@
|
||||
* Big Note: Mappings do NOT pin this structure; it dies on close()
|
||||
*/
|
||||
struct ashmem_area {
|
||||
char name[ASHMEM_FULL_NAME_LEN];/* optional name for /proc/pid/maps */
|
||||
char name[ASHMEM_FULL_NAME_LEN]; /* optional name in /proc/pid/maps */
|
||||
struct list_head unpinned_list; /* list of all ashmem areas */
|
||||
struct file *file; /* the shmem-based backing file */
|
||||
size_t size; /* size of the mapping, in bytes */
|
||||
@ -220,9 +220,8 @@ static ssize_t ashmem_read(struct file *file, char __user *buf,
|
||||
mutex_lock(&ashmem_mutex);
|
||||
|
||||
/* If size is not set, or set to 0, always return EOF. */
|
||||
if (asma->size == 0) {
|
||||
if (asma->size == 0)
|
||||
goto out;
|
||||
}
|
||||
|
||||
if (!asma->file) {
|
||||
ret = -EBADF;
|
||||
@ -230,9 +229,8 @@ static ssize_t ashmem_read(struct file *file, char __user *buf,
|
||||
}
|
||||
|
||||
ret = asma->file->f_op->read(asma->file, buf, len, pos);
|
||||
if (ret < 0) {
|
||||
if (ret < 0)
|
||||
goto out;
|
||||
}
|
||||
|
||||
/** Update backing file pos, since f_ops->read() doesn't */
|
||||
asma->file->f_pos = *pos;
|
||||
@ -260,9 +258,8 @@ static loff_t ashmem_llseek(struct file *file, loff_t offset, int origin)
|
||||
}
|
||||
|
||||
ret = asma->file->f_op->llseek(asma->file, offset, origin);
|
||||
if (ret < 0) {
|
||||
if (ret < 0)
|
||||
goto out;
|
||||
}
|
||||
|
||||
/** Copy f_pos from backing file, since f_ops->llseek() sets it */
|
||||
file->f_pos = asma->file->f_pos;
|
||||
@ -272,10 +269,9 @@ out:
|
||||
return ret;
|
||||
}
|
||||
|
||||
static inline unsigned long
|
||||
calc_vm_may_flags(unsigned long prot)
|
||||
static inline unsigned long calc_vm_may_flags(unsigned long prot)
|
||||
{
|
||||
return _calc_vm_trans(prot, PROT_READ, VM_MAYREAD ) |
|
||||
return _calc_vm_trans(prot, PROT_READ, VM_MAYREAD) |
|
||||
_calc_vm_trans(prot, PROT_WRITE, VM_MAYWRITE) |
|
||||
_calc_vm_trans(prot, PROT_EXEC, VM_MAYEXEC);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user