Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 1efb3439 authored by John Stultz's avatar John Stultz Committed by Greg Kroah-Hartman
Browse files

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: default avatarJohn Stultz <john.stultz@linaro.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 33e8fc46
Loading
Loading
Loading
Loading
+21 −25
Original line number Diff line number Diff line
@@ -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,8 +269,7 @@ 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) |
	       _calc_vm_trans(prot, PROT_WRITE, VM_MAYWRITE) |